Skip to content

Protocol

JWTAlgorithm

A protocol defining the necessary functionality for a JWT (JSON Web Token) algorithm. All algorithms conform to JWTAlgorithm to provide custom signing and verification logic for JWT tokens.
protocol JWTAlgorithm : Sendable

Topics

Instance Properties

  • name
    Unique JWT-standard name for this algorithm.

Instance Methods

  • sign(_:)
    Creates a signature from the supplied plaintext.
  • verify(_:signs:)
    Returns true if the signature was creating by signing the plaintext.

Relationships

Inherits From

  • Swift.Sendable
  • Swift.SendableMetatype