Closed rchatsiri closed 1 year ago
I think https://github.com/Keats/jsonwebtoken/pull/267 will do what you want?
The question may be unclear. In finally step we must add the json of jwk
variable into DecodingKey::from_jwk(&jwk).unwrap()
. How we create the json data such modules data by using the library? An example like below.
let jwk = Jwk::from_pem(public_key.as_ref()).unwrap();
let res = decode::<Claims>(
&encrypted,
&DecodingKey::from_jwk(&jwk).unwrap(),
&Validation::new(Algorithm::EdDSA),
);
assert!(res.is_ok());
You can't create JWK with this library, only consume them.
Hello contributor,
I see on example declares JWK list set by constant value( string value fixed) example such as
The example such python using the
jwcrypto
library return the key informatione
andn
value for decode token with 'n' and 'e' values.The value on
public_key
variable return information about key information such 'kty', 'n' , 'e', 'kid' and 'all'. How we can get JWK from PEM format fromjsonwebtoken
library?