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, unauthenticatedMethods 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:AuthenticationReturn anAuthentication.Builderbased on this instance. By default, returns a builder that builds aSimpleAuthentication.Although a
defaultmethod, allAuthenticationimplementations should implement this. The reason is to ensure that theAuthenticationtype 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
Authenticationinterface and that custom information is often contained in theAuthentication.getPrincipal()value.- Specified by:
toBuilderin interfaceAuthentication- Overrides:
toBuilderin classUsernamePasswordAuthenticationToken- Returns:
- an
Authentication.Builderfor building a newAuthenticationbased on this instance
-