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.Object getCredentials()  
    io.getlime.security.powerauth.http.PowerAuthHttpHeader getHttpHeader()
    Get parsed PowerAuth HTTP header.
    java.lang.String getNonce()
    Get token related nonce.
    java.lang.Object getPrincipal()  
    java.lang.String getTimestamp()
    Get token creation timestamp.
    java.lang.String getTokenDigest()
    Get token digest.
    java.lang.String getTokenId()
    Get token ID.
    java.lang.String getVersion()
    Get PowerAuth protocol version.
    void setHttpHeader​(io.getlime.security.powerauth.http.PowerAuthHttpHeader httpHeader)
    Set parsed PowerAuth HTTP header.
    void setNonce​(java.lang.String nonce)
    Set token related nonce.
    void setTimestamp​(java.lang.String timestamp)
    Set token creation timestamp.
    void setTokenDigest​(java.lang.String tokenDigest)
    Set token digest.
    void setTokenId​(java.lang.String tokenId)
    Set token ID.
    void setVersion​(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, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.security.Principal

    implies
  • Constructor Details

    • PowerAuthTokenAuthenticationImpl

      public PowerAuthTokenAuthenticationImpl()
      Default constructor
  • Method Details

    • getPrincipal

      public java.lang.Object getPrincipal()
      Specified by:
      getPrincipal in interface org.springframework.security.core.Authentication
    • getCredentials

      public java.lang.Object getCredentials()
      Specified by:
      getCredentials in interface org.springframework.security.core.Authentication
    • getTokenId

      public java.lang.String getTokenId()
      Get token ID.
      Specified by:
      getTokenId in interface PowerAuthTokenAuthentication
      Returns:
      Token ID.
    • setTokenId

      public void setTokenId​(java.lang.String tokenId)
      Set token ID.
      Specified by:
      setTokenId in interface PowerAuthTokenAuthentication
      Parameters:
      tokenId - Token ID.
    • getTokenDigest

      public java.lang.String getTokenDigest()
      Get token digest.
      Specified by:
      getTokenDigest in interface PowerAuthTokenAuthentication
      Returns:
      Token digest.
    • setTokenDigest

      public void setTokenDigest​(java.lang.String tokenDigest)
      Set token digest.
      Specified by:
      setTokenDigest in interface PowerAuthTokenAuthentication
      Parameters:
      tokenDigest - Token digest.
    • getNonce

      public java.lang.String getNonce()
      Get token related nonce.
      Specified by:
      getNonce in interface PowerAuthTokenAuthentication
      Returns:
      Nonce.
    • setNonce

      public void setNonce​(java.lang.String nonce)
      Set token related nonce.
      Specified by:
      setNonce in interface PowerAuthTokenAuthentication
      Parameters:
      nonce - Nonce.
    • getTimestamp

      public java.lang.String getTimestamp()
      Get token creation timestamp.
      Specified by:
      getTimestamp in interface PowerAuthTokenAuthentication
      Returns:
      Token timestamp.
    • setTimestamp

      public void setTimestamp​(java.lang.String timestamp)
      Set token creation timestamp.
      Specified by:
      setTimestamp in interface PowerAuthTokenAuthentication
      Parameters:
      timestamp - Token timestamp.
    • getVersion

      public java.lang.String getVersion()
      Get PowerAuth protocol version.
      Specified by:
      getVersion in interface PowerAuthTokenAuthentication
      Returns:
      PowerAuth protocol version.
    • setVersion

      public void setVersion​(java.lang.String version)
      Set PowerAuth protocol version.
      Specified by:
      setVersion in interface PowerAuthTokenAuthentication
      Parameters:
      version - PowerAuth protocol version.
    • getHttpHeader

      public io.getlime.security.powerauth.http.PowerAuthHttpHeader getHttpHeader()
      Get parsed PowerAuth HTTP header.
      Specified by:
      getHttpHeader in interface PowerAuthTokenAuthentication
      Returns:
      PowerAuth HTTP header.
    • setHttpHeader

      public void setHttpHeader​(io.getlime.security.powerauth.http.PowerAuthHttpHeader httpHeader)
      Set parsed PowerAuth HTTP header.
      Specified by:
      setHttpHeader in interface PowerAuthTokenAuthentication
      Parameters:
      httpHeader - PowerAuth HTTP header.