You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know much about DPoP, but looking at the RFC, it seems like JWTs are used in DPoP, not the other way around. So this library should be able to help you implement DPoP, but there may not be a specific DPoP support added here.
I think generating a JWK is definitely within the scope of this library, but I am not sure that I know what that particular method would look like or why it would be useful. It would take some designing.
Activity
bshaffer commentedon Nov 21, 2023
I don't know much about DPoP, but looking at the RFC, it seems like JWTs are used in DPoP, not the other way around. So this library should be able to help you implement DPoP, but there may not be a specific DPoP support added here.
rbro commentedon Jan 9, 2025
I believe DPoP requires you to create your own JWK. Is creating a JWK something that could be added to php-jwt?
bshaffer commentedon Jan 9, 2025
You can create a JWT using this library. That and validating JWTs are this library's main function.
See JWT::encode
https://github.com/firebase/php-jwt/blob/29fa2ce9e0582cd397711eec1e80c05ce20fabca/src/JWT.php#L199
rbro commentedon Jan 9, 2025
I believe DPoP requires you to create your own JWK, not JWT. At least from looking at this tutorial - https://developer.okta.com/docs/guides/dpop/nonoktaresourceserver/main
bshaffer commentedon Feb 11, 2025
@rbro
I think generating a JWK is definitely within the scope of this library, but I am not sure that I know what that particular method would look like or why it would be useful. It would take some designing.
bshaffer commentedon Oct 30, 2026
Closing this out as DPoP (RFC 9449) can already be implemented using
JWT::encode(),JWK::parseKey(), andJWT::decode().To create and verify a DPoP proof JWT today (e.g. with
ES256), extract the public key coordinates from OpenSSL to build thejwkheader:I also opened draft PR #9835 to explore adding a
JWK::createFromKey()helper for exporting keys to JWK arrays directly.