Skip to content

Instance Method

verifyJWS(_:as:)

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

Parameters

token

The JWS to verify.

payload

The type to decode from the token payload.

Return Value

The decoded payload, if verified.