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

feat: Add ES256 support to JWK #399

Merged
merged 12 commits into from Jul 14, 2022
Merged

feat: Add ES256 support to JWK #399

merged 12 commits into from Jul 14, 2022

Conversation

bshaffer
Copy link
Collaborator

@bshaffer bshaffer commented Feb 9, 2022

See #339

Adds support for parsing EC256 JWKs

You can test this branch by running the following command:

composer require firebase/php-jwt:dev-add-ec-jwk-support

Then in your code, use as you normally would:

$jwk = ["keys": [["kty" => "EC","use" => "sig","crv" => "P-256", "kid" => "jwk1", "x": => "abc..", "y" => "xyz..", "alg" => "ES256"]]];
$keys = JWK::parseKeySet($jwk);
$decoded = JWT::decode($ecJwt, $keys);

@bshaffer bshaffer changed the title feat: Add EC256 support to JWK feat: Add ES256 support to JWK Feb 16, 2022
@glen-84
Copy link

glen-84 commented Apr 13, 2022

Could this be backported to 6.0.x?

@bshaffer
Copy link
Collaborator Author

@glen-84 What is your use-case? You'd like to see this supported in a version <= PHP 7.1?

@dunglas
Copy link

dunglas commented Apr 14, 2022

I tested this branch while implement Solid Client PHP and it worked as expected.

See also jumbojett/OpenID-Connect-PHP#287.

@glen-84
Copy link

glen-84 commented Apr 14, 2022

@bshaffer,

@glen-84 What is your use-case? You'd like to see this supported in a version <= PHP 7.1?

Ya, we're currently stuck on PHP 7.0 for a while.

Edit: We're on 7.4 now, FWIW.

@ivaxer
Copy link

ivaxer commented Jul 5, 2022

@bshaffer Could you tell me please why this PR is not merged? Can I help?

@bshaffer bshaffer merged commit 64ed2e5 into main Jul 14, 2022
@bshaffer bshaffer deleted the add-ec-jwk-support branch July 14, 2022 22:17
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