Skip to content

Authentication ​

Covers token issuance, refresh, MFA and logout.

Obtain a token ​

http
POST /api/auth/login
Content-Type: application/json

{ "username": "admin", "password": "***" }

A successful call returns access_token and refresh_token. With MFA enabled it returns a challenge instead.

Refresh ​

http
POST /api/auth/refresh
{ "refresh_token": "***" }

Refresh tokens are single-use. The server atomically consumes the old token and issues a new one. A revoked token or abnormal user state fails the refresh and requires a new login.

MFA verification ​

http
POST /api/auth/mfa/verify
{ "challenge": "***", "code": "123456" }

The challenge is consumed atomically; reuse is invalid. TOTP codes are six digits, with case sensitivity per configuration.

Logout ​

Logout revokes the current access token and its refresh token. All tokens record a revocation time and cannot be used afterwards.

Next steps ​