Class EmbeddedLoginTokenGranter
java.lang.Object
org.springframework.security.oauth2.provider.token.AbstractTokenGranter
com.broadleafcommerce.auth.user.session.embedded.EmbeddedLoginTokenGranter
- All Implemented Interfaces:
org.springframework.security.oauth2.provider.TokenGranter
public class EmbeddedLoginTokenGranter
extends org.springframework.security.oauth2.provider.token.AbstractTokenGranter
Used for token requests where there is an
EmbeddedLoginTokenEndpointAuthenticationToken
in the security context.- Author:
- Cade Rea (cade-rea)
-
Field Summary
Fields inherited from class org.springframework.security.oauth2.provider.token.AbstractTokenGranter
logger
-
Constructor Summary
ConstructorDescriptionEmbeddedLoginTokenGranter
(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.OAuth2RequestFactory requestFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.oauth2.provider.OAuth2Authentication
getOAuth2Authentication
(org.springframework.security.oauth2.provider.ClientDetails client, org.springframework.security.oauth2.provider.TokenRequest tokenRequest) Use theEmbeddedLoginTokenEndpointAuthenticationToken
to create aOAuth2Authentication
to be used inAuthorizationServerTokenServices.createAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication)
org.springframework.security.oauth2.common.OAuth2AccessToken
Methods inherited from class org.springframework.security.oauth2.provider.token.AbstractTokenGranter
getAccessToken, getRequestFactory, getTokenServices, validateGrantType
-
Constructor Details
-
EmbeddedLoginTokenGranter
public EmbeddedLoginTokenGranter(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.OAuth2RequestFactory requestFactory)
-
-
Method Details
-
grant
public org.springframework.security.oauth2.common.OAuth2AccessToken grant(String grantType, org.springframework.security.oauth2.provider.TokenRequest tokenRequest) - Specified by:
grant
in interfaceorg.springframework.security.oauth2.provider.TokenGranter
- Overrides:
grant
in classorg.springframework.security.oauth2.provider.token.AbstractTokenGranter
-
getOAuth2Authentication
protected org.springframework.security.oauth2.provider.OAuth2Authentication getOAuth2Authentication(org.springframework.security.oauth2.provider.ClientDetails client, org.springframework.security.oauth2.provider.TokenRequest tokenRequest) Use theEmbeddedLoginTokenEndpointAuthenticationToken
to create aOAuth2Authentication
to be used inAuthorizationServerTokenServices.createAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication)
- Overrides:
getOAuth2Authentication
in classorg.springframework.security.oauth2.provider.token.AbstractTokenGranter
- Parameters:
client
-tokenRequest
-- Returns:
- An OAuth2Authentication that can be used to create access tokens
-