Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extensions for token persistence removal feature #2091

Merged
merged 16 commits into from
Sep 9, 2023

Conversation

dushaniw
Copy link
Contributor

@dushaniw dushaniw commented Jun 7, 2023

Proposed changes in this pull request

This PR is added as a part of removing token persistence efforts in wso2/api-manager#1664.

  • Provide external DAO layer plugin capability for AccessTokenDAO and TokenManagementDAO
    Added a method to load external data access logic for AccessTokenDao and TokenManagementDao layers. With this change, APIM team hopes to plug a custom AccessTokenDAO and TokenManagementDAO implementation to support the mentioned feature.

  • Add abstraction layer for Revoke flow to separate token persistence operations

    Added an abstraction layer to separate out the token dao layer access. This way, we could plug custom DAO access logic to facilitate the token persistence-related feature.
    In this pr, an interface OAuth2RevocationProcessor.java is introduced and the existing implementation parts are moved to the default class DefaultOAuth2RevocationProcessor.java

  • Add abstraction layer for Refresh grant flow to separate token persistence operations
    Added a method to plug custom logic for Refresh grant handler. Reason for introducing this is because the refresh token generated in this effort is a JWT token and we need to remove token validation steps that refer stored access tokens when generating access tokens from refresh grant. This PR introduced an interface RefreshTokenGrantProcessor.java and moved the default extracted logic from RefreshGrantHandler.java to DefaultRefreshTokenGrantProcessor.java. Custom implementation can be plugged in as a service by implementing RefreshTokenGrantProcessor.java interface. If no service is registered, default DefaultRefreshTokenGrantProcessor.java is applied.

@dushaniw dushaniw changed the title Add extensions for teken persistence removal feature Add extensions for token persistence removal feature Jun 7, 2023
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/5275323134

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/5275323134
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/5275323134

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/6107073090

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/6107073090
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/6107073090

@chamathns chamathns merged commit 632c3ad into wso2-extensions:master Sep 9, 2023
2 checks passed
dushaniw added a commit to dushaniw/identity-inbound-auth-oauth that referenced this pull request Jan 26, 2024
dushaniw added a commit to dushaniw/identity-inbound-auth-oauth that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants