This commit is contained in:
2021-01-25 21:52:52 +01:00
commit b88dec12d3
9 changed files with 240 additions and 0 deletions

53
openapi.yaml Normal file
View File

@ -0,0 +1,53 @@
openapi: 3.0.0
info:
title: AuthService
version: "0.1"
paths:
/auth/{login}:
post:
tags: [ "JWT" ]
summary: Return JWT token
operationId: auth.generateToken
parameters:
- name: login
description: Login
in: path
required: true
schema:
type: string
- name: password
description: Password
in: body
required: true
schema:
type: string
responses:
'200':
description: JWT token
content:
'text/plain':
schema:
type: string
/secret:
get:
tags: [ "JWT" ]
summary: Return secret string
operationId: auth.getSecret
responses:
'200':
description: secret response
content:
'text/plain':
schema:
type: string
security:
- jwt: ['secret']
components:
securitySchemes:
jwt:
type: http
scheme: bearer
bearerFormat: JWT
x-bearerInfoFunc: auth.decodeToken