Class AuthorizationCodeWithPkceTokenGranter
java.lang.Object
org.springframework.security.oauth2.provider.token.AbstractTokenGranter
com.broadleafcommerce.auth.user.session.AuthorizationCodeWithPkceTokenGranter
- All Implemented Interfaces:
org.springframework.security.oauth2.provider.TokenGranter
public class AuthorizationCodeWithPkceTokenGranter
extends org.springframework.security.oauth2.provider.token.AbstractTokenGranter
This is a customized version of
AuthorizationCodeTokenGranter
that helps support the
Proof-Key-for-Code-Exchange enhancement to the Authorization Code Grant flow. Similar to how the
original will "consume" an authorization code, this extension will also verify a
code_verifier
param. This is done according to the
(RFC).- Author:
- Nathan Moore (nathandmoore)
-
Field Summary
Fields inherited from class org.springframework.security.oauth2.provider.token.AbstractTokenGranter
logger
-
Constructor Summary
ModifierConstructorDescriptionAuthorizationCodeWithPkceTokenGranter
(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.code.AuthorizationCodeServices authorizationCodeServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.OAuth2RequestFactory requestFactory) protected
AuthorizationCodeWithPkceTokenGranter
(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.code.AuthorizationCodeServices authorizationCodeServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.OAuth2RequestFactory requestFactory, String grantType) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.oauth2.provider.code.AuthorizationCodeServices
protected org.springframework.security.oauth2.provider.OAuth2Authentication
getOAuth2Authentication
(org.springframework.security.oauth2.provider.ClientDetails client, org.springframework.security.oauth2.provider.TokenRequest tokenRequest) Overriding method to callDefaultAuthorizationCodeServices.consumeAuthorizationCode(String, String)
in support of PKCE.Methods inherited from class org.springframework.security.oauth2.provider.token.AbstractTokenGranter
getAccessToken, getRequestFactory, getTokenServices, grant, validateGrantType
-
Constructor Details
-
AuthorizationCodeWithPkceTokenGranter
public AuthorizationCodeWithPkceTokenGranter(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.code.AuthorizationCodeServices authorizationCodeServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.OAuth2RequestFactory requestFactory) -
AuthorizationCodeWithPkceTokenGranter
protected AuthorizationCodeWithPkceTokenGranter(org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices tokenServices, org.springframework.security.oauth2.provider.code.AuthorizationCodeServices authorizationCodeServices, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.OAuth2RequestFactory requestFactory, String grantType)
-
-
Method Details
-
getOAuth2Authentication
protected org.springframework.security.oauth2.provider.OAuth2Authentication getOAuth2Authentication(org.springframework.security.oauth2.provider.ClientDetails client, org.springframework.security.oauth2.provider.TokenRequest tokenRequest) Overriding method to callDefaultAuthorizationCodeServices.consumeAuthorizationCode(String, String)
in support of PKCE. Otherwise, this is the same asAuthorizationCodeTokenGranter.getOAuth2Authentication(ClientDetails, TokenRequest)
.- Overrides:
getOAuth2Authentication
in classorg.springframework.security.oauth2.provider.token.AbstractTokenGranter
-
getAuthorizationCodeServices
protected org.springframework.security.oauth2.provider.code.AuthorizationCodeServices getAuthorizationCodeServices()
-