Class SecurityServiceOAuth2RequestFactory

java.lang.Object
com.broadleafcommerce.auth.security.service.SecurityServiceOAuth2RequestFactory
All Implemented Interfaces:
org.springframework.security.oauth2.provider.OAuth2RequestFactory

public class SecurityServiceOAuth2RequestFactory extends Object implements org.springframework.security.oauth2.provider.OAuth2RequestFactory
A custom request factory implementation that utilizes SecurityService to check that the requested scopes are valid for the request and current user.
Author:
Nick Crum (ncrum)
  • Constructor Summary

    Constructors
    Constructor
    Description
    SecurityServiceOAuth2RequestFactory(SecurityService securityService, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.oauth2.provider.AuthorizationRequest
    createAuthorizationRequest(Map<String,String> authorizationParameters)
     
    org.springframework.security.oauth2.provider.OAuth2Request
    createOAuth2Request(org.springframework.security.oauth2.provider.AuthorizationRequest request)
     
    org.springframework.security.oauth2.provider.OAuth2Request
    createOAuth2Request(org.springframework.security.oauth2.provider.ClientDetails client, org.springframework.security.oauth2.provider.TokenRequest tokenRequest)
     
    org.springframework.security.oauth2.provider.TokenRequest
    createTokenRequest(Map<String,String> tokenParameters, org.springframework.security.oauth2.provider.ClientDetails authenticatedClient)
     
    org.springframework.security.oauth2.provider.TokenRequest
    createTokenRequest(org.springframework.security.oauth2.provider.AuthorizationRequest authorizationRequest, String grantType)
     
    protected Set<String>
    getRequestedScopes(Map<String,String> authorizationParameters, org.springframework.security.oauth2.provider.ClientDetails clientDetails)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SecurityServiceOAuth2RequestFactory

      public SecurityServiceOAuth2RequestFactory(SecurityService securityService, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService)
  • Method Details

    • createAuthorizationRequest

      public org.springframework.security.oauth2.provider.AuthorizationRequest createAuthorizationRequest(Map<String,String> authorizationParameters)
      Specified by:
      createAuthorizationRequest in interface org.springframework.security.oauth2.provider.OAuth2RequestFactory
    • createOAuth2Request

      public org.springframework.security.oauth2.provider.OAuth2Request createOAuth2Request(org.springframework.security.oauth2.provider.AuthorizationRequest request)
      Specified by:
      createOAuth2Request in interface org.springframework.security.oauth2.provider.OAuth2RequestFactory
    • createTokenRequest

      public org.springframework.security.oauth2.provider.TokenRequest createTokenRequest(Map<String,String> tokenParameters, org.springframework.security.oauth2.provider.ClientDetails authenticatedClient)
      Specified by:
      createTokenRequest in interface org.springframework.security.oauth2.provider.OAuth2RequestFactory
    • createTokenRequest

      public org.springframework.security.oauth2.provider.TokenRequest createTokenRequest(org.springframework.security.oauth2.provider.AuthorizationRequest authorizationRequest, String grantType)
      Specified by:
      createTokenRequest in interface org.springframework.security.oauth2.provider.OAuth2RequestFactory
    • createOAuth2Request

      public org.springframework.security.oauth2.provider.OAuth2Request createOAuth2Request(org.springframework.security.oauth2.provider.ClientDetails client, org.springframework.security.oauth2.provider.TokenRequest tokenRequest)
      Specified by:
      createOAuth2Request in interface org.springframework.security.oauth2.provider.OAuth2RequestFactory
    • getRequestedScopes

      protected Set<String> getRequestedScopes(Map<String,String> authorizationParameters, org.springframework.security.oauth2.provider.ClientDetails clientDetails)