Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is secret when using RSA keypair #340

Closed
schowdhury opened this issue Nov 20, 2019 · 5 comments
Closed

What is secret when using RSA keypair #340

schowdhury opened this issue Nov 20, 2019 · 5 comments

Comments

@schowdhury
Copy link

Hello, curious what is the "secret" per JWT spec when using RSA keypair

@cpb
Copy link

cpb commented Nov 20, 2019 via email

@cpb
Copy link

cpb commented Nov 20, 2019

Or even this very project's readme example specs

it 'RSA' do
rsa_private = OpenSSL::PKey::RSA.generate 2048
rsa_public = rsa_private.public_key
token = JWT.encode payload, rsa_private, 'RS256'
decoded_token = JWT.decode token, rsa_public, true, algorithm: 'RS256'
expect(decoded_token).to eq [
{ 'data' => 'test' },
{ 'alg' => 'RS256' }
]
end

@cpb
Copy link

cpb commented Dec 12, 2019

@schowdhury does that help?

@anakinj
Copy link
Member

anakinj commented Oct 6, 2022

Going to close this one. Lets just open a new issue if there is some need to improve docs.

@anakinj anakinj closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants