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

What is ->setId() for (jti claim)? #16

Closed
bologer opened this issue Mar 19, 2019 · 2 comments
Closed

What is ->setId() for (jti claim)? #16

bologer opened this issue Mar 19, 2019 · 2 comments

Comments

@bologer
Copy link

bologer commented Mar 19, 2019

Hi,

$token = Yii::$app->jwt->getBuilder()
            ->setIssuer('http://example.com')
            ->setAudience('http://example.org')
            ->setId('4f1g23a12aa', true) // <-- what is this for?
           ...

I see this is used pretty much on every example. It's a bit confusing and I would like to know whether it is something I should considered as well.

@sizeg
Copy link
Owner

sizeg commented Mar 19, 2019

Hi, examples is just examples, modify it as you need.

https://tools.ietf.org/html/rfc7519#section-4.1.7

@bologer
Copy link
Author

bologer commented Mar 19, 2019

I see, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants