-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
59 lines (58 loc) · 1.38 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
openapi: 3.0.0
info:
title: Authentication API
version: "1.1"
servers:
- url: http://localhost:14314
paths:
/generate:
get:
summary: Generate an authorization cookie
parameters:
- name: sub
in: query
description: Subject
required: true
schema:
type: string
- name: domain
in: query
description: Domain
required: true
schema:
type: string
- name: duration
in: query
description: Duration how long the cookie is valid (in seconds)
required: true
schema:
type: integer
minimum: 0
responses:
'200':
description: OK
headers:
REQUEST_AUTHORIZATION_TOKEN:
schema:
type: string
/check/{sub}:
get:
summary: Check a request for a valid authorization token
parameters:
- name: sub
in: path
description: Subject
required: true
schema:
type: string
- name: REQUEST_AUTHORIZATION_TOKEN
in: header
description: Request Authorization Token
required: true
schema:
type: string
responses:
'200':
description: Authorized
'401':
description: Not authorized