We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Decode a base64 encode token get the payload info, look like :
{"typ":"JWT","alg":"HS256","jti":"e6ca395f2a6479f9a84739e339544aec"}
Now I want to get the alg: HS256 item of a encode token, How should I do or I need to handle the string by myself?
alg: HS256
The text was updated successfully, but these errors were encountered:
Since your payload is already decoded, simply unmarshal it to have access to claims and header fields:
var jot jwt.JWT if err = jwt.Unmarshal(decodedPayload, &jot); err != nil { // ... } fmt.Println(jot.Algorithm())
Please tell me if this solves your issue. 😄
Sorry, something went wrong.
thank u
No branches or pull requests
Decode a base64 encode token get the payload info, look like :
Now I want to get the
alg: HS256
item of a encode token, How should I do or I need to handle the string by myself?The text was updated successfully, but these errors were encountered: