Replies: 1 comment 1 reply
-
Hi @ekosz This is very similar to #172
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi again,
I was wondering if
jose
would be open to a PR that updates howSignJWT
works. Currently, if the "alg" header is missing during the signing,jose
throws an error. But, for certainKeyLike
's (namely,KeyObject
andCryptoKey
) we should be able to to do something like the opposite of what's happening ingenerate.ts
to figure out what the "alg" header should set to given a private key.Would this project be open to a PR that either:
KeyLike
and returns?string
of the correct "alg" headerUse case: I'm writing an internal library for my company right now for my company using
jose
. The current API tries to hide all the details of the signing and decoding of JWTs. It current takes in an array ofKeyObject
s as its only param. This works for creating of the JWK set, asfromKeyLike
already is able to take in aKeyLike
and set the "kty" header. But the same doesn't happen for signing and "alg". I think this would be a nice addition tojose
and require less code to be written in userland.Beta Was this translation helpful? Give feedback.
All reactions