Authentication

API authentication using JWT tokens.

Authentication Overview

FabConnect uses JWT (JSON Web Tokens) for API authentication.

Login

POST /api/v1/auth/login
Content-Type: application/json

{
  "email": "<your-admin-email>",
  "password": "<your-password>"
}

Response

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": {
    "id": "usr_123",
    "email": "admin@fabconnect.local",
    "name": "Admin",
    "role": "admin"
  },
  "expires_at": "2025-12-08T00:00:00Z"
}

Using the Token

Include the token in the Authorization header:

curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  http://localhost:8080/api/v1/equipment

Token Refresh

POST /api/v1/auth/refresh
Authorization: Bearer <current_token>

Logout

POST /api/v1/auth/logout
Authorization: Bearer <token>

Was this page helpful? /