Skip to content

Nothing is fetched yet: the discovery document and the signing keys are read from the portal on first use and kept in the client object.

Usage

sso_client(
  issuer,
  client_id,
  client_secret,
  redirect_uri,
  scopes = default_scopes
)

Arguments

issuer

The portal's address exactly as its discovery document states it, e.g. "https://portal.example.org" (include the subpath when the portal is mounted under one). Compared byte for byte.

client_id

The system's id, as registered on the portal.

client_secret

The secret shown once at registration. Keep it out of code: read it from an environment variable.

redirect_uri

The app's callback URL, exactly as registered.

scopes

Space-separated scopes. The default asks for everything the identity can carry.

Value

A rusckersso_client (an environment, so the cache is shared by every copy of it).

Examples

client <- sso_client(
  issuer = "https://portal.example.org",
  client_id = "my-app",
  client_secret = "from-an-environment-variable",
  redirect_uri = "https://app.example.org/"
)