Structure
X5CVerifier
An object for verifying JWS tokens that contain the
x5c header parameter with a set of known root certificates.struct X5CVerifier
Overview
Usage:
let verifier = try X5CVerifier(rootCertificates: myRoots)
let payload = try await verifier.verifyJWS(myJWS, as: MyPayload.self)
// payload is now known to be valid!
See RFC 7515 for details on the x5c header parameter.
Topics
Initializers
init(rootCertificates:)Create a new X5CVerifier trustingrootCertificates.
Instance Methods
verifyChain(certificates:policy:)Verify a chain of certificates against the trusted root certificates.verifyJWS(_:as:)Verify a JWS with thex5cheader parameter against the trusted root certificates.verifyJWS(_:as:jsonDecoder:)Verify a JWS with thex5cheader parameter against the trusted root certificates, overriding the default JSON decoder.verifyJWS(_:as:jsonDecoder:policy:)Verify a JWS withx5cclaims against the trusted root certificates, overriding the default JSON decoder.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype