stable
Clone or download
Part of story #14570 Authorization grant confirmation page How to test: - Create a new OAuth2 app in a project administration. - Access the authorization endpoint. '<client_id> and <redirect_uri> must be replaced. <redirect_uri> should be URL-encoded. https://tuleap.example.com/oauth2/authorize?client_id=<client_id>&state=xyz&response_type=code&scope=demo&redirect_uri=<redirect_uri> - Note that only the "demo" scope is requested in the URI above. - Authorize the app. - Access the authorization endpoint a second time with the same URI. You should be redirected immediately, without the form showing up. The scopes are the same and you already granted them. - Access the authorization endpoint a third time, but change the scope parameter to scope=demo%20read:project. You should see the form with both scopes and should NOT receive an authorization code right away. Change-Id: I4e8e2e4a2e791bd59c02cf574e2f39ca1e4c5811
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/oauth2_server/include/AuthorizationServer/AuthorizationCodeResponseFactory.php | +91 | −0 | Go to diff View file |
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationEndpointGetController.php | +35 | −39 | Go to diff View file |
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationEndpointPostController.php | +16 | −40 | Go to diff View file |
A | plugins/oauth2_server/include/User/AuthorizationComparator.php | +93 | −0 | Go to diff View file |
R | plugins/oauth2_server/include/User/AuthorizationManager.php | Go to diff View file | ||
M | plugins/oauth2_server/include/User/AuthorizationScopeDao.php | +15 | −0 | Go to diff View file |
M | plugins/oauth2_server/include/oauth2_serverPlugin.php | +39 | −16 | Go to diff View file |
A | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationCodeResponseFactoryTest.php | +133 | −0 | Go to diff View file |
M | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationEndpointGetControllerTest.php | +63 | −22 | Go to diff View file |
M | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationEndpointPostControllerTest.php | +17 | −62 | Go to diff View file |
A | plugins/oauth2_server/phpunit/User/AuthorizationComparatorTest.php | +133 | −0 | Go to diff View file |
R | plugins/oauth2_server/phpunit/User/AuthorizationManagerTest.php | Go to diff View file | ||
A | tests/phpunit/common/Authentication/Scope/AuthenticationTestCoveringScope.php | +71 | −0 | Go to diff View file |