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

Fix not using builder nonce in token encoding #19

Merged
merged 4 commits into from Nov 29, 2020
Merged

Conversation

brycx
Copy link
Collaborator

@brycx brycx commented Nov 29, 2020

Previously, the nonce that the builder generated in new() was never being used, because a new nonce was generated in encode(). Thus, calling the nonce getter on the struct would never return the nonce actually used.

This PR changes the builder to generate a new nonce on each encode() call, such that retrieving the nonce via the struct, actually returns the nonce used to encrypt the most recent token.

@brycx brycx merged commit fae5ceb into master Nov 29, 2020
@brycx brycx deleted the builder-nonce-issue branch November 29, 2020 11:25
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

Successfully merging this pull request may close these issues.

None yet

1 participant