-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Provide ability to customize claims in Jwt Client Assertion #9855
Comments
@christophejan We are looking to merge gh-9208 for |
@sjohnr This is what I'm thinking for the customization hook: public final class NimbusJwtClientAuthenticationParametersConverter<T extends AbstractOAuth2AuthorizationGrantRequest>
implements Converter<T, MultiValueMap<String, String>> {
...
public void setJwtClientAssertionCustomizer(Consumer<JwtClientAuthenticationContext<T>> jwtClientAssertionCustomizer) {
}
public static final class JwtClientAuthenticationContext<T> {
T getAuthorizationGrantRequest() {
}
JwsHeader.Builder getHeaders() {
}
JwtClaimsSet.Builder getClaims() {
}
}
... Use this as a starting point and see how it turns out. Thanks! |
@christophejan @marcerik @iamlothian @chenrujun We just merged support for customizing headers/claims in the JWT Client Assertion in gh-10972. |
Currently spring security OAuth 2.0 client use provider details token uri as value for JWT aud claim of the assertion in OAuth 2.0 Client Authentication.
rfc 7523 say :
Rfc say may, not must. I would like to be able to use another value (I have to call a oauth 2 server that require a value different from the token url).
Current spring security behavior is provided by NimbusJwtClientAuthenticationParametersConverter. Overriding it’s behavior requires to copy/paste hundreds of lines as it’s a final class and it use many package-private classes.
Related gh-9208
The text was updated successfully, but these errors were encountered: