Class OAuth2SessionAuthenticationToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
com.broadleafcommerce.auth.user.session.OAuth2SessionAuthenticationToken
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication,org.springframework.security.core.CredentialsContainer
public class OAuth2SessionAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
An
Authentication implementation that is designed for simple presentation of an OAuth2
clientId, and JWT session token.- Author:
- Nick Crum (ncrum)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2SessionAuthenticationToken(OAuth2SessionToken sessionToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) This constructor should only be used byAuthenticationManagerorAuthenticationProviderimplementations that are satisfied with producing a trusted (i.e.OAuth2SessionAuthenticationToken(OAuth2SessionToken sessionToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, Object principal) This constructor should only be used byAuthenticationManagerorAuthenticationProviderimplementations that are satisfied with producing a trusted (i.e.OAuth2SessionAuthenticationToken(String clientId, String tokenValue) This constructor can be safely used by any code that wishes to create aOAuth2ClientAuthenticationToken, as theAbstractAuthenticationToken.isAuthenticated()will returnfalse. -
Method Summary
Modifier and TypeMethodDescriptionThe OAuth2 client ID.getToken()The JWT token from the BLSID-[client_id] session cookie.Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
OAuth2SessionAuthenticationToken
This constructor can be safely used by any code that wishes to create aOAuth2ClientAuthenticationToken, as theAbstractAuthenticationToken.isAuthenticated()will returnfalse. -
OAuth2SessionAuthenticationToken
public OAuth2SessionAuthenticationToken(OAuth2SessionToken sessionToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) This constructor should only be used byAuthenticationManagerorAuthenticationProviderimplementations that are satisfied with producing a trusted (i.e.AbstractAuthenticationToken.isAuthenticated()=true) authentication token.- Parameters:
authorities-
-
OAuth2SessionAuthenticationToken
public OAuth2SessionAuthenticationToken(OAuth2SessionToken sessionToken, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, Object principal) This constructor should only be used byAuthenticationManagerorAuthenticationProviderimplementations that are satisfied with producing a trusted (i.e.AbstractAuthenticationToken.isAuthenticated()=true) authentication token.- Parameters:
authorities-
-
-
Method Details
-
getTokenValue
-
getCredentials
-
getPrincipal
-
getClientId
The OAuth2 client ID. -
getToken
The JWT token from the BLSID-[client_id] session cookie.
-