Class SubjectTokenAuthentication
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.SubjectTokenAuthentication
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication,org.springframework.security.core.CredentialsContainer
public class SubjectTokenAuthentication
extends org.springframework.security.authentication.AbstractAuthenticationToken
The user a token exchange acts for: the principal is the user's access token, which is what Spring Security's token
exchange provider reads as the subject token, and the name is what the authorized clients are cached under.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication
org.springframework.security.core.Authentication.Builder<B extends org.springframework.security.core.Authentication.Builder<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringName the exchanged token is cached under.private static final longSerialization version.private final org.springframework.security.oauth2.core.OAuth2AccessTokenThe user's access token. -
Constructor Summary
ConstructorsConstructorDescriptionSubjectTokenAuthentication(org.springframework.security.oauth2.core.OAuth2AccessToken subjectToken, String name) Creates the authentication. -
Method Summary
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.security.core.Authentication
toBuilder
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version.- See Also:
-
subjectToken
private final org.springframework.security.oauth2.core.OAuth2AccessToken subjectTokenThe user's access token. -
name
Name the exchanged token is cached under.
-
-
Constructor Details
-
SubjectTokenAuthentication
public SubjectTokenAuthentication(org.springframework.security.oauth2.core.OAuth2AccessToken subjectToken, String name) Creates the authentication.- Parameters:
subjectToken- the user's access token.name- name the exchanged token is cached under; it must differ for different subject tokens.
-
-
Method Details