-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: Master, 1.0-portal_7.1.0, 7.1.x
-
Fix Version/s: Master
-
Component/s: None
-
Labels:
-
Fix Priority:4
-
Git Pull Request:
Steps to reproduce:
- Create OAuth2 Application
- clientId: 12345
- Authorization Code Grant enabled
- Update the OAuth2 Application permissions and allow "User" role to VIEW and CREATE_TOKEN
- Create a new user and sign in
- Start authorization code flow by going to http://localhost:8080/o/oauth2/authorize?client_id=12345&response_type=code
Expected result: User can see the authorize screen
Actual result: Error saying user doesn't have required permissions
Workarounds
Workaround #1 - allow any registered user to have VIEW permission:
- Open permissions screen for the default individual resource permission record for OAuth2AuthorizePortlet:
http://localhost:8080/?p_p_id=com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet&p_p_state=pop_up&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_mvcPath=%2Fedit_permissions.jsp&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_portletConfiguration=true&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_portletResource=com_liferay_oauth2_provider_web_internal_portlet_OAuth2AuthorizePortlet&_com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet_resourcePrimKey=com_liferay_oauth2_provider_web_internal_portlet_OAuth2AuthorizePortlet - Assign "VIEW" permission for "User"
- Clear all caches using Server Admin portlet
Workaround #2 - display the portlet inside Control Panel (might not work for environments which prevents accessing Control Panel)
- Go to Authorize Screen (System Settings -> OAuth2 -> Authorize Screen)
- Change Authorize Screen URL to use Control Panel: /group/control_panel?p_p_id=com_liferay_oauth2_provider_web_internal_portlet_OAuth2AuthorizePortlet&p_p_state=maximized
Workaround #3
- Users that want to use OAuth2 Authorize portlet must be site members of Guest site
Reproduced with "Liferay Plugin for OAuth 2.0" 1.1.0
- relates
-
OAUTH2-205 DOC: Create quick intro into OAuth2 Provider framework setup
-
- Open
-