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
Modifier and TypeFieldDescriptionprivate org.springframework.security.core.Authentication
private String
private static final long
-
Constructor Summary
ConstructorDescriptionOTPAuthenticationToken
(String oneTimePassword) OTPAuthenticationToken
(org.springframework.security.core.Authentication authentication) -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority>
getName()
boolean
void
setAuthenticated
(boolean isAuthenticated) void
setOneTimePassword
(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:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getDetails
- Specified by:
getDetails
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
- Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Throws:
IllegalArgumentException
-