-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefer HTTP basic authentication in OAuth2 client #9127
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2fca870
prefer HTTP Basic to Request Body
crush-157 bdbe08d
updated and formatted code and tests
crush-157 bbf42da
added comment to client
crush-157 b845d6a
enum camel case
crush-157 4f332b2
switched to using HTTP::Client#basic_auth
crush-157 c61767f
reverting to one shot HTTP::Client.post
crush-157 e828a7f
added token_uri to path
crush-157 59fa6dd
Update src/oauth2/client.cr
crush-157 0b1e676
Update src/oauth2/client.cr
crush-157 6bca6b8
Update src/oauth2/client.cr
crush-157 ebdb3fe
Update src/oauth2/auth_scheme.cr
crush-157 f4ed39c
Update src/oauth2/auth_scheme.cr
crush-157 54a8f68
Update spec/std/oauth2/client_spec.cr
crush-157 25b31ad
replaced 'expected' with inlined values, as per Sija's suggestion
crush-157 e6e11a6
Switched get_token_uri back to token_uri as per Sija's comment.
crush-157 744f4db
Replaced private accessors with direct access to instance variables a…
crush-157 ab806ca
Corrected format.
crush-157 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Enum of supported mechanisms used to pass credentials to the server. | ||
# | ||
# According to https://tools.ietf.org/html/rfc6749#section-2.3.1: | ||
# | ||
# > "Including the client credentials in the request-body using the | ||
# > two parameters is NOT RECOMMENDED and SHOULD be limited to | ||
# > clients unable to directly utilize the HTTP Basic authentication | ||
# > scheme (or other password-based HTTP authentication schemes)." | ||
# | ||
# Therefore, HTTP Basic is preferred, and Request Body should only | ||
# be used if the server does not support HTTP Basic. | ||
enum OAuth2::AuthScheme | ||
HTTPBasic | ||
RequestBody | ||
end |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a newline missing after this line?