TokenExpiredException
extends RuntimeExceptionWithPayload
in package
Exception thrown when TokenExpirationValidator determines that a token has expired.
Table of Contents
Methods
- __construct() : mixed
- convert() : RuntimeExceptionWithPayload
- Converts a normal RuntimeException to one with a payload.
- getExpiredAt() : DateTimeImmutable
- Gets the time at which the token expired.
- getPayload() : object
- Gets the JWT payload value.
Methods
__construct()
public
__construct(object $payload, DateTimeInterface|int $expiredAt) : mixed
Parameters
- $payload : object
-
Data that was provided for the payload section.
- $expiredAt : DateTimeInterface|int
-
Expiration time.
convert()
Converts a normal RuntimeException to one with a payload.
public
static convert(object $payload, Throwable $previous) : RuntimeExceptionWithPayload
Parameters
- $payload : object
-
Data that was provided for the payload section.
- $previous : Throwable
-
Exception to convert.
Return values
RuntimeExceptionWithPayloadgetExpiredAt()
Gets the time at which the token expired.
public
getExpiredAt() : DateTimeImmutable
Return values
DateTimeImmutablegetPayload()
Gets the JWT payload value.
public
getPayload() : object