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%20read:project&redirect_uri=<redirect_uri> When you click on "Authorize", you should be redirected to the <redirect_uri> with a "code" parameter representing the authorization code. Its value is hardcoded for now: 'tlp-oauth2-ac1-1.6161616161616161616161616161616161616161616161616161616161616161'. If you omit the "state" parameter, it should not crash. Change-Id: Ie9679aa8eb11d46a4e133b24ac3df96a3e013182
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationEndpointGetController.php | +9 | −11 | Go to diff View file |
A | plugins/oauth2_server/include/AuthorizationServer/AuthorizationEndpointPostController.php | +100 | −0 | Go to diff View file |
A | plugins/oauth2_server/include/AuthorizationServer/AuthorizationFormData.php | +95 | −0 | Go to diff View file |
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationFormPresenter.php | +18 | −4 | Go to diff View file |
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationFormPresenterBuilder.php | +19 | −11 | Go to diff View file |
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationFormRenderer.php | +3 | −8 | Go to diff View file |
M | plugins/oauth2_server/include/AuthorizationServer/RedirectURIBuilder.php | +20 | −2 | Go to diff View file |
M | plugins/oauth2_server/include/oauth2_serverPlugin.php | +27 | −6 | Go to diff View file |
M | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationEndpointGetControllerTest.php | +7 | −0 | Go to diff View file |
A | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationEndpointPostControllerTest.php | +126 | −0 | Go to diff View file |
M | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationFormPresenterBuilderTest.php | +29 | −5 | Go to diff View file |
M | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationFormRendererTest.php | +19 | −14 | Go to diff View file |
M | plugins/oauth2_server/phpunit/AuthorizationServer/RedirectURIBuilderTest.php | +51 | −6 | Go to diff View file |
M | plugins/oauth2_server/templates/authorization-form.mustache | +12 | −4 | Go to diff View file |