Authentication
Authenticate User & Issue JWT Access Token
POST
/api/identity/tokenOverview
Authenticates a user using credentials (username/email and password).
Authentication & Headers
- Auth: Public (OAuth2 Password Flow)
- Required Header:
API-Version: 1 - Optional Header:
X-Device-ID: <device-uuid>for client binding and anomaly tracking
Parameters & Request Body
username(string, required): The registered account email or username.password(string, required): The account plaintext password.
Behavior & MFA Flow
- Standard Flow: If MFA is disabled for the account, returns
200 OKwithaccess_token(JWT) andrefresh_token. - MFA Flow: If Multi-Factor Authentication is enabled, returns
401 Unauthorizedwith{"detail": {"mfa": true, "mfa_token": "...", "mfa_methods": [...]}}. Proceed to/api/identity/mfa/sendand/api/identity/mfa/verify.
Parameters
Header
X-Device-IDstringUnique client hardware or browser fingerprint UUID for device binding and audit security.
Request body
application/x-www-form-urlencoded
grant_typestring | nullusernamestringrequiredpasswordstring (password)requiredscopestringclient_idstring | nullclient_secretstring | null{
"grant_type": "string",
"username": "string",
"password": "string",
"scope": "",
"client_id": "string",
"client_secret": "string"
} Responses
200 Login successful without MFA challenge
401 Invalid credentials or MFA verification required
422 Validation Error
detailobject[]detail[].locstring | integer[]requireddetail[].msgstringrequireddetail[].typestringrequireddetail[].inputobjectdetail[].ctxobject{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Example
curl -X POST "$PINTER_URL/api/identity/token" \
-H "Authorization: Bearer $ACCESS_TOKEN"