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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.security.core.Authentication
authentication
private String
oneTimePassword
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description OTPAuthenticationToken(String oneTimePassword)
OTPAuthenticationToken(org.springframework.security.core.Authentication authentication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends org.springframework.security.core.GrantedAuthority>
getAuthorities()
Object
getCredentials()
Object
getDetails()
String
getName()
String
getOneTimePassword()
Object
getPrincipal()
boolean
isAuthenticated()
void
setAuthenticated(boolean isAuthenticated)
void
setOneTimePassword(String oneTimePassword)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
oneTimePassword
private String oneTimePassword
-
authentication
private org.springframework.security.core.Authentication authentication
-
-
Constructor Detail
-
OTPAuthenticationToken
public OTPAuthenticationToken(String oneTimePassword)
-
OTPAuthenticationToken
public OTPAuthenticationToken(org.springframework.security.core.Authentication authentication)
-
-
Method Detail
-
getOneTimePassword
public String getOneTimePassword()
-
setOneTimePassword
public void setOneTimePassword(String oneTimePassword)
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
-
getCredentials
public Object getCredentials()
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getDetails
public Object getDetails()
- Specified by:
getDetails
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
public Object getPrincipal()
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()
- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException
- Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Throws:
IllegalArgumentException
-
-