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
ConstructorDescriptionSecurityServiceOAuth2RequestFactory
(SecurityService securityService, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService) -
Method Summary
Modifier and TypeMethodDescriptionorg.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) getRequestedScopes
(Map<String, String> authorizationParameters, org.springframework.security.oauth2.provider.ClientDetails clientDetails)
-
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 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
-
getRequestedScopes
-