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

Improve "header" docs #10

Open
palmerabollo opened this issue Jan 21, 2017 · 6 comments
Open

Improve "header" docs #10

palmerabollo opened this issue Jan 21, 2017 · 6 comments

Comments

@palmerabollo
Copy link
Member

In the readme, it is not clear what you should put in the header variable.

@nagarjun
Copy link

@palmerabollo Did you figure out what the kid is? I couldn't find any information about it.

@ealogar
Copy link

ealogar commented Jun 26, 2017

The kid is the identifier of the public key used to verify the token. It's used to renew certificates.

@nagarjun
Copy link

@ealogar Can you please provide us with a simple code sample? I'm currently sending { kid: 'myHexString' } for the header but it throws an "Invalid hex string" error. Thank you.

@nagarjun
Copy link

@ealogar Looks like my issue isn't with the kid but rather the hash and encryption keys. Even if I send a 16 byte hexadecimal key like e9acfd74dd4abfc61cd9ec1a505433c9, I get the error: ENCRYPTION_ERROR: Encryption error: Invalid key length. I couldn't find any information about this either. Appreciate your help. Thanks.

@palmerabollo
Copy link
Member Author

@nagarjun depending on the algorithm you use to encrypt/decrypt, you key must be 16 or 32 chars length. See for example

it('should encrypt and decrypt with A256CBC-HS512', function() {
for A256CBC-HS512. What algorithm are you using?

@ealogar
Copy link

ealogar commented Jun 26, 2017

Ensure the key for encryption is 16 or 32 length and contains hexadecimal values only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants