JWT Test Server with Mock Error Simulation

Server is running with cookie domain: .polyanalitika.ru

Test Users:

🎭 Mock Configuration Panel

Configure response delays and HTTP errors for testing

📡 GET /api/v1/admin/common/token/user (User Info)

🔐 POST /auth/login (Authentication)

🔍 POST /api/v1/admin/common/users/search/reestr (Search Users)

Current Configuration:
Loading...

🔑 Active Tokens

Last issued tokens stored in memory. Deleting a token forces the user to re-authenticate.

Loading...

Available Endpoints:

GET /login

Login form - returns JWT token in header, cookie, and response body

POST /login - Accepts credentials, returns JWT token

GET /api/v1/admin/common/token/user

Returns user info and permissions. Requires valid Authorization header.

Mock support: Timeout, 400, 401, 403, 500, 503 errors

POST /api/v1/admin/common/users/search/reestr

Search users in registry with filtering and pagination

Mock support: Timeout, 400, 401, 403, 500, 503 errors

POST /auth/login

Authentication endpoint that returns JWT token

Mock support: Timeout, 400, 401, 403, 500, 503 errors

GET /tokens

List all last issued tokens (debug endpoint)

POST /tokens/<username>/delete — revoke stored token for a user

GET /mock/config

View current mock configuration (JSON)


Quick Test Examples:


# 1. Login to get a token
curl -X POST http://localhost:5000/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username": "user10", "password": "any"}'

# 2. Use the token to get user info
curl -X GET http://localhost:5000/api/v1/admin/common/token/user \
  -H "Authorization: Bearer <your_token>"

# 3. Search users
curl -X POST "http://localhost:5000/api/v1/admin/common/users/search/reestr?limit=5&page=0" \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{"status": ["ACTIVE"]}'