ValidateClaimsResult

public struct ValidateClaimsResult: CustomStringConvertible, Equatable

ValidateClaimsResult list the possible results of a call to JWT.validateClaims method. In case of successful validation, .success is returned, all other cases list various problems that may occur during claims validation and indicate that the validation failed.

  • The human readable description of the ValidateClaimsResult

    Declaration

    Swift

    public let description: String
  • Successful validation.

    Declaration

    Swift

    public static let success = ValidateClaimsResult(description: "Success")
  • Invalid Expiration claim.

    Declaration

    Swift

    public static let invalidExpiration = ValidateClaimsResult(description: "Invalid Expiration claim")
  • Expired token: expiration time claim is in the past.

    Declaration

    Swift

    public static let expired = ValidateClaimsResult(description: "Expired token")
  • Invalid Not Before claim.

    Declaration

    Swift

    public static let invalidNotBefore = ValidateClaimsResult(description: "Invalid Not Before claim")
  • Not Before claim is in the future.

    Declaration

    Swift

    public static let notBefore = ValidateClaimsResult(description: "Token is not valid yet, Not Before claim is greater than the current time")
  • Invalid Issued At claim.

    Declaration

    Swift

    public static let invalidIssuedAt = ValidateClaimsResult(description: "Invalid Issued At claim")
  • Issued At claim is in the future.

    Declaration

    Swift

    public static let issuedAt = ValidateClaimsResult(description: "Issued At claim is greater than the current time")
  • Check if two ValidateClaimsResults are equal. Required for the Equatable protocol

    Declaration

    Swift

    public static func == (lhs: ValidateClaimsResult, rhs: ValidateClaimsResult) -> Bool