Description
It would be nice to have a means to add entries or modify entries in the ClientRegistration.ProviderDetails.configurationMetadata
The method ClientRegistrations.fromOidcIssuerLocation
returns a ClientRegistration.Builder
which can be used to further modify the ClientRegistration
. The providerConfigurationMetadata
can also be overridden, but since it contains a Map, those values returned by the call to the ".well-known" endpoint will be lost.
.providerConfigurationMetadata(
Collections.singletonMap("end_session_endpoint", "https://myprovider/oidc/logout")
)
Since build()
copies the values into an `unmodifiableMap', the Map also cannot be updated afterwards.
clientRegistration.getProviderDetails().getConfigurationMetadata()
.put("end_session_endpoint", "https://myprovider/oidc/logout");
....
java.lang.UnsupportedOperationException
at java.util.Collections$UnmodifiableMap.put(Unknown Source)
My particular use case is to be able to customize the value of the "end_session_endpoint" which is stored in the providerConfigurationMetadata
, but this might also be a handy place to store custom values which otherwise would require extending ClientRegistration
.