Class PowerAuthTokenAuthenticationImpl
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
io.getlime.security.powerauth.rest.api.spring.authentication.impl.PowerAuthTokenAuthenticationImpl
- All Implemented Interfaces:
PowerAuthAuthentication,PowerAuthTokenAuthentication,Serializable,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 ObjectgetCredentials()io.getlime.security.powerauth.http.PowerAuthHttpHeadergetHttpHeader()Get parsed PowerAuth HTTP header.StringgetNonce()Get token related nonce.ObjectgetPrincipal()StringgetTimestamp()Get token creation timestamp.StringgetTokenDigest()Get token digest.StringgetTokenId()Get token ID.StringgetVersion()Get PowerAuth protocol version.voidsetHttpHeader(io.getlime.security.powerauth.http.PowerAuthHttpHeader httpHeader)Set parsed PowerAuth HTTP header.voidsetNonce(String nonce)Set token related nonce.voidsetTimestamp(String timestamp)Set token creation timestamp.voidsetTokenDigest(String tokenDigest)Set token digest.voidsetTokenId(String tokenId)Set token ID.voidsetVersion(String version)Set PowerAuth protocol version.Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
PowerAuthTokenAuthenticationImpl
public PowerAuthTokenAuthenticationImpl()Default constructor
-
-
Method Details
-
getPrincipal
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getTokenId
Get token ID.- Specified by:
getTokenIdin interfacePowerAuthTokenAuthentication- Returns:
- Token ID.
-
setTokenId
Set token ID.- Specified by:
setTokenIdin interfacePowerAuthTokenAuthentication- Parameters:
tokenId- Token ID.
-
getTokenDigest
Get token digest.- Specified by:
getTokenDigestin interfacePowerAuthTokenAuthentication- Returns:
- Token digest.
-
setTokenDigest
Set token digest.- Specified by:
setTokenDigestin interfacePowerAuthTokenAuthentication- Parameters:
tokenDigest- Token digest.
-
getNonce
Get token related nonce.- Specified by:
getNoncein interfacePowerAuthTokenAuthentication- Returns:
- Nonce.
-
setNonce
Set token related nonce.- Specified by:
setNoncein interfacePowerAuthTokenAuthentication- Parameters:
nonce- Nonce.
-
getTimestamp
Get token creation timestamp.- Specified by:
getTimestampin interfacePowerAuthTokenAuthentication- Returns:
- Token timestamp.
-
setTimestamp
Set token creation timestamp.- Specified by:
setTimestampin interfacePowerAuthTokenAuthentication- Parameters:
timestamp- Token timestamp.
-
getVersion
Get PowerAuth protocol version.- Specified by:
getVersionin interfacePowerAuthTokenAuthentication- Returns:
- PowerAuth protocol version.
-
setVersion
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.
-