forked from dexidp/dex
-
Notifications
You must be signed in to change notification settings - Fork 2
Try this #6
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
Merged
Merged
Try this #6
Conversation
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
elffjs
pushed a commit
that referenced
this pull request
Jun 27, 2022
* Basic implementation of PKCE Signed-off-by: Tadeusz Magura-Witkowski <[email protected]> * @mfmarche on 24 Feb: when code_verifier is set, don't check client_secret In PKCE flow, no client_secret is used, so the check for a valid client_secret would always fail. Signed-off-by: Bernd Eckstein <[email protected]> * @deric on 16 Jun: return invalid_grant when wrong code_verifier Signed-off-by: Bernd Eckstein <[email protected]> * Enforce PKCE flow on /token when PKCE flow was started on /auth Also dissallow PKCE on /token, when PKCE flow was not started on /auth Signed-off-by: Bernd Eckstein <[email protected]> * fixed error messages when mixed PKCE/no PKCE flow. Signed-off-by: Bernd Eckstein <[email protected]> * server_test.go: Added PKCE error cases on /token endpoint * Added test for invalid_grant, when wrong code_verifier is sent * Added test for mixed PKCE / no PKCE auth flows. Signed-off-by: Bernd Eckstein <[email protected]> * cleanup: extracted method checkErrorResponse and type TestDefinition * fixed connector being overwritten Signed-off-by: Bernd Eckstein <[email protected]> * /token endpoint: skip client_secret verification only for grand type authorization_code with PKCE extension Signed-off-by: Bernd Eckstein <[email protected]> * Allow "Authorization" header in CORS handlers * Adds "Authorization" to the default CORS headers{"Accept", "Accept-Language", "Content-Language", "Origin"} Signed-off-by: Bernd Eckstein <[email protected]> * Add "code_challenge_methods_supported" to discovery endpoint discovery endpoint /dex/.well-known/openid-configuration now has the following entry: "code_challenge_methods_supported": [ "S256", "plain" ] Signed-off-by: Bernd Eckstein <[email protected]> * Updated tests (mixed-up comments), added a PKCE test * @asoorm added test that checks if downgrade to "plain" on /token endpoint Signed-off-by: Bernd Eckstein <[email protected]> * remove redefinition of providedCodeVerifier, fixed spelling (#6) Signed-off-by: Bernd Eckstein <[email protected]> Signed-off-by: Bernd Eckstein <[email protected]> * Rename struct CodeChallenge to PKCE Signed-off-by: Bernd Eckstein <[email protected]> * PKCE: Check clientSecret when available In authorization_code flow with PKCE, allow empty client_secret on /auth and /token endpoints. But check the client_secret when it is given. Signed-off-by: Bernd Eckstein <[email protected]> * Enable PKCE with public: true dex configuration public on staticClients now enables the following behavior in PKCE: - Public: false, PKCE will always check client_secret. This means PKCE in it's natural form is disabled. - Public: true, PKCE is enabled. It will only check client_secret if the client has sent one. But it allows the code flow if the client didn't sent one. Signed-off-by: Bernd Eckstein <[email protected]> * Redirect error on unsupported code_challenge_method - Check for unsupported code_challenge_method after redirect uri is validated, and use newErr() to return the error. - Add PKCE tests to oauth2_test.go Signed-off-by: Bernd Eckstein <[email protected]> * Reverted go.mod and go.sum to the state of master Signed-off-by: Bernd Eckstein <[email protected]> * Don't omit client secret check for PKCE Signed-off-by: Bernd Eckstein <[email protected]> * Allow public clients (e.g. with PKCE) to have redirect URIs configured Signed-off-by: Martin Heide <[email protected]> * Remove "Authorization" as Accepted Headers on CORS, small fixes Signed-off-by: Bernd Eckstein <[email protected]> * Revert "Allow public clients (e.g. with PKCE) to have redirect URIs configured" This reverts commit b6e297b. Signed-off-by: Martin Heide <[email protected]> * PKCE on client_secret client error message * When connecting to the token endpoint with PKCE without client_secret, but the client is configured with a client_secret, generate a special error message. Signed-off-by: Bernd Eckstein <[email protected]> * Output info message when PKCE without client_secret used on confidential client * removes the special error message Signed-off-by: Bernd Eckstein <[email protected]> * General missing/invalid client_secret message on token endpoint Signed-off-by: Bernd Eckstein <[email protected]> Co-authored-by: Tadeusz Magura-Witkowski <[email protected]> Co-authored-by: Martin Heide <[email protected]> Co-authored-by: M. Heide <[email protected]>
elffjs
added a commit
that referenced
this pull request
Jun 27, 2022
For the Web3 flow, return the authorization token directly
elffjs
added a commit
that referenced
this pull request
Aug 17, 2022
For the Web3 flow, return the authorization token directly
elffjs
added a commit
that referenced
this pull request
Nov 8, 2022
For the Web3 flow, return the authorization token directly
elffjs
added a commit
that referenced
this pull request
Apr 4, 2023
For the Web3 flow, return the authorization token directly
elffjs
added a commit
that referenced
this pull request
May 16, 2024
For the Web3 flow, return the authorization token directly
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.
Overview
What this PR does / why we need it
Special notes for your reviewer
Does this PR introduce a user-facing change?