Repository navigation
Encode OAuth 2 client credentials by default - #2161
Merged
Merged
Conversation
Form-encode the client ID and secret before HTTP Basic authentication by default, as required by RFC 6749, section 2.3.1. The urlEncodeClientCredentials(false) builder option allows to opt out for OAuth 2 servers that do not decode the credentials. The encoding now happens in the provider instead of the builder, so the constructors use it as well. A new constructor overload accepts the flag; existing constructors encode by default. The Basic authentication header now uses UTF-8 instead of ISO-8859-1, and null client ID or secret is rejected with an IllegalArgumentException at creation time. References #2160
acogoluegnes
force-pushed
the
oauth2-encode-client-credentials-by-default
branch
from
November 9, 2026 09:08
97069c1 to
1601860
Compare
acogoluegnes
marked this pull request as ready for review
November 9, 2026 10:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Form-encode the client ID and secret before HTTP Basic authentication by default, as required by RFC 6749, section 2.3.1. The urlEncodeClientCredentials(false) builder option allows to opt out for OAuth 2 servers that do not decode the credentials.
The encoding now happens in the provider instead of the builder, so the constructors use it as well. A new constructor overload accepts the flag; existing constructors encode by default.
The Basic authentication header now uses UTF-8 instead of ISO-8859-1, and null client ID or secret is rejected at creation time.
References #2160