identity.user.validate-token ​
Validate a raw API token and return the associated user profile
Validate a raw API token and return the associated user profile.
Inputs:
- token: Raw API token to validate (required)
- organization_uuid: If provided, also return the user's membership role in this organization (optional)
Outputs (terminal state_data):
- valid: bool — True when the token resolves to an active user
- user: dict{user_uuid, username, email, system_role} or None
- membership_role: str or None (populated only when organization_uuid given)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
token | string | Yes | — | Raw API token to validate |
organization_uuid | uuid | No | — | If provided, also return the user's membership role in this organization |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
valid | boolean | Yes | — | — |
user | dict | No | — | — |
membership_role | string | No | — | — |
organization_uuid | uuid | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "identity.user.validate-token",
"initial_data": {
"token": "value"
}
}