Class PowerAuthTokenAuthenticationImpl
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
io.getlime.security.powerauth.rest.api.spring.authentication.PowerAuthTokenAuthenticationImpl
- All Implemented Interfaces:
PowerAuthAuthentication,PowerAuthTokenAuthentication,java.io.Serializable,java.security.Principal,org.springframework.security.core.Authentication,org.springframework.security.core.CredentialsContainer
public class PowerAuthTokenAuthenticationImpl extends org.springframework.security.authentication.AbstractAuthenticationToken implements PowerAuthTokenAuthentication
Implementation of the
PowerAuthTokenAuthentication interface, with Spring Security objects.- Author:
- Petr Dvorak, petr@wultra.com
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description PowerAuthTokenAuthenticationImpl()Default constructor -
Method Summary
Modifier and Type Method Description java.lang.ObjectgetCredentials()io.getlime.security.powerauth.http.PowerAuthHttpHeadergetHttpHeader()Get parsed PowerAuth HTTP header.java.lang.StringgetNonce()Get token related nonce.java.lang.ObjectgetPrincipal()java.lang.StringgetTimestamp()Get token creation timestamp.java.lang.StringgetTokenDigest()Get token digest.java.lang.StringgetTokenId()Get token ID.java.lang.StringgetVersion()Get PowerAuth protocol version.voidsetHttpHeader(io.getlime.security.powerauth.http.PowerAuthHttpHeader httpHeader)Set parsed PowerAuth HTTP header.voidsetNonce(java.lang.String nonce)Set token related nonce.voidsetTimestamp(java.lang.String timestamp)Set token creation timestamp.voidsetTokenDigest(java.lang.String tokenDigest)Set token digest.voidsetTokenId(java.lang.String tokenId)Set token ID.voidsetVersion(java.lang.String version)Set PowerAuth protocol version.Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.security.Principal
implies
-
Constructor Details
-
PowerAuthTokenAuthenticationImpl
public PowerAuthTokenAuthenticationImpl()Default constructor
-
-
Method Details
-
getPrincipal
public java.lang.Object getPrincipal()- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
getCredentials
public java.lang.Object getCredentials()- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getTokenId
public java.lang.String getTokenId()Get token ID.- Specified by:
getTokenIdin interfacePowerAuthTokenAuthentication- Returns:
- Token ID.
-
setTokenId
public void setTokenId(java.lang.String tokenId)Set token ID.- Specified by:
setTokenIdin interfacePowerAuthTokenAuthentication- Parameters:
tokenId- Token ID.
-
getTokenDigest
public java.lang.String getTokenDigest()Get token digest.- Specified by:
getTokenDigestin interfacePowerAuthTokenAuthentication- Returns:
- Token digest.
-
setTokenDigest
public void setTokenDigest(java.lang.String tokenDigest)Set token digest.- Specified by:
setTokenDigestin interfacePowerAuthTokenAuthentication- Parameters:
tokenDigest- Token digest.
-
getNonce
public java.lang.String getNonce()Get token related nonce.- Specified by:
getNoncein interfacePowerAuthTokenAuthentication- Returns:
- Nonce.
-
setNonce
public void setNonce(java.lang.String nonce)Set token related nonce.- Specified by:
setNoncein interfacePowerAuthTokenAuthentication- Parameters:
nonce- Nonce.
-
getTimestamp
public java.lang.String getTimestamp()Get token creation timestamp.- Specified by:
getTimestampin interfacePowerAuthTokenAuthentication- Returns:
- Token timestamp.
-
setTimestamp
public void setTimestamp(java.lang.String timestamp)Set token creation timestamp.- Specified by:
setTimestampin interfacePowerAuthTokenAuthentication- Parameters:
timestamp- Token timestamp.
-
getVersion
public java.lang.String getVersion()Get PowerAuth protocol version.- Specified by:
getVersionin interfacePowerAuthTokenAuthentication- Returns:
- PowerAuth protocol version.
-
setVersion
public void setVersion(java.lang.String version)Set PowerAuth protocol version.- Specified by:
setVersionin interfacePowerAuthTokenAuthentication- Parameters:
version- PowerAuth protocol version.
-
getHttpHeader
public io.getlime.security.powerauth.http.PowerAuthHttpHeader getHttpHeader()Get parsed PowerAuth HTTP header.- Specified by:
getHttpHeaderin interfacePowerAuthTokenAuthentication- Returns:
- PowerAuth HTTP header.
-
setHttpHeader
public void setHttpHeader(io.getlime.security.powerauth.http.PowerAuthHttpHeader httpHeader)Set parsed PowerAuth HTTP header.- Specified by:
setHttpHeaderin interfacePowerAuthTokenAuthentication- Parameters:
httpHeader- PowerAuth HTTP header.
-