TECH. Добавлены http файлы для работы с пользователями и авторизацией
This commit is contained in:
26
http/auth.http
Normal file
26
http/auth.http
Normal file
@ -0,0 +1,26 @@
|
||||
### Авторизоватся
|
||||
POST http://api.auth.vigdorov.ru/auth HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"login": "string",
|
||||
"password": "string"
|
||||
}
|
||||
|
||||
### Обновить токены
|
||||
POST http://api.auth.vigdorov.ru/auth/refresh HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbiI6InN0cmluZyIsImhvc3QiOiJsb2NhbGhvc3Q6NDAwMiIsImFnZW50IjoidnNjb2RlLXJlc3RjbGllbnQiLCJpYXQiOjE1OTU3OTA0MjgsImV4cCI6MTU5NTg3NjgyOH0.4gsUq6rGT917BBqNT6PMAONvGVzscE0WqeU6pyCpAw0"
|
||||
}
|
||||
|
||||
### Проверить токен
|
||||
POST http://api.auth.vigdorov.ru/auth/check HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbiI6InN0cmluZyIsImhvc3QiOiJsb2NhbGhvc3Q6NDAwMiIsImFnZW50IjoidnNjb2RlLXJlc3RjbGllbnQiLCJpYXQiOjE1OTU3OTA0NDYsImV4cCI6MTU5NTc5MDU2Nn0.OMMDMgDp45RGBiBGRPf7hZ9_gNt7rKD1Ypwyt5cHVfc",
|
||||
"host": "api.auth.vigdorov.ru",
|
||||
"agent": "vscode-restclient"
|
||||
}
|
||||
59
http/store.http
Normal file
59
http/store.http
Normal file
@ -0,0 +1,59 @@
|
||||
// Запрос всех пар ключей апи
|
||||
GET http://vigdorov.ru:4001/store HTTP/1.1
|
||||
Api-Name: store-service-test
|
||||
|
||||
###
|
||||
// Запрос апи по ключу
|
||||
GET http://vigdorov.ru:4001/store/testApi HTTP/1.1
|
||||
Api-Name: store-service-test
|
||||
|
||||
###
|
||||
// Создание нового апи
|
||||
POST http://vigdorov.ru:4001/store HTTP/1.1
|
||||
content-type: application/json
|
||||
Api-Name: store-service-test
|
||||
|
||||
{
|
||||
"key": "testApi",
|
||||
"value": {
|
||||
"name": "ivan",
|
||||
"age": 16
|
||||
},
|
||||
"description": "тестовое апи",
|
||||
"service_name": "test-api",
|
||||
"author": "vigdorov"
|
||||
}
|
||||
|
||||
###
|
||||
// Обновление существующего апи
|
||||
PUT http://vigdorov.ru:4001/store HTTP/1.1
|
||||
content-type: application/json
|
||||
Api-Name: store-service-test
|
||||
|
||||
{
|
||||
"key": "testApigg",
|
||||
"value": {
|
||||
"name": "ivan23",
|
||||
"age": 22
|
||||
},
|
||||
"description": "тестовое апи",
|
||||
"service_name": "test-api",
|
||||
"author": "vigdorov23422"
|
||||
}
|
||||
|
||||
###
|
||||
// Удаление апи
|
||||
DELETE http://vigdorov.ru:4001/store/testApi HTTP/1.1
|
||||
Api-Name: store-service-test
|
||||
|
||||
###
|
||||
GET http://vigdorov.ru:4001/logs/server HTTP/1.1
|
||||
|
||||
###
|
||||
GET http://vigdorov.ru:4001/logs/client HTTP/1.1
|
||||
|
||||
###
|
||||
DELETE http://vigdorov.ru:4001/logs/server HTTP/1.1
|
||||
|
||||
###
|
||||
DELETE http://vigdorov.ru:4001/logs/client HTTP/1.1
|
||||
27
http/users.http
Normal file
27
http/users.http
Normal file
@ -0,0 +1,27 @@
|
||||
### Список всех пользователей
|
||||
GET http://api.auth.vigdorov.ru/users HTTP/1.1
|
||||
|
||||
### Получить одного пользователя
|
||||
GET http://api.auth.vigdorov.ru/users/admin HTTP/1.1
|
||||
|
||||
### Создать пользователя
|
||||
POST http://api.auth.vigdorov.ru/users HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"login": "string",
|
||||
"avatar": "string",
|
||||
"password": "string"
|
||||
}
|
||||
|
||||
### Обновить данные пользователя
|
||||
PUT http://api.auth.vigdorov.ru/users HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"login": "string",
|
||||
"avatar": "string"
|
||||
}
|
||||
|
||||
### Удалить пользователя
|
||||
DELETE http://api.auth.vigdorov.ru/users/string HTTP/1.1
|
||||
Reference in New Issue
Block a user