Can't extend JSONToken
ikorolev93 opened this issue · 2 comments
ikorolev93 commented
I want to add my own claim to the JSONToken. I tried to use
type MyToken struct {
paseto.JSONToken
Groups []string `json:"groups"`
}
but it doesn't work (field does not appear in my token). There is JSONToken.Set
, but it only works with strings.
o1egl commented
Hello, thank you for your report. I have received several similar requests for adding this functionality. Please follow this PR #17
o1egl commented
PR is merged to master branch