OPNexusdocs

API: auth

GET /api/auth/2fa#

Totp Status

Jedes angemeldete Konto (eigene Einstellungen) · nur Browser-Sitzung, kein API-Token

Antwort 200

POST /api/auth/2fa/disable#

Totp Disable

Jedes angemeldete Konto (eigene Einstellungen) · nur Browser-Sitzung, kein API-Token

Anfrage-Body TotpDisableRequest

2 Felder anzeigen
FeldTypHinweise
code *stringminLength 1, maxLength 32
password *stringminLength 1, maxLength 1024

Antwort 200

POST /api/auth/2fa/enable#

Totp Enable

Jedes angemeldete Konto (eigene Einstellungen) · nur Browser-Sitzung, kein API-Token

Anfrage-Body TotpEnableRequest

1 Felder anzeigen
FeldTypHinweise
code *stringminLength 1, maxLength 32

Antwort 200

POST /api/auth/2fa/setup#

Totp Setup

Step 1: needs the current password (a stolen session alone must not be able to add an attacker's authenticator). Returns the secret to scan; nothing is active until /2fa/enable proves the authenticator works.

Jedes angemeldete Konto (eigene Einstellungen) · nur Browser-Sitzung, kein API-Token

Anfrage-Body TotpSetupRequest

1 Felder anzeigen
FeldTypHinweise
password *stringminLength 1, maxLength 1024

Antwort 200

POST /api/auth/change-password#

Change Password

Jedes angemeldete Konto (eigene Einstellungen) · nur Browser-Sitzung, kein API-Token

Anfrage-Body ChangePasswordRequest

2 Felder anzeigen
FeldTypHinweise
current_password *stringminLength 1, maxLength 1024
new_password *stringminLength 10, maxLength 1024

Antwort 200

POST /api/auth/login#

Login

Keine Anmeldung nötig

Anfrage-Body LoginRequest

3 Felder anzeigen
FeldTypHinweise
password *stringminLength 1, maxLength 1024
totp_codestring | null
username *stringminLength 1, maxLength 150

Antwort 200

POST /api/auth/logout#

Logout

Keine Anmeldung nötig

Antwort 200

GET /api/auth/me#

Me

Keine Anmeldung nötig

Antwort 200