tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.27k stars 1.55k forks source link

Regression about JWTs without TTL #1979

Open Shizzen83 opened 4 years ago

Shizzen83 commented 4 years ago

Regression about JWTs without TTL

Because of PHP property type-hinting on Tymon\JWTAuth\Builder::$ttl, JWTs without TTL do not work longer. It's a cinch to fix by replacing int with ?int in order to allow null.

Your environment

Q A
Bug? yes
New Feature? no
Framework Laravel / Lumen
Package version 2.0
PHP version 7.4

Steps to reproduce

Set ttl config variable to null and remove Claims\Expiration::NAME from required_claims part. Then try to generate a JWT

Expected behaviour

A JWT should be generated without TTL/expiration

Actual behaviour

TypeError: Typed property Tymon/JWTAuth/Builder::$ttl must be int, null used

@tymondesigns Would it be possible to hotfix this in 2.x branch please?

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.