Skip to content

Feature/pkce support#1

Merged
mscurtescu merged 6 commits intohellocoop:devfrom
BeAPI:feature/pkce-support
Nov 2, 2022
Merged

Feature/pkce support#1
mscurtescu merged 6 commits intohellocoop:devfrom
BeAPI:feature/pkce-support

Conversation

@mscurtescu
Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

Closes # .

How to test the changes in this Pull Request:

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

petitphp added 6 commits July 11, 2022 15:04
Add new setting to enable/disable PKCE feature. A new constant
OIDC_ENABLE_PKCE is available to force the setting's value.
Update new state creation method to take an additional parameter
with the PKCE code verifier 's value and store it in the state
value.
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.
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.
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.
@mscurtescu mscurtescu merged commit b11a99b into hellocoop:dev Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants