XISUITEDokumentation

MFA

6 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1

Get current + required MFA assurance level#

GET/auth/mfa/aalToken

Returns `{ currentLevel, nextLevel, currentAuthenticationMethods }`. Used by the Next.js middleware to decide whether to gate on TOTP.

Antworten

  • 200AAL info
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/auth/mfa/aal" \
  -H "Authorization: Bearer $XISUITE_TOKEN"

Issue an MFA challenge#

POST/auth/mfa/challengeToken

Begins a TOTP verification cycle. The frontend then prompts the user for the 6-digit code, then calls /auth/mfa/verify with the challenge ID.

Request-Bodyapplication/jsonChallengeMfaDto

NameTypBeschreibung
factorIdPflichtstring

Factor ID returned by /auth/mfa/enroll.

Antworten

  • 200Challenge issued
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/auth/mfa/challenge" \
  -H "Authorization: Bearer $XISUITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"factorId":"…"}'

Enroll a TOTP factor#

POST/auth/mfa/enrollToken

Starts MFA enrollment for the authenticated user. Returns the QR code, TOTP secret, and provisioning URI. The factor is in `unverified` state until /auth/mfa/verify is called with a valid TOTP code.

Request-Bodyapplication/jsonEnrollMfaDto

NameTypBeschreibung
factorTypestring

MFA factor type (only TOTP supported today).

Werte: totp

Standard: "totp"

friendlyNamestring

Optional friendly name for this factor (e.g., "Personal phone").

Antworten

  • 200Enroll initiated
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/auth/mfa/enroll" \
  -H "Authorization: Bearer $XISUITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"factorType":"totp","friendlyName":"…"}'

List the user's MFA factors#

GET/auth/mfa/factorsToken

Antworten

  • 200Factor list
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/auth/mfa/factors" \
  -H "Authorization: Bearer $XISUITE_TOKEN"

Remove an MFA factor#

POST/auth/mfa/unenrollToken

Request-Bodyapplication/jsonUnenrollMfaDto

NameTypBeschreibung
factorIdPflichtstring

Factor ID to unenroll.

Antworten

  • 200Factor removed
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/auth/mfa/unenroll" \
  -H "Authorization: Bearer $XISUITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"factorId":"…"}'

Verify a TOTP code (promotes session to aal2)#

POST/auth/mfa/verifyToken

Verifies the 6-digit TOTP code against an outstanding challenge. On success, rotates the auth cookies to the new aal2 token pair.

Request-Bodyapplication/jsonVerifyMfaDto

NameTypBeschreibung
factorIdPflichtstring

Factor ID being verified.

challengeIdPflichtstring

Challenge ID from /auth/mfa/challenge.

codePflichtstring

6-digit TOTP code from the authenticator app.

Antworten

  • 200Verified — cookies rotated
  • 401Invalid code
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/auth/mfa/verify" \
  -H "Authorization: Bearer $XISUITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"factorId":"…","challengeId":"…","code":"…"}'
Stand: 25. Oktober 2026© 2026 XISUITE · AmberTech Solutions