Class OTPAuthenticationToken
java.lang.Object
org.oxerr.spring.security.otp.authentication.OTPAuthenticationToken
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication
public class OTPAuthenticationToken
extends Object
implements org.springframework.security.core.Authentication
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.springframework.security.core.Authenticationprivate Stringprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionOTPAuthenticationToken(String oneTimePassword) OTPAuthenticationToken(org.springframework.security.core.Authentication authentication) -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority>getName()booleanvoidsetAuthenticated(boolean isAuthenticated) voidsetOneTimePassword(String oneTimePassword)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
oneTimePassword
-
authentication
private org.springframework.security.core.Authentication authentication
-
-
Constructor Details
-
OTPAuthenticationToken
-
OTPAuthenticationToken
public OTPAuthenticationToken(org.springframework.security.core.Authentication authentication)
-
-
Method Details
-
getOneTimePassword
-
setOneTimePassword
-
getName
-
getAuthorities
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getDetails
- Specified by:
getDetailsin interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
- Specified by:
setAuthenticatedin interfaceorg.springframework.security.core.Authentication- Throws:
IllegalArgumentException
-