Class OAuth2RefreshToken
- java.lang.Object
-
- org.springframework.security.oauth2.core.AbstractOAuth2Token
-
- org.springframework.security.oauth2.core.OAuth2RefreshToken
-
- africa.absa.inception.oauth2.server.authorization.token.OAuth2RefreshToken
-
- All Implemented Interfaces:
Serializable,org.springframework.security.oauth2.core.OAuth2Token
public class OAuth2RefreshToken extends org.springframework.security.oauth2.core.OAuth2RefreshTokenThe OAuth2RefreshToken class holds the information for an OAuth2 refresh token.- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringSCOPE_CLAIMThe name of the scope claim.
-
Constructor Summary
Constructors Constructor Description OAuth2RefreshToken(String tokenValue, Instant issuedAt)Constructs a new OAuth2RefreshToken.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OAuth2RefreshTokenbuild(String username, Set<String> scopes, int validFor, RSAPrivateKey rsaPrivateKey)Build a new OAuth2RefreshToken.
-
-
-
Field Detail
-
SCOPE_CLAIM
public static final String SCOPE_CLAIM
The name of the scope claim.- See Also:
- Constant Field Values
-
-
Method Detail
-
build
public static OAuth2RefreshToken build(String username, Set<String> scopes, int validFor, RSAPrivateKey rsaPrivateKey)
Build a new OAuth2RefreshToken.- Parameters:
username- the username for the user the token is being issued forscopes- the optional scope(s) associated to the tokenvalidFor- the number of seconds the token should be valid forrsaPrivateKey- the RSA private key used to sign the token- Returns:
- the OAuth2 refresh token
-
-