Skip to main content
edited tags
Link
Grokify
  • 16.1k
  • 8
  • 67
  • 89
edited title
Link
Jonathan Hall
  • 78.2k
  • 17
  • 153
  • 200

I have a public key and a JWT, how todo I check if it's valid in Go?

Source Link
David Alsh
  • 7.4k
  • 8
  • 41
  • 74

I have a public key and a JWT, how to I check it's valid in Go?

I have a public key from my identity provider

-----BEGIN PUBLIC KEY-----
THIS
-----END PUBLIC KEY-----

And a JWT token from my client.

How do I check the token against the key? I'm having difficulty with jwt-go because the Parse function takes the token string and a getKey function.

Not sure how exactly to proceed