Having trouble formatting private key for RSA signature #952
-
the error I get:
This doesn't make sense to me, as I believe I am using the signWith(SignatureAlgorithm, Key) method. I suspect there is some minor mistake in my code that I have missed. I am having trouble finding the documentation in the readme, and in google web searches for where I am going wrong. I tried some of the signing key format changes shown in The Docs, but I could not find the dependencies for the classes used. The code I am running (Please note, this is groovyscript, so some syntax may not be correct for pure java):
This seems to work fine for generating a token when using HS256, however I need RS256 for the service I am trying to interact with. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Was able to figure this out with help from: Stack overflow, and switching to import org.apache.commons.codec.binary.Base64 for the decoder.
|
Beta Was this translation helpful? Give feedback.
Was able to figure this out with help from: Stack overflow, and switching to import org.apache.commons.codec.binary.Base64 for the decoder.