My goal is to have a spring boot application utilize a discoverable Oauth2 provider that can be started from any hostname/port in the network. Instead of relying on hardcoded properties such as spring.security.oauth2.client.provider.provider.authorization-uri, the url would be dynamically configured at runtime.

Originally I was looking into providing a custom configuration for InMemoryClientRegistrationRepository and then extending the ClientRegistration class to provide my own ProviderDetails based on the host/port of the Oauth2 provider. However, due to the constructor of ProviderDetails being private, this approach will not work.

Has anyone implemented this through another method? Or are there any best practices that can be used to create this configuration?

Comment From: jzheaux

@allw0rth have you already looked into OIDC Discovery or OAuth 2.0 Metadata? The reason I ask is because this is already supported and might address your needs.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.