support handover of cleartext and encrypted credentials, refactor naming of methods
This commit is contained in:
35
openapi.yaml
35
openapi.yaml
@ -4,16 +4,18 @@ info:
|
||||
version: "0.1"
|
||||
|
||||
paths:
|
||||
/auth:
|
||||
/token:
|
||||
post:
|
||||
tags: [ "JWT" ]
|
||||
summary: Accept login and password, return JWT token
|
||||
summary: Accept encrypted or clear set of credentials, return JWT token
|
||||
operationId: auth.generateToken
|
||||
requestBody:
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/User'
|
||||
- $ref: '#/components/schemas/EncUser'
|
||||
responses:
|
||||
'200':
|
||||
description: JWT token
|
||||
@ -21,28 +23,11 @@ paths:
|
||||
'text/plain':
|
||||
schema:
|
||||
type: string
|
||||
/authe:
|
||||
post:
|
||||
tags: [ "JWT" ]
|
||||
summary: Accept encrypted set of credentials, return JWT token
|
||||
operationId: auth.generateTokenFromEnc
|
||||
requestBody:
|
||||
content:
|
||||
'text/plain':
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: JWT token
|
||||
content:
|
||||
'text/plain':
|
||||
schema:
|
||||
type: string
|
||||
/secret:
|
||||
/test:
|
||||
get:
|
||||
tags: [ "Test" ]
|
||||
summary: Return secret string
|
||||
operationId: auth.getSecret
|
||||
operationId: auth.testToken
|
||||
responses:
|
||||
'200':
|
||||
description: secret response
|
||||
@ -84,3 +69,9 @@ components:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
EncUser:
|
||||
description: Encrypted Application/Login/Password tuple
|
||||
type: object
|
||||
properties:
|
||||
encAleTuple:
|
||||
type: string
|
||||
|
Reference in New Issue
Block a user