Class TwoFactorAuthenticationToken

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

    public class TwoFactorAuthenticationToken
    extends org.springframework.security.authentication.UsernamePasswordAuthenticationToken
    Holds the api token, passed by the client via a custom HTTP header
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TwoFactorAuthenticationToken​(java.lang.Object principal, java.lang.Object credentials, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, java.lang.String verificationCode, java.lang.String secretKey)  
      TwoFactorAuthenticationToken​(java.lang.String verificationCode, java.lang.String secretKey)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSecretKey()  
      java.lang.String getVerificationCode()  
      • Methods inherited from class org.springframework.security.authentication.UsernamePasswordAuthenticationToken

        eraseCredentials, getCredentials, getPrincipal, setAuthenticated
      • Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

        equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setDetails, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.security.Principal

        implies
    • Constructor Detail

      • TwoFactorAuthenticationToken

        public TwoFactorAuthenticationToken​(java.lang.Object principal,
                                            java.lang.Object credentials,
                                            java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities,
                                            java.lang.String verificationCode,
                                            java.lang.String secretKey)
      • TwoFactorAuthenticationToken

        public TwoFactorAuthenticationToken​(java.lang.String verificationCode,
                                            java.lang.String secretKey)
    • Method Detail

      • getVerificationCode

        public java.lang.String getVerificationCode()
      • getSecretKey

        public java.lang.String getSecretKey()