Session
A Session object represents an authenticated user session. Sessions are created on login and provide a JWT token for authenticating subsequent API requests. Each session is scoped to a specific realm and carries the user’s identity, role, and project information.
Sample Object
{
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "rt_abc123def456",
"expiration": 1777390896
}Fields
| Field | Type | Description |
|---|---|---|
token | string | JWT token for authenticating API requests. |
refresh_token | string | Token used to refresh the session before expiration. |
expiration | integer | Unix timestamp when the token expires. |
Actions
Creating a session
Authenticate with email and password to receive a JWT token and a refresh token. The realm parameter specifies the authentication portal.
No CLI command available. Use the REST or SDK methods.
Creating an anonymous session
Create a session without authentication credentials. Anonymous sessions are used for unauthenticated users and carry a special $anonymous role.
No CLI command available. Use the REST or SDK methods.
Destroying a session
Log out by destroying the current session. This invalidates the JWT token and clears the session cookie.
No CLI command available. Use the REST or SDK methods.
Refreshing a session
Refresh an expiring JWT token using the refresh token obtained during login.
No CLI command available. Use the REST or SDK methods.