Skip to main content
Version: v5.7.0

Session

Included from Basic tier

A session is one authenticated sign-in: established by a login through the ordered provider chain, kept alive by refresh-token rotation (a replayed predecessor revokes the whole session), and revoked by logout or an explicit per-session revoke. Access tokens are short-lived signed tokens; refresh tokens and api keys are opaque and hashed at rest. Refresh passes while the system is quiesced, login refuses. Served by the v2 AuthService: Login, Refresh, Logout, Introspect, ListSessions, RevokeSession, the api key verbs, the MFA factor verbs (ListFactors, EnrolTOTPFactor, ActivateTOTPFactor, RemoveFactor, Elevate, BeginIDPStepUp) and ChangePassword.

Session​

Session is one session row.

FieldTypeMeaning
absolute_expires_attimestampThe session's absolute expiry — rotation never extends past it.
authn_methodstringThe authn method the session was established with: "password" or "ldap" (provider instances such as "oidc:" join in later waves).
authn_strengthstringThe session's authn strength: "none" until MFA lands, then "idp_asserted" | "totp" | "webauthn".
created_attimestampWhen the record was created.
currentbooleantrue when this is the session the request itself rode.
elevated_attimestampWhen the session's step-up elevation window opened. Unset while the session has never elevated.
elevation_expires_attimestampWhen the step-up elevation window closes.
idstringThe session's identity.
last_client_addressstringThe client address of the session's latest refresh, resolved behind any trusted reverse proxy (server.trusted_proxies); equals source_address until the first refresh.
last_seen_attimestampWhen the session last carried a request.
refresh_expires_attimestampWhen the current refresh token expires (idle expiry; rotation renews it).
source_addressstringThe client address the session was established from, resolved behind any trusted reverse proxy — history, never rewritten.
user_agentstringThe User-Agent the session was established with (first seen, never rewritten; bounded to 512 characters). With the credential kind, the device signal the platform records — enough for a user to recognise their own sessions, by design no fingerprinting.
user_idstringThe user the session belongs to.

SessionTokens​

SessionTokens are the credentials a login or refresh mints.

FieldTypeMeaning
access_expires_attimestampWhen the access token expires.
access_tokenstringThe signed access token (aud "api", 15-minute default TTL).
refresh_expires_attimestampWhen the minted refresh token expires (rotation renews it, never past the session's absolute expiry).
refresh_tokenstringThe opaque rotating refresh token. Empty when it rode the Set-Cookie channel instead, and absent for contained break-glass sessions (the fire door is one bounded, re-authenticated session).

MFAFactor​

MFAFactor is one factor-registry row. The secret never rides this message.

FieldTypeMeaning
activated_attimestampWhen verify-to-activate enrolment finished and the factor became usable.
activebooleantrue once verify-to-activate enrolment finished; a pending factor authenticates nothing.
created_attimestampWhen the record was created.
idstringThe record's identity.
kindstringThe factor kind: "totp" (the kind set is open — "webauthn" is the fast-follow on this same registry).
labelstringAn optional caller-chosen display label.
last_used_attimestampWhen the factor last verified a proof; unset when never used.

BeginIDPStepUpRequest​

BeginIDPStepUp starts the identity-provider step-up round trip for the session the caller's own access token rode: that session id — never one named by a link — is sealed into the round trip's state together with its nonce, PKCE verifier and return path, the trip is bound to the calling browser through the login-binding cookie the response sets, and the callback elevates that session after validating the fresh id_token. Refused failed_precondition for a sessionless credential, a session that is not live, or a provider instance that elevates with a platform factor (Elevate); not_found on a server without federated sign-in.

FieldTypeMeaning
return_tostringWhere the browser lands once the session is elevated: a same-origin absolute path (query and fragment kept); anything scheme-, host- or control-character-shaped falls back to /.

BeginIDPStepUpResponse​

FieldTypeMeaning
authorize_urlstringThe identity provider's authorization URL (prompt=login, max_age=0) to navigate the browser to. The response also sets the login-binding cookie the callback requires, so the navigation must happen in the browser that made the call.

What settings change this​

  • token.access_expiry — access-token lifetime in minutes (default 15), clamped to the session's absolute expiry.
  • token.refresh_expiry — how far each refresh rotation extends the session's refresh token (default 7 days), clamped to the absolute expiry.
  • token.session_absolute_expiry — the absolute session bound (default 30 days): rotation never extends a session past login time plus this.
  • token.enable_cookies — whether a browser caller may receive its refresh token in the HttpOnly opschain_refresh cookie instead of the response body.
  • server.trusted_proxies (opschain docs config) — which peers' forwarding headers decide the recorded source_address and last_client_address; unset, the TCP peer is recorded.
  • opschain docs identity — the component page: the credential chain, providers and MFA.
  • opschain docs resources/user — the account a session belongs to.
  • opschain docs settings-reference — the full token/session tunable catalog.