Files
auth-service/users.http

53 lines
1.5 KiB
HTTP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Список всех пользователей
GET http://localhost:4002/users HTTP/1.1
### Получить одного пользователя
GET http://localhost:4002/users/admin HTTP/1.1
### Создать пользователя
POST http://localhost:4002/users HTTP/1.1
content-type: application/json
{
"login": "string",
"avatar": "string",
"password": "string"
}
### Обновить данные пользователя
PUT http://localhost:4002/users HTTP/1.1
content-type: application/json
{
"login": "string",
"avatar": "string"
}
### Удалить пользователя
DELETE http://localhost:4002/users/string HTTP/1.1
### Авторизоватся
POST http://localhost:4002/auth HTTP/1.1
content-type: application/json
{
"login": "string",
"password": "string"
}
### Обновить токены
POST http://localhost:4002/auth/refresh HTTP/1.1
content-type: application/json
{
"refresh_token": "eyJhbGciOiJIUz3I1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbiI6InN0cmluZyIsImhvc3QiOiJsb2NhbGhvc3Q6NDAwMiIsImFnZW50IjoidnNjb2RlLXJlc3RjbGllbnQiLCJpYXQiOjE1OTYyMzE3NjIsImV4cCI6MTU5NjMxODE2Mn0.nRU429auiyhqrmIr5qXc8kjnWZXtmWYE50iDKOPFmkk"
}
### Проверить токен
POST http://localhost:4002/auth/check HTTP/1.1
content-type: application/json
{
"access_token": "eyаJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbiI6InN0cmluZyIsImhvc3QiOiJsb2NhbGhvc3Q6NDAwMiIsImFnZW50IjoidnNjb2RlLXJlc3RjbGllbnQiLCJpYXQiOjE1OTYyMzE1MzQsImV4cCI6MTU5NjIzMTY1NH0.muSl2TE2gQ78UxfaufO5SWszN5h0yYbPvR5_1PB-d2c"
}