verifyNotBefore(currentDate:)
Throws an error if the claim’s date is earlier than current date.
func verifyNotBefore(currentDate: Date = .init()) throws
Throws an error if the claim’s date is earlier than current date.
func verifyNotBefore(currentDate: Date = .init()) throws
s6JWTKit14NotBeforeClaimV06verifybC011currentDatey20FoundationEssentials0G0V_tKF
What are these?7H06N
import JWTKit
🔑 JSON Web Token signing and verification (HMAC, RSA, PSS, ECDSA, EdDSA) using SwiftCrypto.
struct NotBeforeClaim
The “nbf” (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing. The processing of the “nbf” claim requires that the current date/time MUST be after or equal to the not-before date/time listed in the “nbf” 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.