Class DefaultOneTimeToken

java.lang.Object
org.springframework.security.authentication.ott.DefaultOneTimeToken
All Implemented Interfaces:
Serializable, OneTimeToken

public class DefaultOneTimeToken extends Object implements OneTimeToken
A default implementation of OneTimeToken.
Since:
6.4
See Also:
  • Constructor Details

    • DefaultOneTimeToken

      public DefaultOneTimeToken(String token, String username, Instant expireAt)
  • Method Details

    • getTokenValue

      public String getTokenValue()
      Description copied from interface: OneTimeToken
      Returns the one-time token value.
      Specified by:
      getTokenValue in interface OneTimeToken
      Returns:
      the one-time token value, never null
    • getUsername

      public String getUsername()
      Description copied from interface: OneTimeToken
      Returns the username associated with this token.
      Specified by:
      getUsername in interface OneTimeToken
      Returns:
      the username associated with this token, never null
    • getExpiresAt

      public Instant getExpiresAt()
      Description copied from interface: OneTimeToken
      Returns the expiration time of the token.
      Specified by:
      getExpiresAt in interface OneTimeToken
      Returns:
      the expiration time of the token