damirka/yii2-jwt

How to add custom payload (f.eks. "name", or "isAdmin") in token?

dakipro opened this issue · 3 comments

Hi,
I didn't find any method that would do this, do you have a suggestion on how to add custom elements in json array, as a payload?
Something like default example from https://jwt.io/
PAYLOAD:DATA

{
"sub": "1234567890",
"name": "John Doe",
"admin": true

}

Thanks

Hello @dakipro. Custom payload data is not supported in this extension.
But I've found a fork for you which does. You'd better use this one.

Thanks. I could not find custom payload on that one either, for now I will keep it as is, and extend it later if needed.

Sure. Be free to send a PR. 👍