Class 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

      All Methods Instance Methods Concrete Methods 
      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
    • Constructor Detail

      • 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 Detail

      • 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: