Instance Method
verifyJWS(_:as:jsonDecoder:validationTime:)
Verify a JWS with the
x5c header parameter against the trusted root certificates, overriding the default JSON decoder.func verifyJWS<Payload>(_ token: String, as _: Payload.Type = Payload.self, jsonDecoder: any JWTJSONDecoder, validationTime: X5CValidationTime = .currentTime) async throws -> Payload where Payload : JWTPayload
Parameters
tokenThe JWS to verify.
payloadThe type to decode from the token payload.
jsonDecoderThe JSON decoder to use for decoding the token.
validationTimeThe point in time to validate the certificate chain at.
Return Value
The decoded payload, if verified.