Skip to content

Expiration date leads to exception because of DateTimeImmutable object #26

Open
@iquito

Description

@iquito

LcoBucci\JWT converts some parts of the JWT token to DateTimeImmutable objects (since this commit in 2020: lcobucci/jwt@df83ac6, which was released with v3.4 of the library), for example the exp value. ValidatorChain and GreaterOrEquals in this library then tries to validate the expiration date and expects an integer, but receives a DateTimeImmutable, leading to exceptions because of the Assert::nullOrIntegerish. A DateTimeImmutable object seems to not be expected at all.

So I don't think the library can actually work in v1.0, because when checking the expiration of the token is will always throw an exception, or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions