Instance Method
verifyJWS(_:as:jsonDecoder:policy:)
Verify a JWS with
x5c claims against the trusted root certificates, overriding the default JSON decoder.func verifyJWS<Payload>(_ token: some DataProtocol, as _: Payload.Type = Payload.self, jsonDecoder: any JWTJSONDecoder, @PolicyBuilder policy: () throws -> some VerifierPolicy = { EmptyPolicy() }) 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 dcoding the token.
policyThe policy to use for verification.
Return Value
The decoded payload, if verified.