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

    Constructors
    Constructor
    Description
    EmbeddedLoginTokenGranter(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 Type
    Method
    Description
    protected org.springframework.security.oauth2.provider.OAuth2Authentication
    getOAuth2Authentication(org.springframework.security.oauth2.provider.ClientDetails client, org.springframework.security.oauth2.provider.TokenRequest tokenRequest)
    Use the EmbeddedLoginTokenEndpointAuthenticationToken to create a OAuth2Authentication to be used in AuthorizationServerTokenServices.createAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication)
    org.springframework.security.oauth2.common.OAuth2AccessToken
    grant(String grantType, org.springframework.security.oauth2.provider.TokenRequest tokenRequest)
     

    Methods inherited from class org.springframework.security.oauth2.provider.token.AbstractTokenGranter

    getAccessToken, getRequestFactory, getTokenServices, validateGrantType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.springframework.security.oauth2.provider.TokenGranter
      Overrides:
      grant in class org.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 the EmbeddedLoginTokenEndpointAuthenticationToken to create a OAuth2Authentication to be used in AuthorizationServerTokenServices.createAccessToken(org.springframework.security.oauth2.provider.OAuth2Authentication)
      Overrides:
      getOAuth2Authentication in class org.springframework.security.oauth2.provider.token.AbstractTokenGranter
      Parameters:
      client -
      tokenRequest -
      Returns:
      An OAuth2Authentication that can be used to create access tokens