Skip to content
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

Implemented the DPoP token exchange #411

Merged
merged 12 commits into from Oct 13, 2020
Merged

Implemented the DPoP token exchange #411

merged 12 commits into from Oct 13, 2020

Conversation

NSeydoux
Copy link
Contributor

This implements the OAuth2 code exchange step: after an auth code has been returned by the IdP through redirection, the client can use the obtained auth code to get an access token. If the request has a DPoP header, the returned token is bound to the DPoP key.

  • All acceptance criteria are met.
  • New functions/types have been exported in index.ts, if applicable.
  • Commits in this PR are minimal and have descriptive commit messages.

@NSeydoux NSeydoux requested review from Vinnl and pmcb55 October 12, 2020 11:00
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 12, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 77e1054:

Sandbox Source
solid-client-auth-browser-demo Configuration

Copy link
Contributor

@Vinnl Vinnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clear code, good job 👍

Base automatically changed from feat/dpop/cleanup to 1.x October 12, 2020 12:27
This implements the OAuth2 code exchange step: after an auth code has been returned by the IdP through redirection, the client can use the obtained auth code to get an access token. If the request has a DPoP header, the returned token is bound to the DPoP key.
@vercel vercel bot temporarily deployed to Preview October 12, 2020 12:35 Inactive
Co-authored-by: Vincent <Vinnl@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview October 12, 2020 13:09 Inactive
@vercel vercel bot temporarily deployed to Preview October 12, 2020 13:13 Inactive
The mockJwk reference is unefined when setting up the mock, but the mockJwk() function is defined when *calling* the mock. Thanks @Vinnl !
@vercel vercel bot temporarily deployed to Preview October 12, 2020 13:54 Inactive
Co-authored-by: Vincent <Vinnl@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview October 12, 2020 16:24 Inactive
The oidc module is independant from solid, so it should not depend on the core module, which is meant to be solid-specific. this implies some redundancy in the types implemented in both places, but that means that these types may evolve independantly, while still getting errors in case of incompatibility, which is a good thing.
The endpoint returns a token_type field, which can be used to verify that the token is of the requested type (Bearer or DPoP)
Importing jest requires to change the jest config, so all the modules should be updated.
@vercel vercel bot temporarily deployed to Preview October 13, 2020 06:32 Inactive
Copy link
Contributor

@pmcb55 pmcb55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just minor comments, and a question on the Basic Auth issue.

@vercel vercel bot temporarily deployed to Preview October 13, 2020 13:30 Inactive
@vercel vercel bot temporarily deployed to Preview October 13, 2020 13:54 Inactive
@NSeydoux NSeydoux merged commit 66b8839 into 1.x Oct 13, 2020
@NSeydoux NSeydoux deleted the feat/dpop/request-token branch October 13, 2020 14:09
NSeydoux added a commit that referenced this pull request Oct 13, 2020
- This implements the OAuth2 code exchange step: after an auth code has been returned by the IdP through redirection, the client can use the obtained auth code to get an access token. If the request has a DPoP header, the returned token is bound to the DPoP key.
- The mockJwk reference is unefined when setting up the mock, but the mockJwk() function is defined when *calling* the mock. Thanks @Vinnl !
- The oidc module is independant from solid, so it should not depend on the core module, which is meant to be solid-specific. this implies some redundancy in the types implemented in both places, but that means that these types may evolve independantly, while still getting errors in case of incompatibility, which is a good thing.
- The endpoint returns a token_type field, which can be used to verify that the token is of the requested type (Bearer or DPoP)

Co-authored-by: Vincent <Vinnl@users.noreply.github.com>
NSeydoux added a commit that referenced this pull request Oct 21, 2020
- This implements the OAuth2 code exchange step: after an auth code has been returned by the IdP through redirection, the client can use the obtained auth code to get an access token. If the request has a DPoP header, the returned token is bound to the DPoP key.
- The mockJwk reference is unefined when setting up the mock, but the mockJwk() function is defined when *calling* the mock. Thanks @Vinnl !
- The oidc module is independant from solid, so it should not depend on the core module, which is meant to be solid-specific. this implies some redundancy in the types implemented in both places, but that means that these types may evolve independantly, while still getting errors in case of incompatibility, which is a good thing.
- The endpoint returns a token_type field, which can be used to verify that the token is of the requested type (Bearer or DPoP)

Co-authored-by: Vincent <Vinnl@users.noreply.github.com>
NSeydoux added a commit that referenced this pull request Oct 21, 2020
- This implements the OAuth2 code exchange step: after an auth code has been returned by the IdP through redirection, the client can use the obtained auth code to get an access token. If the request has a DPoP header, the returned token is bound to the DPoP key.
- The mockJwk reference is unefined when setting up the mock, but the mockJwk() function is defined when *calling* the mock. Thanks @Vinnl !
- The oidc module is independant from solid, so it should not depend on the core module, which is meant to be solid-specific. this implies some redundancy in the types implemented in both places, but that means that these types may evolve independantly, while still getting errors in case of incompatibility, which is a good thing.
- The endpoint returns a token_type field, which can be used to verify that the token is of the requested type (Bearer or DPoP)

Co-authored-by: Vincent <Vinnl@users.noreply.github.com>
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.

None yet

4 participants