Class JaasAuthenticationToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.UsernamePasswordAuthenticationToken
org.springframework.security.authentication.jaas.JaasAuthenticationToken
- All Implemented Interfaces:
Serializable
,Principal
,Authentication
,CredentialsContainer
UsernamePasswordAuthenticationToken extension to carry the Jaas LoginContext that the
user was logged into
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionJaasAuthenticationToken
(Object principal, @Nullable Object credentials, List<GrantedAuthority> authorities, LoginContext loginContext) JaasAuthenticationToken
(Object principal, @Nullable Object credentials, LoginContext loginContext) protected
-
Method Summary
Methods inherited from class org.springframework.security.authentication.UsernamePasswordAuthenticationToken
authenticated, eraseCredentials, getCredentials, getPrincipal, setAuthenticated, unauthenticated
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setDetails, toString
-
Constructor Details
-
JaasAuthenticationToken
public JaasAuthenticationToken(Object principal, @Nullable Object credentials, LoginContext loginContext) -
JaasAuthenticationToken
public JaasAuthenticationToken(Object principal, @Nullable Object credentials, List<GrantedAuthority> authorities, LoginContext loginContext) -
JaasAuthenticationToken
-
-
Method Details
-
getLoginContext
-
toBuilder
Description copied from interface:Authentication
Return anAuthentication.Builder
based on this instance. By default, returns a builder that builds aSimpleAuthentication
.Although a
default
method, allAuthentication
implementations should implement this. The reason is to ensure that theAuthentication
type is preserved whenAuthentication.Builder.build()
is invoked. This is especially important in the event that your authentication implementation contains custom fields.This isn't strictly necessary since it is recommended that applications code to the
Authentication
interface and that custom information is often contained in theAuthentication.getPrincipal()
value.- Specified by:
toBuilder
in interfaceAuthentication
- Overrides:
toBuilder
in classUsernamePasswordAuthenticationToken
- Returns:
- an
Authentication.Builder
for building a newAuthentication
based on this instance
-