Skip to content

Can't use a custom authorization grant type in a ClientRegistration #7040

Closed
@edouardhue

Description

@edouardhue

Summary

Documentation suggests that defining additional grant types should be supported. Though, the ClientRegistration builder won't validate a registration using a custom grant type.

Actual Behavior

  1. Define a custom org.springframework.security.oauth2.core.AuthorizationGrantType.
  2. Build a org.springframework.security.oauth2.client.registration.ClientRegistration with this custom type.

When calling build(), any unsupported grant type is validated as an authorization code grant type, and it fails.

Expected Behavior

Custom grant type should not be validated with the wrong validator. It could be nice to be able to provide a custom validator.

Version

spring-security-oauth2-client 5.1.5.RELEASE

Sample

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions