Sign JWT/JWS
#1595
Replies: 1 comment
-
// For RSA SHA256 Private key
const pgpKey = decryptedPrivateKey.armor()
// convert the pgpKey to pkcs8 via openpgp2ssh
const pkcs8 = ....
// See https://www.rfc-editor.org/rfc/rfc7518#section-3.1
const algo = 'RS256'
const josePrivateKey = await jose.importPKCS8(pkcs8, algo) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does anyone using this library to sign JWT?
I'm using "openpgp" for reading private key and "jose" for signing JWT.
As KeyObject is required for the "jose" library to sign JWT, I would like to know how to convert the private key to KeyObject.
Below is the code snippet.
Beta Was this translation helpful? Give feedback.
All reactions