Skip to content

Security API Reference

API reference for the Security module endpoints.

Authentication

Login

POST /api/auth/login

Authenticates a user and returns JWT tokens.

Request Body:

json
{
  "username": "[email protected]",
  "password": "password123"
}

Response:

json
{
  "accessToken": "eyJ...",
  "refreshToken": "eyJ...",
  "expiresIn": 3600
}

Register

POST /api/auth/register

Registers a new user.

Two-Factor Authentication

Setup TOTP

POST /api/auth/2fa/setup

Initiates TOTP setup, returns QR code URL.

Verify TOTP

POST /api/auth/2fa/verify

Verifies the TOTP code to enable 2FA.

Released under the MIT License.