authservice/openapi.yaml

87 lines
1.9 KiB
YAML
Raw Normal View History

2021-01-25 21:52:52 +01:00
openapi: 3.0.0
info:
title: AuthService
version: "0.1"
paths:
2021-01-26 13:43:09 +01:00
/auth:
2021-01-25 21:52:52 +01:00
post:
tags: [ "JWT" ]
2021-05-07 12:15:30 +02:00
summary: Accept login and password, return JWT token
2021-01-25 21:52:52 +01:00
operationId: auth.generateToken
2021-01-26 13:43:09 +01:00
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/User'
2021-05-07 12:15:30 +02:00
responses:
'200':
description: JWT token
content:
'text/plain':
schema:
type: string
/authe:
post:
tags: [ "JWT" ]
summary: Accept encrypted set of credentials, return JWT token
2021-05-07 12:24:59 +02:00
operationId: auth.generateTokenFromEnc
2021-05-07 12:15:30 +02:00
requestBody:
content:
'text/plain':
schema:
type: string
2021-01-25 21:52:52 +01:00
responses:
'200':
description: JWT token
content:
'text/plain':
schema:
type: string
/secret:
get:
tags: [ "JWT" ]
summary: Return secret string
2021-05-11 16:48:02 +02:00
operationId: auth.getSecret
2021-01-25 21:52:52 +01:00
responses:
'200':
description: secret response
content:
'text/plain':
schema:
type: string
security:
- jwt: ['secret']
2021-05-06 16:37:32 +02:00
/pubkey:
get:
tags: [ "JWT" ]
summary: Get the public key of this issuer
operationId: auth.getPubKey
responses:
'200':
description: public key
content:
'text/plain':
schema:
type: string
2021-01-25 21:52:52 +01:00
components:
securitySchemes:
jwt:
type: http
scheme: bearer
bearerFormat: JWT
2021-05-11 16:48:02 +02:00
x-bearerInfoFunc: auth.decodeToken
2021-01-26 13:43:09 +01:00
schemas:
User:
2021-01-26 21:27:17 +01:00
description: Application/Login/Password tuple
2021-01-26 13:43:09 +01:00
type: object
properties:
2021-01-26 21:27:17 +01:00
application:
type: string
2021-01-26 13:43:09 +01:00
login:
type: string
password:
type: string