mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-22 17:06:41 -06:00
83 lines
2.8 KiB
JSON
83 lines
2.8 KiB
JSON
{
|
|
"post": {
|
|
"tags": [
|
|
"Authentication"
|
|
],
|
|
"summary": "Perform authentication",
|
|
"description": "Performs an authentication",
|
|
"requestBody": {
|
|
"description": "Request body.",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"apiKey"
|
|
],
|
|
"properties": {
|
|
"apiKey": {
|
|
"description": "The API key to authenticate with",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The authentication worked.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"token": {
|
|
"type": "string",
|
|
"description": "The authentication token that needs to be sent in the Authorization header"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "An API key was not provided.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "../definitions/Error.json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "The API key is incorrect, is disabled or has expired.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "../definitions/Error.json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Unexpected error.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "../definitions/Error.json"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|