authservice/openapi.yaml

78 lines
1.7 KiB
YAML

openapi: 3.0.0
info:
title: AuthService
version: "0.1"
paths:
/token:
post:
tags: [ "JWT" ]
summary: Accept encrypted or clear set of credentials, return JWT token
operationId: auth.generateToken
requestBody:
content:
'application/json':
schema:
anyOf:
- $ref: '#/components/schemas/User'
- $ref: '#/components/schemas/EncUser'
responses:
'200':
description: JWT token
content:
'text/plain':
schema:
type: string
/test:
get:
tags: [ "Test" ]
summary: Return secret string
operationId: auth.testToken
responses:
'200':
description: secret response
content:
'text/plain':
schema:
type: string
security:
- jwt: ['secret']
/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
components:
securitySchemes:
jwt:
type: http
scheme: bearer
bearerFormat: JWT
x-bearerInfoFunc: auth.decodeToken
schemas:
User:
description: Application/Login/Password tuple
type: object
properties:
application:
type: string
login:
type: string
password:
type: string
EncUser:
description: Encrypted Application/Login/Password tuple
type: object
properties:
encAleTuple:
type: string