2018-05-07 14:13:07 +00:00
|
|
|
Creates new token for given account
|
|
|
|
Requires a registered User with a valid username and password
|
|
|
|
Creates a JWT token and returns it or returns an error if credentials are wrong
|
|
|
|
---
|
|
|
|
tags:
|
|
|
|
- Token
|
|
|
|
- Account
|
|
|
|
parameters:
|
|
|
|
- in: body
|
|
|
|
name: body
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
required:
|
|
|
|
- user
|
|
|
|
properties:
|
|
|
|
user:
|
|
|
|
$ref: '#/definitions/Credentials'
|
2018-05-07 15:17:19 +00:00
|
|
|
security: []
|
2018-05-07 14:13:07 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful creation
|
|
|
|
schema:
|
|
|
|
required:
|
|
|
|
- status
|
|
|
|
- token
|
|
|
|
properties:
|
|
|
|
status:
|
|
|
|
type: string
|
2018-09-23 16:56:29 +00:00
|
|
|
example: success
|
2018-05-07 14:13:07 +00:00
|
|
|
token:
|
|
|
|
type: string
|
|
|
|
description: JWT token
|
|
|
|
401:
|
|
|
|
description: Bad credentials
|
|
|
|
schema:
|
2018-05-07 15:17:19 +00:00
|
|
|
$ref: '#/definitions/UnauthorizedError'
|