For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sessions

Check session

get

Confirms that the caller's access token is still valid. Returns an empty 200 response with no body.

Requires an access token.

Responses
200

Session is valid

No content

get/api/sessions
GET /api/sessions HTTP/1.1
Accept: */*

No content

Create session

post

Authenticates a caller and returns a session token. The shape of the request body selects the login flow.

Supported flows:

  • Password — {user: {user_name, password}}. Verifies credentials against the local store.

  • Active Directory — {auth_realm: "active_directory", user: {user_name, password}}.

  • LDAP — {auth_realm: "ldap", user: {user_name, password}}. The response may include validation_warnings.

  • OIDC — {auth_realm: "oidc", code: "...", state: "..."} for the callback step, or {auth_realm: "oidc"} with a Bearer token in the Authorization header.

  • Auth0 — {auth_realm: "auth0"} with a Bearer token in the Authorization header.

  • SAML step 1 — {SAMLResponse: "..."}. Returns 302 with a Location header pointing at /saml#nonce=....

  • SAML step 2 — {auth_realm: "saml", nonce: "..."} where the nonce was issued in step 1.

When none of the body flows matches and the request carries a proxy-remote-user header, the header value is used as the user name for proxy authentication. Proxy login is subject to the allow_proxy_login configuration.

access_method is accepted but its value is ignored. The server records the authentication method it actually uses to authenticate the caller.

The refresh token is returned via cookie, not in the response body

Fails with a 401 when credentials are invalid, the nonce is unknown/expired, or the proxy user does not exist. The body may take one of three shapes (see the response schema).

Body

Authentication request. The shape of the body selects the login flow.

Independently of the body, when the proxy-remote-user header is present and none of the body flows matches, the endpoint falls back to proxy login: the header value is used as the user name.

or
or
or
or
or
or
Responses
201

Session token issued

application/json

Token issued for a successfully authenticated session.

Response body: only token (and, on LDAP flows, validation_warnings) is returned.

Refresh token: delivered exclusively through the _td_refresh cookie (SameSite=Strict; Secure). Clients must persist this cookie and send it back to POST /api/sessions/refresh; it is single-use.

Validity: the access token is a signed JWT (aud: "truedat", iss: "tdauth"). Its lifetime is configured per deployment and can be adjusted via ACCESS_TOKEN_TTL_SECONDS.

tokenstringRequired

Signed JWT access token.

validation_warningsstring[]Optional

Present only on LDAP flows. Warnings emitted while validating the LDAP entry.

post/api/sessions
POST /api/sessions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 53

{
  "user": {
    "password": "s3cr3t",
    "user_name": "john.doe"
  }
}
{
  "token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9..."
}

Destroy session

delete

Terminates the caller's session. Both the access token and the refresh token (if present) are deleted from the session cache. The response is empty.

Requires an access token.

Responses
204

Session destroyed

No content

delete/api/sessions
DELETE /api/sessions HTTP/1.1
Accept: */*

No content

Refresh session

post

Exchanges a refresh token for a new access token. The refresh token is read from the _td_refresh cookie and the current access token from the Authorization header. A refresh token is single-use: after a successful exchange it cannot be reused.

Requires both a valid access token and a valid refresh token.

Responses
201

Session token refreshed

application/json

Token issued for a successfully authenticated session.

Response body: only token (and, on LDAP flows, validation_warnings) is returned.

Refresh token: delivered exclusively through the _td_refresh cookie (SameSite=Strict; Secure). Clients must persist this cookie and send it back to POST /api/sessions/refresh; it is single-use.

Validity: the access token is a signed JWT (aud: "truedat", iss: "tdauth"). Its lifetime is configured per deployment and can be adjusted via ACCESS_TOKEN_TTL_SECONDS.

tokenstringRequired

Signed JWT access token.

validation_warningsstring[]Optional

Present only on LDAP flows. Warnings emitted while validating the LDAP entry.

post/api/sessions/refresh
POST /api/sessions/refresh HTTP/1.1
Accept: */*
{
  "token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9..."
}

Last updated