stable

Clone or download

Read-only

Revoke Access to app

Part of story #14543 have OAuth2 user settings 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> - Authorize the app. - In your account settings, go to the "OAuth2 Apps" tab in your settings. - Revoke the app's access. - The app should disappear from the list. Auth codes and access tokens associated to your user and the app should be deleted. Change-Id: I04d5b4c835e5498836c68b4a8206637bcb768dfe

Modified Files

Name
M plugins/oauth2_server/db/install.sql +2 −1 Go to diff View file
A plugins/oauth2_server/db/mysql/2020/202003191000_add_user_app_id_index_oauth2_authorization_code_table.php +44 −0 Go to diff View file
M plugins/oauth2_server/include/Grant/AuthorizationCode/OAuth2AuthorizationCodeDAO.php +11 −0 Go to diff View file
M plugins/oauth2_server/include/User/Account/AccountAppsController.php +7 −1 Go to diff View file
A plugins/oauth2_server/include/User/Account/AppRevocationController.php +123 −0 Go to diff View file
M plugins/oauth2_server/include/User/Account/AppsPresenter.php +16 −5 Go to diff View file
M plugins/oauth2_server/include/User/Account/AppsPresenterBuilder.php +3 −2 Go to diff View file
M plugins/oauth2_server/include/User/AuthorizationDao.php +21 −4 Go to diff View file
A plugins/oauth2_server/include/User/AuthorizationRevoker.php +68 −0 Go to diff View file
M plugins/oauth2_server/include/oauth2_serverPlugin.php +25 −2 Go to diff View file
M plugins/oauth2_server/phpunit/User/Account/AccountAppsControllerTest.php +9 −2 Go to diff View file
A plugins/oauth2_server/phpunit/User/Account/AppRevocationControllerTest.php +152 −0 Go to diff View file
M plugins/oauth2_server/phpunit/User/Account/AppsPresenterBuilderTest.php +9 −1 Go to diff View file
A plugins/oauth2_server/phpunit/User/AuthorizationRevokerTest.php +89 −0 Go to diff View file
M plugins/oauth2_server/site-content/fr_FR/LC_MESSAGES/tuleap-oauth2_server.po +7 −0 Go to diff View file
M plugins/oauth2_server/templates/accounts-app-revoke-modal.mustache +3 −1 Go to diff View file
A src/common/Http/Response/RedirectWithFeedbackFactory.php +56 −0 Go to diff View file
A src/common/layout/Feedback/FeedbackSerializer.php +48 −0 Go to diff View file
A src/common/layout/Feedback/NewFeedback.php +57 −0 Go to diff View file
A tests/phpunit/common/Http/Response/RedirectWithFeedbackFactoryTest.php +74 −0 Go to diff View file
A tests/phpunit/common/Layout/Feedback/FeedbackSerializerTest.php +51 −0 Go to diff View file