Skip to main content
Public API

This endpoint is publicly accessible. No authentication required.

Authentication Overview

The Olympus Cloud Auth Service provides secure authentication and authorization for all platform operations.

Authentication Methods

MethodUse CaseDescription
Email/PasswordWeb, MobileStandard credential login
PIN LoginStaff POSQuick 4-6 digit PIN for staff
OAuth/SSOEnterpriseGoogle, Apple, SAML providers
API KeyIntegrationsServer-to-server authentication
Firebase ExchangeMobile AppsFirebase token exchange

JWT Token Structure

Access tokens are RS256-signed JWTs with the following claims:

{
"sub": "user_abc123",
"tenant_id": "tenant_xyz",
"roles": ["admin", "manager"],
"permissions": ["orders:read", "orders:write"],
"session_id": "sess_123",
"iat": 1704067200,
"exp": 1704070800,
"iss": "olympus-auth",
"aud": "olympus-api"
}

Token Lifecycle

Endpoints

EndpointMethodDescription
/auth/loginPOSTEmail/password login
/auth/login/pinPOSTStaff PIN login
/auth/refreshPOSTRefresh access token
/auth/logoutPOSTInvalidate session
/auth/validateGETValidate current token

Quick Start

Login

curl -X POST https://api.olympuscloud.ai/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "your-password"
}'

Response:

{
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"refresh_token": "rt_abc123...",
"expires_in": 3600,
"token_type": "Bearer"
}

Validate Token

curl -X GET https://api.olympuscloud.ai/auth/validate \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Security Best Practices

HTTPS Required

All authentication endpoints require HTTPS. HTTP requests will be rejected. Ensure your application is configured to use TLS for all API communication.

  1. Store tokens securely - Use secure storage, never local storage for web
  2. Refresh proactively - Refresh tokens before expiry
  3. Use HTTPS only - All requests must use TLS
  4. Implement MFA - Enable MFA for admin accounts
  5. Rotate API keys - Rotate integration keys regularly