init(value:)
See JWTClaim
.
init(value: Date)
See JWTClaim
.
init(value: Date)
s6JWTKit15ExpirationClaimV5valueAC20FoundationEssentials4DateV_tcfc
What are these?3PHC0
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.
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.
var value: Date
See JWTClaim
.
func verifyNotExpired(currentDate: Date = .init()) throws
Throws an error if the claim’s date is later than current date.