stable

Clone or download

Read-only

Each OAuth2 app is assigned a secret when it is created

The secret is generated automatically and is stored in the database in a non reversible way and is shown to the user creating the app once. For now only one secret can be created by app. The SQL queries retrieving the app information to not expose the hash of the secret when it is not absolutely required. Part of story #14541: have OAuth2 project admin Change-Id: Ie0cab22c24eb6c75c192a879dcb954e970aaf12b

Modified Files

Name
M plugins/oauth2_server/db/install.sql +2 −1 Go to diff View file
A plugins/oauth2_server/db/mysql/2020/202002251140_add_verifier_column_oauth2_app.php +52 −0 Go to diff View file
M plugins/oauth2_server/include/App/AppDao.php +6 −4 Go to diff View file
M plugins/oauth2_server/include/App/ClientIdentifier.php +8 −0 Go to diff View file
A plugins/oauth2_server/include/App/LastCreatedOAuth2App.php +56 −0 Go to diff View file
A plugins/oauth2_server/include/App/LastCreatedOAuth2AppStore.php +90 −0 Go to diff View file
M plugins/oauth2_server/include/App/NewOAuth2App.php +45 −5 Go to diff View file
A plugins/oauth2_server/include/App/PrefixOAuth2ClientSecret.php +36 −0 Go to diff View file
M plugins/oauth2_server/include/ProjectAdmin/AddAppController.php +33 −7 Go to diff View file
A plugins/oauth2_server/include/ProjectAdmin/LastCreatedOAuth2AppPresenter.php +46 −0 Go to diff View file
M plugins/oauth2_server/include/ProjectAdmin/ProjectAdminPresenter.php +12 −5 Go to diff View file
M plugins/oauth2_server/include/ProjectAdmin/ProjectAdminPresenterBuilder.php +34 −4 Go to diff View file
M plugins/oauth2_server/phpunit/App/ClientIdentifierTest.php +11 −0 Go to diff View file
A plugins/oauth2_server/phpunit/App/LastCreatedOAuth2AppStoreTest.php +78 −0 Go to diff View file
M plugins/oauth2_server/phpunit/App/NewOAuth2AppTest.php +25 −6 Go to diff View file
A plugins/oauth2_server/phpunit/App/PrefixOAuth2ClientSecretTest.php +35 −0 Go to diff View file
M plugins/oauth2_server/phpunit/ProjectAdmin/AddAppControllerTest.php +19 −6 Go to diff View file
M plugins/oauth2_server/phpunit/ProjectAdmin/ListAppsControllerTest.php +1 −1 Go to diff View file
M plugins/oauth2_server/phpunit/ProjectAdmin/ProjectAdminPresenterBuilderTest.php +32 −5 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/project-admin.mustache +12 −0 Go to diff View file