-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkisee.yml
161 lines (155 loc) · 4.09 KB
/
kisee.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
---
openapi: 3.0.0
info:
title: Kisee Identity Manager
description: An elementary identity manager, which only expose any user/password storage as an API.
contact:
name: Author
url: https://github.com/meltygroup/kisee
license:
name: MIT
url: https://opensource.org/licenses/mit-license.php
version: v1
paths:
/users/:
get:
description: Just give some informations about the users endpoint.
responses:
'200':
description: "Endpoint informations, but no users."
post:
description: User registration
requestBody:
required: true
description: User informations
content:
application/json:
schema:
$ref: '#/components/schemas/user_info'
responses:
'201':
description: Newly created user, see Location header.
'400':
description: An input field is missing, or email is invalid.
'409':
description: User already exists.
patch:
description: To change a user password.
requestBody:
required: true
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/patch'
responses:
'204':
description: "Empty body, patch successfull."
'400':
description: "Patch body may be an invalid json-patch, or try to change something else than the password."
'403':
description: "You're not allowed to change this user's password."
/jwt/:
post:
description: Create a new JWT
requestBody:
description: User username and password
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/user_password'
responses:
'200':
description: Newly created JWT
content:
application/json:
schema:
$ref: '#/components/schemas/new_jwt'
'400':
description: "A required field is missing."
'403':
description: "Invalid username or password."
get:
description: Only a hint POST is possible.
responses:
'200':
description: 'Currently only here to describe the API.'
/password_recoveries/:
get:
description: Only a hint POST is possible.
responses:
'200':
description: 'Currently only here to describe the API.'
post:
description: Start a password recovery process
requestBody:
description: User username or email.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/username_or_email'
/jwt{/jid}:
get:
description: Not implemented
responses:
'500':
description: "This is literally not implemented yet."
components:
schemas:
user:
type: object
new_jwt:
type: object
properties:
tokens:
type: array
items:
type: string
example: eyJ0eXAiOiJKV1QiLCJhbGciOiJ...
user_password:
type: object
required: ["username", "password"]
properties:
username:
type: string
password:
type: string
format: password
jwt:
type: object
additionalProperties:
type: object
user_info:
allOf:
- $ref: '#/components/schemas/user_password'
- type: object
required: ["email"]
properties:
email:
type: string
format: email
username_or_email:
oneOf:
- type: object
required: ["username"]
properties:
username:
type: string
- type: object
required: ["email"]
properties:
email:
type: string
format: email
patch:
type: array
items:
type: object
properties:
op:
type: string
path:
type: string
value:
type: string