Class EmbeddedLoginCodeAuthenticationToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
com.broadleafcommerce.auth.authorization.security.embedded.code.EmbeddedLoginCodeAuthenticationToken
- All Implemented Interfaces:
Serializable
,Principal
,org.springframework.security.core.Authentication
,org.springframework.security.core.CredentialsContainer
public class EmbeddedLoginCodeAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
Authentication Request Token for the
OAuth2TokenEndpointFilter
when using Embedded Login.- Author:
- Cade Rea (cade-rea)
- See Also:
-
Constructor Summary
ConstructorDescriptionEmbeddedLoginCodeAuthenticationToken
(String clientId, String username, Set<String> requestedScopes, String code, String purpose, Map<String, Object> additionalParameters) Constructor for pre-authentication usage.EmbeddedLoginCodeAuthenticationToken
(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, OAuth2UserDetails userDetails, String clientId, String username, Set<String> requestedScopes, String purpose, Map<String, Object> additionalParameters) Constructor for post-authentication. -
Method Summary
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
eraseCredentials, getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
EmbeddedLoginCodeAuthenticationToken
public EmbeddedLoginCodeAuthenticationToken(String clientId, String username, Set<String> requestedScopes, String code, String purpose, Map<String, Object> additionalParameters) Constructor for pre-authentication usage. Sets authenticated to false.- Parameters:
clientId
- The client_id from the request.username
- The User's username.requestedScopes
- The scope of the authentication.code
- The one-time passcode used for authentication.purpose
- The purpose of the one-time passcode used for authentication.
-
EmbeddedLoginCodeAuthenticationToken
public EmbeddedLoginCodeAuthenticationToken(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, OAuth2UserDetails userDetails, String clientId, String username, Set<String> requestedScopes, String purpose, Map<String, Object> additionalParameters) Constructor for post-authentication. Sets authenticated to true.- Parameters:
authorities
- The authorities to grant to the useruserDetails
- The id of the userclientId
- The client_id from the request.username
- The User's username.requestedScopes
- The scope of the authentication.purpose
- The purpose of the one-time passcode used for authentication.
-
-
Method Details
-
getCredentials
-
getPrincipal
-
getClientId
-
getUsername
-
getUserDetails
-
getRequestedScopes
-
getCode
-
getPurpose
-
getAdditionalParameters
-
equals
-
canEqual
-
hashCode
public int hashCode()
-