Closed michaelakin closed 2 years ago
hi! here's the code:
which then calls:
hence the exception.
Can you try this:
new RS256Algorithm(rsaPrivateKey, rsaPrivateKey)
Can you try this:
new RS256Algorithm(rsaPrivateKey, rsaPrivateKey)
Thanks, that did not throw the exception, but I was still not able to connect. Is it using BOTH keys to encrypt, or just 1?
It uses the public to validate and the private to encrypt.
Ok, so why does it require both if I am just encoding?
It just wasn't a scenario so far discussed/supported. Another reason - tecnicaal, there are two ctors:
So I can't add a third one:
Since they would clash.
Btw can you just pass the certificate itself?
I haven't tried that option I guess.
I am trying to create a bearer token with an RSA Private key according to NetSuite's documentation:
but I Can't figure out how to construct the api call.
Here is what I have so far.
I get an error that the public key must not be null, but I don't have a public key, but I DO have a Certificate.
Here is the command I was told to use to create the certificate and the private key:
openssl req -x509 -newkey rsa:4096 -sha256 -keyout auth-key.pem -out auth-cert.pem -nodes -days 730
How can I get this package to sign with only a Private key?