question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
edouardhuecommented, Jun 27, 2019

Thanks for reopening the issue. I’ll submit a PR soon.

0reactions
edouardhuecommented, Jun 27, 2019

There it is: #7047

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found