Skip to content
This repository was archived by the owner on Aug 26, 2026. It is now read-only.
This repository was archived by the owner on Aug 26, 2026. It is now read-only.

Add client-certificate when fetching client-jwks #1788

Description

@edwinrozendom

Expected Behavior

We would like to add a client-certificate to the outbound request when fetching a JwkSetUrl from a configured client.

Current Behavior

RestTemplate is a static final variable in JwtClientAssertionDecoderFactory.java. It would be nice to expose Resttemplate, in order to configure it with the authorizationServerConfigurer. (same suggestion as in #1413)

The exposed method could be used in the authorizationServerConfigurer.AuthenticationProvider, e.g.

authenticationProviders.forEach((authenticationProvider) -> {
			if (authenticationProvider instanceof JwtClientAssertionAuthenticationProvider) {
				// Customize JwtClientAssertionDecoderFactory
				JwtClientAssertionDecoderFactory jwtDecoderFactory = new JwtClientAssertionDecoderFactory();
                                jwtDecoderFactory.setRestTemplate(...).

}
}

Context

This issue only affects oAuth flows with private_key_jwt client authentication.

I would be able to create a PR if the suggestion of exposing RestTemplate is acceptable!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions