initial
This commit is contained in:
53
openapi.yaml
Normal file
53
openapi.yaml
Normal 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
|
Reference in New Issue
Block a user