Liquidity Docs

OIDC / OAuth2 Reference

Liquid IAM is a standard OIDC/OAuth2 provider. With issuer = origin (the

Liquid IAM is a standard OIDC/OAuth2 provider. With issuer = origin (the configured base URL, http://localhost:8000 in dev):

Endpoints

PurposePath
Discovery/.well-known/openid-configuration
JWKS (public keys to verify JWTs)/.well-known/jwks
Authorize/login/oauth/authorize
Token/api/login/oauth/access_token
Refresh token/api/login/oauth/refresh_token
UserInfo/api/userinfo
Logout (RP-initiated)/api/logout

Per-application discovery/JWKS variants exist too (/.well-known/{appName}/openid-configuration, /.well-known/{appName}/jwks).

Login flow (authorization code + PKCE)

1. App -> /login/oauth/authorize?client_id=..&redirect_uri=<app>/callback
          &response_type=code&scope=openid profile email&state=..&code_challenge=..
2. Liquid IAM -> Google (prompt=select_account); Google returns to IAM
3. IAM applies the provider emailRegex (gate @satschel.com); JIT-creates the user
4. IAM -> <app>/callback?code=..&state=..
5. App -> POST /api/login/oauth/access_token (code + code_verifier)
          -> { access_token, id_token, refresh_token }
6. App stores tokens; backends verify access_token against /.well-known/jwks

The access token is a JWT (RS256, signed by the app cert). Verifiers check issuer, audience (client id), expiry, and signature against JWKS.

Logout (RP-initiated)

GET /api/logout?id_token_hint=<id_token>&post_logout_redirect_uri=<app-origin>&state=..
  • With a valid id_token_hint and a post_logout_redirect_uri that is registered in the application's redirect URIs, IAM ends the SSO session and redirects back to the app.
  • Without those (or if the URI is not registered), it returns a JSON status page instead of redirecting. So the app's post-logout URL must be in the app's redirect URIs.

Claims used by relying parties

The Transfer Agent derives the operator identity from the token, preferring preferred_username, then name, then email, then sub. owner carries the organization. This identity becomes the maker/checker actor on the backend.

How relying parties integrate

  • Browser SPA (e.g. transfer-agent-fe): casdoor-js-sdk runs the PKCE flow. Config: issuer, client id, org liquidity, app name, redirect /callback, scope openid profile email.
  • Backend service (e.g. ta-api): coreos/go-oidc builds a verifier from the issuer's discovery + JWKS and validates the Bearer token on each request.

See integration.md to register a new app, and sso-setup.md for the Google provider setup.