stable
Clone or download
Read-only
Part of story #14570 Authorization grant confirmation page How to test: - Go to a project's administration - Create an OAuth2 app with a redirect endpoint, for example "https://tuleap.example.com/redirect" - Copy its client id from the table - go to https://tuleap.example.com/oauth2_server/authorize?client_id=<client_id>&scope=demo%20read:project&response_type=code&redirect_uri=https%3A%2F%2Ftuleap.example.com%2Fredirect The authorization form should display and list the "Demo" and "Read-only project" scopes. Omitting or modifying the scope parameter should redirect you to the redirect_uri with an error parameter like "error=invalid_scope". Change-Id: I190868623382c718050e540ca821cb8ae8b20176
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationEndpointGetController.php | +24 | −63 | Go to diff View file |
M | plugins/oauth2_server/include/AuthorizationServer/AuthorizationFormPresenter.php | +6 | −3 | Go to diff View file |
A | plugins/oauth2_server/include/AuthorizationServer/AuthorizationFormPresenterBuilder.php | +38 | −0 | Go to diff View file |
A | plugins/oauth2_server/include/AuthorizationServer/AuthorizationFormRenderer.php | +93 | −0 | Go to diff View file |
A | plugins/oauth2_server/include/AuthorizationServer/InvalidOAuth2ScopeException.php | +27 | −0 | Go to diff View file |
A | plugins/oauth2_server/include/AuthorizationServer/OAuth2ScopeDefinitionPresenter.php | +46 | −0 | Go to diff View file |
A | plugins/oauth2_server/include/AuthorizationServer/ScopeExtractor.php | +69 | −0 | Go to diff View file |
M | plugins/oauth2_server/include/oauth2_serverPlugin.php | +16 | −2 | Go to diff View file |
M | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationEndpointGetControllerTest.php | +53 | −12 | Go to diff View file |
A | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationFormPresenterBuilderTest.php | +90 | −0 | Go to diff View file |
A | plugins/oauth2_server/phpunit/AuthorizationServer/AuthorizationFormRendererTest.php | +100 | −0 | Go to diff View file |
A | plugins/oauth2_server/phpunit/AuthorizationServer/ScopeExtractorTest.php | +100 | −0 | Go to diff View file |
M | plugins/oauth2_server/templates/authorization-form.mustache | +8 | −24 | Go to diff View file |