WorkOS.JWKS (WorkOS SDK for Elixir v3.0.1)

Copy Markdown View Source

JWKS (JSON Web Key Set) helpers for token and session verification.

WorkOS.JWKS.url(client)
#=> "https://api.workos.com/sso/jwks/client_..."

{:ok, jwks} = WorkOS.JWKS.fetch(client)

Summary

Functions

Fetches the JWKS for a client ID. Defaults to the client's configured client_id.

Builds the JWKS URL for a client ID. Defaults to the client's configured client_id.

Functions

fetch(client, client_id \\ nil, opts \\ [])

@spec fetch(WorkOS.Client.t(), String.t() | nil, keyword()) ::
  {:ok, WorkOS.JwksResponse.t()} | {:error, WorkOS.Error.error()}

Fetches the JWKS for a client ID. Defaults to the client's configured client_id.

url(client, client_id \\ nil)

@spec url(WorkOS.Client.t(), String.t() | nil) :: String.t()

Builds the JWKS URL for a client ID. Defaults to the client's configured client_id.