Skip to content
Discussion options

You must be logged in to vote

Sorry for the late reply; @mrbanzai I'm a bit confused what your usecase is.
Are you trying to do this?

isValidKeyFor( kid, []byte / *ecdsa.PrivateKey / ...) // --> true
isValidKey( kid, MyAwesomeKey ) // --> false

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.

isValidKey( []byte / *ecdsa.PrivateKey / *rsa.PrivateKey / .... etc ....) // --> true

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…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mrbanzai
Comment options

Answer selected by mrbanzai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants