Skip to content

Instance Method

verifyJWS(_:as:jsonDecoder:)

Verify a JWS with x5c claims against the trusted root certificates, overriding the default JSON decoder.
func verifyJWS<Message, Payload>(_ token: Message, as payload: Payload.Type = Payload.self, jsonDecoder: any JWTJSONDecoder) throws -> Payload where Message : DataProtocol, Payload : JWTPayload

Parameters

token

The JWS to verify.

payload

The type to decode from the token payload.

jsonDecoder

The JSON decoder to use for dcoding the token.

Return Value

The decoded payload, if verified.