You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ! Whenever I open my code where I get the claims out of the token. PHP can't find the claims function in the interface and mark it as not existing. I suggest adding it in Token.php interface so the error won't be shown.
Example of modified Token.php :
declare(strict_types=1);
namespaceLcobucci\JWT;
useDateTimeInterface;
useLcobucci\JWT\Token\DataSet;
interfaceToken
{
/** * Returns the token headers */publicfunctionheaders(): DataSet;
/** * Returns the token claims */publicfunctionclaims(): DataSet;
/** * Returns if the token is allowed to be used by the audience * * @param non-empty-string $audience */publicfunctionisPermittedFor(string$audience): bool;
/** * Returns if the token has the given id * * @param non-empty-string $id */publicfunctionisIdentifiedBy(string$id): bool;
/** * Returns if the token has the given subject * * @param non-empty-string $subject */publicfunctionisRelatedTo(string$subject): bool;
/** * Returns if the token was issued by any of given issuers * * @param non-empty-string ...$issuers */publicfunctionhasBeenIssuedBy(string ...$issuers): bool;
/** * Returns if the token was issued before of given time */publicfunctionhasBeenIssuedBefore(DateTimeInterface$now): bool;
/** * Returns if the token minimum time is before than given time */publicfunctionisMinimumTimeBefore(DateTimeInterface$now): bool;
/** * Returns if the token is expired */publicfunctionisExpired(DateTimeInterface$now): bool;
/** * Returns an encoded representation of the token * * @return non-empty-string */publicfunctiontoString(): string;
}
The text was updated successfully, but these errors were encountered:
Hi ! Thanks for all the reference issues guys. I will look at the JwtFacade, I did not know this existed. I will implement that in all my projects hehe 👍
Hi ! Whenever I open my code where I get the claims out of the token. PHP can't find the claims function in the interface and mark it as not existing. I suggest adding it in Token.php interface so the error won't be shown.
Example of modified Token.php :
The text was updated successfully, but these errors were encountered: