3
0
corteza/api/system/spec/auth.json
2020-08-12 18:39:28 +02:00

70 lines
1.5 KiB
JSON

{
"Title": "Authentication",
"Interface": "Auth",
"Struct": null,
"Parameters": null,
"Protocol": "",
"Authentication": [],
"Path": "/auth",
"APIs": [
{
"Name": "settings",
"Method": "GET",
"Title": "Returns auth settings",
"Path": "/",
"Parameters": {}
},
{
"Name": "check",
"Method": "GET",
"Title": "Check JWT token",
"Path": "/check",
"Parameters": {}
},
{
"Name": "impersonate",
"Method": "POST",
"Title": "Impersonate a user",
"Path": "/impersonate",
"Parameters": {
"post": [
{
"name": "userID",
"required": true,
"title": "ID of the impersonated user",
"type": "uint64"
},
{
"name": "expire",
"required": false,
"title": "expiration time in seconds, must be shorter than 24h",
"type": "int"
}
]
}
},
{
"Name": "exchangeAuthToken",
"Method": "POST",
"Title": "Exchange auth token for JWT",
"Path": "/exchange",
"Parameters": {
"post": [
{
"name": "token",
"required": true,
"title": "Token to be exchanged for JWT",
"type": "string"
}
]
}
},
{
"Name": "logout",
"Method": "GET",
"Title": "Logout",
"Path": "/logout",
"Parameters": {}
}
]
}