Sessions
Confirms that the caller's access token is still valid. Returns an empty 200 response with no body.
Requires an access token.
Session is valid
No content
Unauthorized
Internal Server Error
GET /api/sessions HTTP/1.1
Accept: */*
No content
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 includevalidation_warnings.OIDC —
{auth_realm: "oidc", code: "...", state: "..."}for the callback step, or{auth_realm: "oidc"}with a Bearer token in theAuthorizationheader.Auth0 —
{auth_realm: "auth0"}with a Bearer token in theAuthorizationheader.SAML step 1 —
{SAMLResponse: "..."}. Returns302with aLocationheader 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).
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.
Session token issued
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.
Signed JWT access token.
Present only on LDAP flows. Warnings emitted while validating the LDAP entry.
Redirect the client to the SAML exchange endpoint. The Location header is /saml#nonce=<nonce>; the client must navigate there and then call this endpoint again with {auth_realm: "saml", nonce: <nonce>}.
Unauthorized
Unprocessable Entity
Internal Server Error
POST /api/sessions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 53
{
"user": {
"password": "s3cr3t",
"user_name": "john.doe"
}
}{
"token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9..."
}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.
Session destroyed
No content
Unauthorized
Internal Server Error
DELETE /api/sessions HTTP/1.1
Accept: */*
No content
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.
Session token refreshed
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.
Signed JWT access token.
Present only on LDAP flows. Warnings emitted while validating the LDAP entry.
Unauthorized
Internal Server Error
POST /api/sessions/refresh HTTP/1.1
Accept: */*
{
"token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9..."
}Last updated