-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Implement reactive support for JWT Client Authentication #10146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Milestone
Comments
My workaround: public class WebClientReactiveClientCredentialsTokenResponseClientConverter extends WebClientReactiveClientCredentialsTokenResponseClient
{
private Converter<OAuth2ClientCredentialsGrantRequest, RequestEntity< ? >> requestEntityConverter = new OAuth2ClientCredentialsGrantRequestEntityConverter(); ... private BodyInserters.FormInserter<String> createTokenRequestBody(OAuth2ClientCredentialsGrantRequest grantRequest)
{
ClientRegistration clientRegistration = clientRegistration(grantRequest);
if (ClientAuthenticationMethod.PRIVATE_KEY_JWT.equals(clientRegistration.getClientAuthenticationMethod()))
{
MultiValueMap<String, String> request = (MultiValueMap<String, String>) this.requestEntityConverter
.convert(grantRequest)
.getBody();
return BodyInserters.fromFormData(request);
}
BodyInserters.FormInserter<String> body = BodyInserters
.fromFormData(OAuth2ParameterNames.GRANT_TYPE, grantRequest.getGrantType().getValue());
return populateTokenRequestBody(grantRequest, body);
} configured with:
|
sjohnr
pushed a commit
to sjohnr/spring-security
that referenced
this issue
Oct 6, 2021
…cessTokenResponseClient This adds support for configuring NimbusJwtClientAuthenticationParametersConverter to any AbstractWebClientReactiveOAuth2AccessTokenResponseClient as an additional parameters converter, which in turns adds reactive support for jwt client authentication. Closes spring-projectsgh-10146
sjohnr
pushed a commit
that referenced
this issue
Oct 6, 2021
…cessTokenResponseClient This adds support for configuring NimbusJwtClientAuthenticationParametersConverter to any AbstractWebClientReactiveOAuth2AccessTokenResponseClient as an additional parameters converter, which in turns adds reactive support for jwt client authentication. Closes gh-10146
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
This ticket addresses the reactive support for gh-8175.
The text was updated successfully, but these errors were encountered: