Class TMAPIAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
nl.b3p.planmonitorwonen.api.security.TMAPIAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class TMAPIAuthenticationToken extends org.springframework.security.authentication.AbstractAuthenticationToken implements org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    TMAPIAuthenticationToken(Object principal, Object credentials)
    Creates an unauthenticated token.
    TMAPIAuthenticationToken(Object principal, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, Object details, com.fasterxml.jackson.databind.node.ObjectNode authResponse)
    Creates an authenticated token with the supplied principal, credentials and array of authorities.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.node.ObjectNode
     
     
     
    boolean
     
    void
    setAuthResponse(com.fasterxml.jackson.databind.node.ObjectNode authResponse)
     

    Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, setAuthenticated, setDetails, toString

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.springframework.security.core.Authentication

    getAuthorities, getDetails, setAuthenticated

    Methods inherited from interface org.springframework.security.core.CredentialsContainer

    eraseCredentials

    Methods inherited from interface java.security.Principal

    equals, getName, hashCode, implies, toString
  • Constructor Details

    • TMAPIAuthenticationToken

      public TMAPIAuthenticationToken(Object principal, Object credentials)
      Creates an unauthenticated token.
      Parameters:
      principal - the principal to be associated with this authentication object (cannot be null)
      credentials - the credentials to be associated with this authentication object
    • TMAPIAuthenticationToken

      public TMAPIAuthenticationToken(Object principal, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, Object details, com.fasterxml.jackson.databind.node.ObjectNode authResponse)
      Creates an authenticated token with the supplied principal, credentials and array of authorities.
      Parameters:
      principal - the principal to be associated with this authentication object (cannot be null)
      credentials - the credentials to be associated with this authentication object
      authorities - the collection of GrantedAuthoritys for the principal
      details - additional details for the authentication request
      authResponse - the authentication response from the TM API
  • Method Details

    • getCredentials

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

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

      public com.fasterxml.jackson.databind.node.ObjectNode getAuthResponse()
    • setAuthResponse

      public void setAuthResponse(com.fasterxml.jackson.databind.node.ObjectNode authResponse)
    • isAuthenticated

      public boolean isAuthenticated()
      Specified by:
      isAuthenticated in interface org.springframework.security.core.Authentication
      Overrides:
      isAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationToken