oidc.discovery

OIDC Discovery document fetching and parsing.

create-client

(create-client)

Creates a platform-specific discovery client.

Returns: IDiscoveryClient implementation (JVM with caching, ClojureScript without)

DiscoveryDocument

Malli schema for OIDC discovery document.

fetch-discovery-document

(fetch-discovery-document issuer)

Fetches and parses the OIDC discovery document from the issuer.

Takes an OIDC issuer URL, creates a platform-specific discovery client, and fetches the discovery document from the well-known endpoint. In Clojure, returns the parsed discovery document as a map. In ClojureScript, returns a promise that resolves to the document. Throws ExceptionInfo on HTTP errors or when the document is invalid.

well-known-url

(well-known-url issuer)

Constructs the .well-known/openid-configuration URL from an issuer.

Takes an OIDC issuer URL and appends /.well-known/openid-configuration to it, removing any trailing slash from the issuer if present. Returns the full URL to the discovery document.