-
Notifications
You must be signed in to change notification settings - Fork 153
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
PKCE support #421
Open
petitphp
wants to merge
8
commits into
oidc-wp:develop
Choose a base branch
from
BeAPI:feature/pkce-support
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
PKCE support #421
Commits on Mar 22, 2024
-
Add new setting to enable/disable PKCE feature. A new constant OIDC_ENABLE_PKCE is available to force the setting's value.
Configuration menu - View commit details
-
Copy full SHA for 4fbe3df - Browse repository at this point
Copy the full SHA 4fbe3dfView commit details -
Store code verifier when creating a new state
Update new state creation method to take an additional parameter with the PKCE code verifier 's value and store it in the state value.
Configuration menu - View commit details
-
Copy full SHA for 31cb707 - Browse repository at this point
Copy the full SHA 31cb707View commit details -
Add method to generate PKCE code challenge
The method will try to generate a code verifier (a random ASCII string) and a code challenge (SHA256 hash of the verifier) and return an array with them and the method use to create the code challenge. If the code verifier generation fails the method will return false.
Configuration menu - View commit details
-
Copy full SHA for 022bcce - Browse repository at this point
Copy the full SHA 022bcceView commit details -
Add PKCE code challenge to the authentication url
This is the first step when integrating PKCE into the authentication workflow. When building the authentication URL a new code verifier and challenge are created, the code verifier is store in the state to be accessible at a later stage and the challenge is added as a query param to the URL along side the method use to generate the challenge from the verifier.
Configuration menu - View commit details
-
Copy full SHA for b2b9505 - Browse repository at this point
Copy the full SHA b2b9505View commit details -
Add the verifier to the auth token request
This is the second step when integrating PKCE into the authentication workflow. Add the code verifier to the auth token request's body. Code verifier is retieved from the state object created when building the authentication URL.
Configuration menu - View commit details
-
Copy full SHA for 4c3c42d - Browse repository at this point
Copy the full SHA 4c3c42dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 931b960 - Browse repository at this point
Copy the full SHA 931b960View commit details -
Configuration menu - View commit details
-
Copy full SHA for 550e0aa - Browse repository at this point
Copy the full SHA 550e0aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c3ea74e - Browse repository at this point
Copy the full SHA c3ea74eView commit details
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.