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

Issue decoding JWT access token #36

Closed
maurerbot opened this issue Sep 30, 2019 · 1 comment
Closed

Issue decoding JWT access token #36

maurerbot opened this issue Sep 30, 2019 · 1 comment

Comments

@maurerbot
Copy link

maurerbot commented Sep 30, 2019

The specific issue seems to be here...

parts := strings.Split(jwt, ".")
    header := parts[0]
    header = padHeader(header)
    headerDecoded, err := base64.StdEncoding.DecodeString(header)

    if err != nil {
        return false, fmt.Errorf("the tokens header does not appear to be a base64 encoded string")
    }

The token header is throwing illegal base64 data at input byte 88 but the header decodes fine on jsonwebtoken.io.

This is an example header:
eyJraWQiOiJmVzlaZXM2SHp2My05RTg3Wnl5RnFWN0t4amJUdlVRNWZzdWxZWDNpa1hJIiwiYWxnIjoiUlMyNTYifQ

Full details on this issue on here.

@maurerbot
Copy link
Author

issue fixed. see stackoverflow

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

1 participant