// Document 1: authenticate and obtain a token
localhost:50051
auth.AuthService/Login
{
"login": "admin",
"password": "secret"
}
{
"expires_in": 3600,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}
users.UserService/GetUser
Authorization: Bearer {{token}}
{
"user_id": 42
}
{
"id": 42,
"name": "Alice",
"email": "alice@example.com"
}
// Document 3: list orders with the same token
orders.OrderService/ListOrders
Authorization: Bearer {{token}}
{
"limit": 10,
"user_id": 42
}
{
"orders": [
{
"id": "ord-1",
"status": "delivered"
}
]
}
settings.SettingsService/GetPublicSettings
{}
{
"language": "en",
"theme": "dark"
}