Authentication
Sign-in, tokens, multi-factor and API keys.
Login
POST /api/v1/auth/login
Content-Type: application/json
{"username": "admin", "password": "<password>"}email works in place of username. With multi-factor enabled, add totpCode, or complete the login with POST /api/v1/auth/mfa/login and the mfaToken from the first response.
Response
{
"tokens": {
"accessToken": "eyJhbGciOi...",
"refreshToken": "...",
"tokenType": "Bearer",
"expiresIn": 900
},
"user": {"id": "...", "username": "admin", "email": "admin@fabconnect.local", "role": {"name": "admin"}}
}Access tokens last 15 minutes; refresh tokens 7 days.
Refresh
POST /api/v1/auth/refresh
{"refreshToken": "<refresh token>"}The response carries a new tokens block.
Logout
POST /api/v1/auth/logout with {"refreshToken": "..."} revokes that refresh token; POST /api/v1/auth/logout-all (a signed-in session) ends all of yours, open access tokens and live connections included.
API keys
POST /api/v1/auth/api-keys
Authorization: Bearer <access token>
{"name": "historian", "scopes": ["equipment:read", "events:read"]}The raw key is returned once, in key. Send it as X-API-Key. A request succeeds only when both the key’s scopes and its owner’s role allow it, so give each key the permission strings it needs.
Single sign-on
The gateway validates OIDC access tokens from your identity provider (auth.oidc.*). SAML 2.0 providers connect through Keycloak, which brokers SAML to OIDC; that set-up is documented but has not yet been tested against a customer’s identity provider.