JWT

public enum JWT

Type that provides APIs to generate JWS

  • API to generate JWS

    Declaration

    Swift

    public static func jws(header: Encodable, payload: Encodable, algorithm: JWTAlgorithm) throws -> String?

    Parameters

    header

    The header of the JWT. This could be a plain JSON String or Struct Encodable type.

    payload

    The payload or claim of the JWT. This could be a plain JSON String or Struct Encodable type.

    algorithm

    The algorithm used to sign the JWT.