Typescript JWK Key return type issues
See original GitHub issueDescribe the bug Currently all return values regarding Keys are typed under the Key interface.
This causes that no Key type specific parameters can be accessed (for example EC Key crv value) in the return values regarding keys.
*To Reproduce
// fill with EC type public / private key
const ecTypeKey = 'EC KEY';
const key = JWK.asKey(ecTypeKey);
// This will cause an error: Property 'crv' does not exist on type 'Key'.
console.log(key.crv);
Expected behaviour Should return proper Key sub type, so parameters can be accessed
Environment:
jose
version: [e.g. v1.22.2]- node version: [e.g. v13.3.0]
Additional context
- This should be implemented to all return values regarding Key type (JWE.completeDecrypt, etc)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Typescript Node.js guide for JWT signing and verifying using ...
Current guide will show how asymmetric keys approach could be used to issue signed JWT token. After this, signed token would be used...
Read more >Type is not assignable to type 'GetVerificationKey' in express ...
So, I can't figure out the solution to this problem. This is the first time of used auth0. Anyone who can solve this...
Read more >Building a verify JWT function in TypeScript
Verifying an RS232 signed JWT JSON Web Tokens (JWT) are used as a way to verify the identity of the caller of an...
Read more >Building a verify JWT function in TypeScript
Verifying an RS256 signed JWT. JSON Web Tokens (JWT) are used as a way to verify the identity of the caller of an...
Read more >RFC 7517: JSON Web Key (JWK)
"kty" values should either be registered in the IANA "JSON Web Key Types" ... reject JWK Sets with duplicate member names or use...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This branch will land with the next 13.x node release. Planned for the 18th
Nice solution in the commit! This can be closed. Thanks!