🚀 Mock API Server

Complete Mock API with OAuth 2.0, API Key and Basic Auth for integration testing and development.

✨ Features

🔐

Full OAuth 2.0

Support for client_credentials, password, authorization_code and refresh_token grant types.

🔑

Multiple Auth Methods

Authentication via JWT Bearer, API Key (X-API-Key) and HTTP Basic Auth.

📦

Sample Data

Pre-loaded users, products and sales for immediate testing.

🛡️

JWT Tokens

Real JWT tokens with expiration, refresh tokens and revocation.

📡 Available Endpoints

🔐 OAuth 2.0

GET /oauth/authorize
POST /oauth/token
POST /oauth/introspect
POST /oauth/revoke
GET /oauth/.well-known/oauth-authorization-server

📦 Protected Resources

GET /api/users
GET /api/users/:id
GET /api/products
GET /api/products/:id
GET /api/sales
GET /api/sales/:id

🔑 Authentication Methods

JWT Bearer Token

Authorization: Bearer <access_token>

API Key

X-API-Key: api-key-123456

Basic Auth

Authorization: Basic <base64(user:pass)> Valid credentials: • admin:admin123 • user:user123

OAuth Client Credentials

POST /oauth/token { "grant_type": "client_credentials", "client_id": "client123", "client_secret": "secret123" }