Mock Auth Service

For advanced setup instructions and documentation, visit the GitHub repository

API Endpoints

Quick Start

Health Check
curl mock-auth.cactidevs.com/health/
Response
{
  "status": "healthy",
  "service": "mock_auth"
}

Authenticate

Generate access and refresh JWT tokens

POST /authenticate/
curl -X POST mock-auth.cactidevs.com/authenticate/ \
    -H "Content-Type: application/json" \
    -d '{
      "response": {
        "sub": "user-123",
        "name": "Test User"
      }
    }'
Parameters
{
  "success": true,        // optional, default: true
  "response": {           // optional, custom JWT claims
    "sub": "user-123",
    "name": "Test User",
    "role": "admin"
  }
}
Success Response (200)
{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "openid profile email"
}

Refresh Token

Exchange a refresh token for a new access token

POST /refresh/
curl -X POST mock-auth.cactidevs.com/refresh/ \
    -H "Content-Type: application/json" \
    -d '{
      "refresh_token": "eyJhbGciOiJIUzI1NiIs..."
    }'
Parameters
{
  "refresh_token": "eyJ..."  // required
}
Success Response (200)
{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "openid profile email"
}