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.OAuth2RefreshToken
The OAuth2RefreshToken class holds the information for an OAuth2 refresh token.
Author:
Marcus Portmann
See Also:
  • Field Details

  • Constructor Details

    • OAuth2RefreshToken

      public OAuth2RefreshToken(String tokenValue, Instant issuedAt)
      Constructs a new OAuth2RefreshToken.
      Parameters:
      tokenValue - the token value
      issuedAt - the time at which the token was issued
  • Method Details

    • 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 for
      scopes - the optional scope(s) associated to the token
      validFor - the number of seconds the token should be valid for
      rsaPrivateKey - the RSA private key used to sign the token
      Returns:
      the OAuth2 refresh token