Skip to content

Introduce OAuth2TokenGenerator #628

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

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

jgrandja
Copy link
Collaborator

This PR introduces OAuth2TokenGenerator, enabling an implementation to generate an OAuth2Token.

The initial implementation is JwtGenerator, which consolidates the Jwt encoding logic that existed in the various AuthenticationProvider's and JwtUtils.

The OAuth2TokenGenerator will enable support for Opaque Access Tokens gh-500, which is the next feature up.

Furthermore, the OAuth2TokenGenerator is flexible enough to allow for any type of custom format for access tokens and/or refresh tokens.

Closes gh-414

@jgrandja jgrandja requested a review from sjohnr February 16, 2022 20:43
@jgrandja jgrandja added status: duplicate A duplicate of another issue type: enhancement A general enhancement labels Feb 16, 2022
@jgrandja jgrandja added this to the 0.2.3 milestone Feb 16, 2022
@jgrandja jgrandja self-assigned this Feb 16, 2022
@jgrandja jgrandja force-pushed the gh-414-token-generator branch from 8cb60f0 to 96c1dd2 Compare February 17, 2022 13:10
Copy link
Contributor

@sjohnr sjohnr left a comment

Choose a reason for hiding this comment

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

This looks pretty great so far! I have a few questions below for discussion, that could change something or other (but hopefully won't change much if anything).

@jgrandja jgrandja force-pushed the gh-414-token-generator branch from 96c1dd2 to f201022 Compare February 22, 2022 17:15
@jgrandja jgrandja merged commit c799261 into spring-projects:main Feb 22, 2022
@jgrandja jgrandja deleted the gh-414-token-generator branch February 22, 2022 17:38
* @return the {@link OAuth2AuthorizationServerConfigurer} for further configuration
* @since 0.2.3
*/
public OAuth2AuthorizationServerConfigurer<B> tokenGenerator(OAuth2TokenGenerator<? extends OAuth2Token> tokenGenerator) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

jgrandja added a commit that referenced this pull request Mar 23, 2022
doba16 pushed a commit to doba16/spring-authorization-server that referenced this pull request Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seperate JWT Token generation
2 participants