-
|
I've spent a lot of time reading through the My use case is an internal toolkit / wrapper library that we're attempting to migrate to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
To clarify somewhat, I understand that the definition of "usable" ultimately depends on the signing algorithm, so obviously we have to rely on the |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the late reply; @mrbanzai I'm a bit confused what your usecase is. isValidKeyFor( kid, []byte / *ecdsa.PrivateKey / ...) // --> true
isValidKey( kid, MyAwesomeKey ) // --> falseBut since the mapping between kid and the key type can only be validated by the application, you're probably asking if, given a key, jwx supports it? e.g. isValidKey( []byte / *ecdsa.PrivateKey / *rsa.PrivateKey / .... etc ....) // --> trueI don't believe we have anything like that as public API. This is because since jwx allows algorithms and key types to be registered later, it's pretty hard to have a "definitive" list of supported key types. This is compounded by the fact that, for example, x25519 keys could be represented as EC keys (for encryption) or EdDSA keys (for signing). I'm sure there could be some way to implement it, but right now I have the feeling that supporting this long term would be more maintenance work than it's worth (at least for me :). You are welcome to convince me otherwise, though; I'm not against the idea, but I'm not yet convinced I'm ready to maintain it. |
Beta Was this translation helpful? Give feedback.
Sorry for the late reply; @mrbanzai I'm a bit confused what your usecase is.
Are you trying to do this?
But since the mapping between kid and the key type can only be validated by the application, you're probably asking if, given a key, jwx supports it? e.g.
I don't believe we have anything like that as public API. This is because since jwx allows algorithms and key types to be registered later, it's pretty hard to have a "definitive" list of supported key types. This is compounded by the fact t…