-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrade jsonwebtoken #154
Upgrade jsonwebtoken #154
Conversation
Pull Request Test Coverage Report for Build 2956432040
💛 - Coveralls |
String hash = no.toString(16); | ||
|
||
while (hash.length() < 32) { | ||
hash = "0" + hash; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following this logic.
If length < 32, why prepend a 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It ensures it is a 256 bit to use with HS512 signature algorithm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the confusing part in this service is that the secret was used for both signing the JWT and then encrypting the JWT. With the jsonwebtoken upgrade the methods we used have been deprecated and require a key or key pair now to sign the JWT. I just added this hack to hash the secret to a 256 bit secret.
Description
Type of change
How Has This Been Tested?
Building and deploying multiple Weaver UIs against AuthService.
Checklist: