Skip to content

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

@sinramyeon

Description

@sinramyeon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions