Class OAuth2RefreshTokenGenerator
java.lang.Object
org.springframework.security.oauth2.server.authorization.token.OAuth2RefreshTokenGenerator
- All Implemented Interfaces:
OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2RefreshToken>
public final class OAuth2RefreshTokenGenerator
extends Object
implements OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2RefreshToken>
An
OAuth2TokenGenerator that generates an OAuth2RefreshToken.- Since:
- 0.2.3
- See Also:
-
OAuth2TokenGeneratorOAuth2RefreshToken
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.OAuth2RefreshTokengenerate(OAuth2TokenContext context) Generate an OAuth 2.0 Token using the attributes contained in theOAuth2TokenContext, or returnnullif theOAuth2TokenContext.getTokenType()is not supported.
-
Constructor Details
-
OAuth2RefreshTokenGenerator
public OAuth2RefreshTokenGenerator()
-
-
Method Details
-
generate
@Nullable public org.springframework.security.oauth2.core.OAuth2RefreshToken generate(OAuth2TokenContext context) Description copied from interface:OAuth2TokenGeneratorGenerate an OAuth 2.0 Token using the attributes contained in theOAuth2TokenContext, or returnnullif theOAuth2TokenContext.getTokenType()is not supported.If the returned
OAuth2Tokenhas a set of claims, it should implementClaimAccessorin order for it to be stored with theOAuth2Authorization.- Specified by:
generatein interfaceOAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2RefreshToken>- Parameters:
context- the context containing the OAuth 2.0 Token attributes- Returns:
- an
OAuth2Tokenornullif theOAuth2TokenContext.getTokenType()is not supported
-