Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Instance Method

verifyJWS(_:as:validationTime:)

Verify a JWS with the x5c header parameter against the trusted root certificates.
func verifyJWS<Payload>(_ token: String, as _: Payload.Type = Payload.self, validationTime: X5CValidationTime = .currentTime) async throws -> Payload where Payload : JWTPayload

Parameters

token

The JWS to verify.

payload

The type to decode from the token payload.

validationTime

The point in time to validate the certificate chain at.

Return Value

The decoded payload, if verified.