Can't use a custom authorization grant type in a ClientRegistration
See original GitHub issueSummary
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
- Define a custom
org.springframework.security.oauth2.core.AuthorizationGrantType
. - 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
authorizationGrantType cannot be null in Spring Security 5 ...
I've found the reason, for custom OAuth2 providers, such as Gitlab, I have to add grant type, redirectUritemplate, scope, clientName etc, but ...
Read more >Authorization Grant Support :: Spring Security
The default implementation builds a MultiValueMap<String, String> containing only the grant_type parameter of a standard OAuth 2.0 Access Token Request which is ...
Read more >How to Use Client Credentials Flow with Spring Security
Learn how to use OAuth 2.0's client credentials grant to communicate between apps secured by Spring Security.
Read more >Spring WebClient and OAuth2 Support - Baeldung
Learn how to set up an application as an OAuth2 Client and use the WebClient ... grant type, and then using the 'Authorization...
Read more >Authorization code grant :: AM 7.2.0 - ForgeRock Backstage
Grant Types : Authorization Code. For more information, see Client registration. Perform the steps in this procedure to obtain an authorization code using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reopening the issue. I’ll submit a PR soon.
There it is: #7047