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
ConstructorDescriptionTMAPIAuthenticationToken
(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 TypeMethodDescriptioncom.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
-
Constructor Details
-
TMAPIAuthenticationToken
Creates an unauthenticated token.- Parameters:
principal
- the principal to be associated with this authentication object (cannot benull
)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 benull
)credentials
- the credentials to be associated with this authentication objectauthorities
- the collection ofGrantedAuthority
s for the principaldetails
- additional details for the authentication requestauthResponse
- the authentication response from the TM API
-
-
Method Details
-
getCredentials
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipal
in interfaceorg.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 interfaceorg.springframework.security.core.Authentication
- Overrides:
isAuthenticated
in classorg.springframework.security.authentication.AbstractAuthenticationToken
-