Class KeycloakAuthenticationToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.keycloak.adapters.springsecurity.token.KeycloakAuthenticationToken
- All Implemented Interfaces:
Serializable
,Principal
,org.springframework.security.core.Authentication
,org.springframework.security.core.CredentialsContainer
public class KeycloakAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
implements org.springframework.security.core.Authentication
Represents the token for a Keycloak authentication request or for an authenticated principal once the request has been
processed by the
AuthenticationManager.authenticate(Authentication)
.- Version:
- $Revision: 1 $
- Author:
- Scott Rossillo
- See Also:
-
Constructor Summary
ConstructorDescriptionKeycloakAuthenticationToken
(KeycloakAccount account, boolean interactive) Creates a new, unauthenticated Keycloak security token for the given account.KeycloakAuthenticationToken
(KeycloakAccount account, boolean interactive, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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 org.springframework.security.core.Authentication
getAuthorities, getDetails, isAuthenticated, setAuthenticated
-
Constructor Details
-
KeycloakAuthenticationToken
Creates a new, unauthenticated Keycloak security token for the given account. -
KeycloakAuthenticationToken
public KeycloakAuthenticationToken(KeycloakAccount account, boolean interactive, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
-
-
Method Details
-
getCredentials
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
getAccount
-
isInteractive
public boolean isInteractive()
-