Skip to content

Allow customization of Provider Configuration Metadata for Client Registration #7695

Closed
@pthorson

Description

@pthorson

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.

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions