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

invalid operation: token.Claims["a"] (type jwt.Claims does not support indexing) #11

Open
sinramyeon opened this issue Feb 21, 2018 · 0 comments

Comments

@sinramyeon
Copy link

Hello.

From migration jwt 2 to 3, we cannot indexing Claims anymore.

check it in and

From jwt 3 version, we can use

// old version of jwt
// token.Claims["a"] := someWhat

// new version of jwt
	token.Claims = jwt.MapClaims{
		"a": someWhat,
	}

If you'd like to, I will migrate jwt 2 to 3 with improve methods.

Thanks.

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