Authentication
ZERG supports multiple authentication modes.
Bearer Token
The primary authentication method is Bearer tokens passed in the Authorization header:
bash
curl -H "Authorization: Bearer <token>" https://api.nonsense.ws/api/v1/statusToken Management
Login
bash
POST /api/v1/auth/loginjson
{ "username": "admin", "password": "<password>" }Validate
bash
GET /api/v1/auth/validateRefresh
bash
POST /api/v1/auth/refreshLogout
bash
POST /api/v1/auth/logoutCLI Authentication
bash
# Login via CLI
zerg login --url https://api.nonsense.ws --token <token>
# Logout
zerg logout
# Check current auth
zerg config get default.tokenRBAC
Mango provides role-based access control with the following permissions:
*— Full admin accessadmin— Admin operationsread— Read-only accesswrite— Write access
Development Mode
When auth_enabled is false (default in development), all endpoints are accessible without authentication.