Overview
Borg UI uses JWT (JSON Web Token) based authentication with OAuth2 password flow. Most API endpoints require a valid access token.Login
Authenticate and obtain an access token. Endpoint:POST /api/auth/login
string
required
Username for authentication
string
required
Password for authentication
string
JWT access token to use for authenticated requests
string
Always “bearer”
integer
Token expiration time in seconds (default: 43200 = 12 hours)
boolean
If true, user must change their password before accessing other endpoints
Using the Token
Include the access token in theAuthorization header:
Get Current User
Retrieve information about the authenticated user. Endpoint:GET /api/auth/me
Example Request:
Refresh Token
Obtain a new access token before the current one expires. Endpoint:POST /api/auth/refresh
Example Request:
Logout
Invalidate the current session (client should discard the token). Endpoint:POST /api/auth/logout
Example Request:
Change Password
Change the current user’s password. Endpoint:POST /api/auth/change-password
string
required
Current password
string
required
New password to set
Authentication Configuration
Get authentication configuration for the UI. Endpoint:GET /api/auth/config
Example Request:
User Management (Admin Only)
List Users
Endpoint:GET /api/auth/users
Example Request:
Create User
Endpoint:POST /api/auth/users
string
required
Username for the new user
string
required
Password for the new user
string
Email address
boolean
default:false
Whether user has admin privileges
Update User
Endpoint:PUT /api/auth/users/{user_id}
Delete User
Endpoint:DELETE /api/auth/users/{user_id}
Example Request: