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 utilizesSecurityService
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
All Methods Instance Methods Concrete Methods 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)
-
-
-
Constructor Detail
-
SecurityServiceOAuth2RequestFactory
public SecurityServiceOAuth2RequestFactory(SecurityService securityService, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService)
-
-
Method Detail
-
createAuthorizationRequest
public org.springframework.security.oauth2.provider.AuthorizationRequest createAuthorizationRequest(Map<String,String> authorizationParameters)
- Specified by:
createAuthorizationRequest
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.springframework.security.oauth2.provider.OAuth2RequestFactory
-
-