Log a warning when AuthorizationGrantType
does not exactly match a pre-defined constant
#11905
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
type: enhancement
A general enhancement
Expected Behavior
When building a
ClientRegistration
and passing a string to theAuthorizationGrantType
constructor, invalid grant types that match case insensitively with a pre-defined constant could log a warning informing users that it won't match a validOAuth2AuthorizedClientProvider
.Current Behavior
The
AuthorizationGrantType
constructor accepts any string (including a capitalized grant type string, e.g.CLIENT_CREDENTIALS
), assuming it is a custom grant type. This allows an application to start up and load aClientRegistration
without warnings, but does not work as expected because noOAuth2AuthorizedClientProvider
is matched.Context
Issue gh-11897
The text was updated successfully, but these errors were encountered: