stable

Clone or download

Read-only

Move OAuth2 access tokens table in the oauth2_server plugin

No functional change is expected from this contribution. This is a technical change to move the DB tables in the OAuth2 server plugin. This change is needed because the access token needs to know which authorization they are related to. Without moving all the data we will end up with data duplication and/or far too many events between the core and the plugin. This is part of story #14542: have OAuth2 flow Change-Id: Ie8a0ae8bd7c9387dda859f3c1b7c7afc49eceb41

Modified Files

Name
M plugins/oauth2_server/db/install.sql +15 −7 Go to diff View file
A plugins/oauth2_server/db/mysql/2020/202003161445_create_access_token_tables.php +57 −0 Go to diff View file
A plugins/oauth2_server/db/mysql/2020/202003161500_drop_authorization_code_access_token_table.php +40 −0 Go to diff View file
M plugins/oauth2_server/db/uninstall.sql +2 −3 Go to diff View file
D plugins/oauth2_server/include/AccessToken/OAuth2AccessTokenAuthorizationGrantAssociationDAO.php +0 −41 Go to diff View file
M plugins/oauth2_server/include/AccessToken/OAuth2AccessTokenCreator.php +9 −20 Go to diff View file
R src/common/User/OAuth2/AccessToken/OAuth2AccessTokenDAO.php Go to diff View file
R src/common/User/OAuth2/AccessToken/OAuth2AccessTokenVerifier.php Go to diff View file
R src/common/User/OAuth2/AccessToken/Scope/OAuth2AccessTokenScopeDAO.php Go to diff View file
R src/common/User/OAuth2/AccessToken/Scope/OAuth2AccessTokenScopeRetriever.php Go to diff View file
M plugins/oauth2_server/include/AccessToken/Scope/OAuth2AccessTokenScopeSaver.php +0 −1 Go to diff View file
M plugins/oauth2_server/include/Grant/AuthorizationCode/AuthorizationCodeGrantResponseBuilder.php +0 −1 Go to diff View file
M plugins/oauth2_server/include/Grant/AuthorizationCode/OAuth2AuthorizationCodeDAO.php +3 −4 Go to diff View file
M plugins/oauth2_server/include/oauth2_serverPlugin.php +33 −21 Go to diff View file
M plugins/oauth2_server/phpunit/AccessToken/OAuth2AccessTokenCreatorTest.php +2 −14 Go to diff View file
R tests/phpunit/common/User/OAuth2/AccessToken/OAuth2AccessTokenVerifierTest.php Go to diff View file
R tests/phpunit/common/User/OAuth2/AccessToken/Scope/OAuth2AccessTokenScopeRetrieverTest.php Go to diff View file
M plugins/oauth2_server/phpunit/AccessToken/Scope/OAuth2AccessTokenScopeSaverTest.php +0 −1 Go to diff View file
M plugins/oauth2_server/tests/integration/Grant/AuthorizationCode/OAuth2AuthorizationCodeDAOTest.php +7 −18 Go to diff View file
M src/common/REST/UserManager.class.php +12 −19 Go to diff View file
A src/common/User/OAuth2/AccessToken/VerifyOAuth2AccessTokenEvent.php +88 −0 Go to diff View file
M src/common/User/OAuth2/ResourceServer/OAuth2ResourceServerMiddleware.php +12 −10 Go to diff View file
M src/db/mysql/database_structure.sql +0 −14 Go to diff View file
A src/db/mysql/updates/2020/202003161450_drop_oauth2_access_token_tables.php +41 −0 Go to diff View file
A tests/phpunit/common/User/OAuth2/AccessToken/VerifyOAuth2AccessTokenEventTest.php +89 −0 Go to diff View file
M tests/phpunit/common/User/OAuth2/ResourceServer/OAuth2ResourceServerMiddlewareTest.php +17 −12 Go to diff View file