verifyNotExpired(currentDate:)
Throws an error if the claim’s date is later than current date.
func verifyNotExpired(currentDate: Date = .init()) throws
Throws an error if the claim’s date is later than current date.
func verifyNotExpired(currentDate: Date = .init()) throws
s6JWTKit15ExpirationClaimV16verifyNotExpired11currentDatey20FoundationEssentials0H0V_tKF
What are these?714M4
import JWTKit
🔑 JSON Web Token signing and verification (HMAC, RSA, PSS, ECDSA, EdDSA) using SwiftCrypto.
struct ExpirationClaim
The “exp” (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. The processing of the “exp” claim requires that the current date/time MUST be before the expiration date/time listed in the “exp” claim. Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew. Its value MUST be a number containing a NumericDate value. Use of this claim is OPTIONAL.
struct Date
Date
represents a single point in time.
init(value: Date)
See JWTClaim
.
var value: Date
See JWTClaim
.
protocol JWTClaim : Decodable, Encodable, Sendable
A claim is a codable, top-level property of a JWT payload. Multiple claims form a payload. Some claims, such as expiration claims, are inherently verifiable. Each claim able to verify itself provides an appropriate method for doing so, depending on the specific claim.