Liking cljdoc? Tell your friends :D

wagoe.user.shell.oidc

OpenID Connect sign-in: authorization code flow with PKCE.

The pending sign-in (state, nonce, code verifier) travels in an encrypted, short-lived cookie rather than server state, so any replica can finish what another started. Discovery documents and key sets are cached per process.

Every step returns {:ok …} or {:error {:type :oidc/… :message …}}; only a bad configuration throws, at boot.

OpenID Connect sign-in: authorization code flow with PKCE.

The pending sign-in (state, nonce, code verifier) travels in an encrypted,
short-lived cookie rather than server state, so any replica can finish what
another started. Discovery documents and key sets are cached per process.

Every step returns {:ok …} or {:error {:type :oidc/… :message …}}; only a
bad configuration throws, at boot.
raw docstring

callbackclj

(callback client provider-id params pending-cookie login-context)

Finish a sign-in from the provider's redirect.

params are the callback's query params, pending-cookie the value start set. Returns {:ok {:outcome :signed-in :user … :session … :return-to …}}, {:ok {:outcome :mfa-required :cookie …}}, or an error.

Finish a sign-in from the provider's redirect.

`params` are the callback's query params, `pending-cookie` the value start
set. Returns {:ok {:outcome :signed-in :user … :session … :return-to …}},
{:ok {:outcome :mfa-required :cookie …}}, or an error.
sourceraw docstring

complete-mfaclj

(complete-mfa client mfa-cookie code login-context)

Finish a sign-in that stopped for the second factor.

Finish a sign-in that stopped for the second factor.
sourceraw docstring

create-oidc-clientclj

(create-oidc-client {:keys [settings secret auth-service audit-repository
                            identity-repository]})

Build the client. Throws :configuration-error on bad settings or no secret.

secret keys the sealed cookies; the wiring passes JWT_SECRET unless the settings carry :state-secret.

Build the client. Throws :configuration-error on bad settings or no secret.

`secret` keys the sealed cookies; the wiring passes JWT_SECRET unless the
settings carry :state-secret.
sourceraw docstring

discoveryclj

(discovery client provider)

The provider's discovery document, cached for an hour.

The provider's discovery document, cached for an hour.
sourceraw docstring

pending-ttl-secondsclj

How long a browser has at the provider, or at the MFA prompt.

How long a browser has at the provider, or at the MFA prompt.
sourceraw docstring

sealclj

(seal client typ claims ttl)

Encrypt claims for a cookie of kind typ that expires in ttl seconds.

Encrypt `claims` for a cookie of kind `typ` that expires in `ttl` seconds.
sourceraw docstring

startclj

(start client provider-id return-to)

Begin a sign-in. Returns {:ok {:location url :cookie sealed-pending}}.

Begin a sign-in. Returns {:ok {:location url :cookie sealed-pending}}.
sourceraw docstring

unsealclj

(unseal client typ value)

The claims of a sealed cookie of kind typ, or nil when it is absent, forged, expired, or sealed for another step — a pending sign-in is not an MFA ticket.

The claims of a sealed cookie of kind `typ`, or nil when it is absent,
forged, expired, or sealed for another step — a pending sign-in is not an
MFA ticket.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close