technitium 0.4.0

Typed async Rust client for the Technitium DNS Server API
Documentation
# Get User Profile Details

## Endpoint

`/api/user/profile/get`

## Method

GET

## Description

Gets the user account profile details, including session information, group memberships, and login history.

## Parameters

| Name | Type | Required | Conditional | Description |
|------|------|----------|-------------|-------------|
| `token` | string | Yes | - | The session token generated by the `login` or the `createToken` call. |

## Authentication

Requires a valid token (session token from login or API token from createToken).

## Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `response.displayName` | string | The display name of the user account. |
| `response.username` | string | The username of the user account. |
| `response.totpEnabled` | boolean | Whether 2FA is enabled on this account. |
| `response.disabled` | boolean | Whether the user account is disabled. |
| `response.previousSessionLoggedOn` | string | ISO 8601 timestamp of the previous session login. |
| `response.previousSessionRemoteAddress` | string | IP address from which the previous session was initiated. |
| `response.recentSessionLoggedOn` | string | ISO 8601 timestamp of the most recent session login. |
| `response.recentSessionRemoteAddress` | string | IP address from which the most recent session was initiated. |
| `response.sessionTimeoutSeconds` | integer | The session timeout value in seconds. |
| `response.memberOfGroups` | array of strings | List of group names the user belongs to (e.g., `["Administrators"]`). |
| `response.sessions` | array of objects | List of active sessions for this user. |
| `response.sessions[].username` | string | Username associated with the session. |
| `response.sessions[].isCurrentSession` | boolean | Whether this session is the one making the current API call. |
| `response.sessions[].partialToken` | string | Truncated token identifier (e.g., `"620c3bfcd09d0a07"`), used with `/api/user/session/delete`. |
| `response.sessions[].type` | string | Session type (e.g., `"Standard"` for login sessions, or `"ApiToken"` for API tokens). |
| `response.sessions[].tokenName` | string or null | The name of the API token (null for standard login sessions). |
| `response.sessions[].lastSeen` | string | ISO 8601 timestamp of the last API call made with this session. |
| `response.sessions[].lastSeenRemoteAddress` | string | IP address from which the last API call was made. |
| `response.sessions[].lastSeenUserAgent` | string | User-Agent header from the last API call. |

## Conditional Logic Notes

- This endpoint works with both login session tokens and API tokens.
- The `sessions` array includes ALL active sessions for the user, including both standard login sessions and API token sessions.
- The `partialToken` field in each session entry is the value needed for the `/api/user/session/delete` endpoint.

## Edge Cases

- The `tokenName` field is `null` for standard login sessions and only populated for API token sessions.
- The `type` field distinguishes between session types -- `"Standard"` for login sessions and likely `"ApiToken"` for API token sessions (exact value for API tokens not shown in example).
- The `disabled` field indicates account status -- a disabled account may still have active sessions that were created before the account was disabled.
- Session timestamps use ISO 8601 format but may vary in precision (some include fractional seconds, others may not).