Skip to content

Commit a277a5d

Browse files
committed
Adds LDAP auth support
1 parent 8434a2d commit a277a5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+749
-290
lines changed

backend/embed/api_docs/api.swagger.json

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@
1010
"$ref": "file://./paths/get.json"
1111
}
1212
},
13+
"/auth": {
14+
"get": {
15+
"$ref": "file://./paths/auth/get.json"
16+
},
17+
"post": {
18+
"$ref": "file://./paths/auth/post.json"
19+
}
20+
},
21+
"/auth/refresh": {
22+
"post": {
23+
"$ref": "file://./paths/auth/refresh/post.json"
24+
}
25+
},
26+
"/auth/sse": {
27+
"post": {
28+
"$ref": "file://./paths/auth/sse/post.json"
29+
}
30+
},
1331
"/certificates": {
1432
"get": {
1533
"$ref": "file://./paths/certificates/get.json"
@@ -155,19 +173,6 @@
155173
"$ref": "file://./paths/streams/streamID/delete.json"
156174
}
157175
},
158-
"/tokens": {
159-
"get": {
160-
"$ref": "file://./paths/tokens/get.json"
161-
},
162-
"post": {
163-
"$ref": "file://./paths/tokens/post.json"
164-
}
165-
},
166-
"/tokens/sse": {
167-
"post": {
168-
"$ref": "file://./paths/tokens/sse/post.json"
169-
}
170-
},
171176
"/upstreams": {
172177
"get": {
173178
"$ref": "file://./paths/upstreams/get.json"
@@ -219,6 +224,9 @@
219224
},
220225
"components": {
221226
"schemas": {
227+
"AuthConfigObject": {
228+
"$ref": "file://./components/AuthConfigObject.json"
229+
},
222230
"CertificateAuthorityList": {
223231
"$ref": "file://./components/CertificateAuthorityList.json"
224232
},
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type": "array",
3+
"description": "AuthConfigObject",
4+
"minItems": 1,
5+
"items": {
6+
"type": "string",
7+
"enum": [
8+
"local",
9+
"ldap",
10+
"oidc"
11+
]
12+
}
13+
}

backend/embed/api_docs/components/UserObject.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"created_at",
88
"updated_at",
99
"name",
10-
"nickname",
1110
"email",
1211
"is_disabled"
1312
],
@@ -29,12 +28,7 @@
2928
"name": {
3029
"type": "string",
3130
"minLength": 2,
32-
"maxLength": 100
33-
},
34-
"nickname": {
35-
"type": "string",
36-
"minLength": 2,
37-
"maxLength": 100
31+
"maxLength": 50
3832
},
3933
"email": {
4034
"type": "string",
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"operationId": "getAuthConfig",
3+
"summary": "Returns auth configuration",
4+
"tags": ["Auth"],
5+
"responses": {
6+
"200": {
7+
"description": "200 response",
8+
"content": {
9+
"application/json": {
10+
"schema": {
11+
"type": "object",
12+
"required": ["result"],
13+
"properties": {
14+
"result": {
15+
"$ref": "#/components/schemas/AuthConfigObject"
16+
}
17+
}
18+
},
19+
"examples": {
20+
"default": {
21+
"value": "todo"
22+
}
23+
}
24+
}
25+
}
26+
}
27+
}
28+
}

backend/embed/api_docs/paths/tokens/post.json renamed to backend/embed/api_docs/paths/auth/post.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"operationId": "requestToken",
33
"summary": "Request a new access token from credentials",
4-
"tags": ["Tokens"],
4+
"tags": ["Auth"],
55
"requestBody": {
66
"description": "Credentials Payload",
77
"required": true,

backend/embed/api_docs/paths/tokens/get.json renamed to backend/embed/api_docs/paths/auth/refresh/post.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"operationId": "refreshToken",
33
"summary": "Refresh your access token",
4-
"tags": ["Tokens"],
4+
"tags": ["Auth"],
55
"responses": {
66
"200": {
77
"description": "200 response",

backend/embed/api_docs/paths/tokens/sse/post.json renamed to backend/embed/api_docs/paths/auth/sse/post.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"operationId": "requestSSEToken",
33
"summary": "Request a new SSE token",
4-
"tags": ["Tokens"],
4+
"tags": ["Auth"],
55
"responses": {
66
"200": {
77
"description": "200 response",

backend/embed/api_docs/paths/users/get.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"type": "string"
2929
},
3030
"description": "The sorting of the list",
31-
"example": "name,nickname.desc,email.asc"
31+
"example": "name,email.asc"
3232
}
3333
],
3434
"responses": {
@@ -57,10 +57,6 @@
5757
"field": "name",
5858
"direction": "ASC"
5959
},
60-
{
61-
"field": "nickname",
62-
"direction": "DESC"
63-
},
6460
{
6561
"field": "email",
6662
"direction": "ASC"
@@ -70,7 +66,6 @@
7066
{
7167
"id": 1,
7268
"name": "Jamie Curnow",
73-
"nickname": "James",
7469
"email": "[email protected]",
7570
"created_at": 1578010090000,
7671
"updated_at": 1578010095000,
@@ -81,7 +76,6 @@
8176
{
8277
"id": 2,
8378
"name": "John Doe",
84-
"nickname": "John",
8579
"email": "[email protected]",
8680
"created_at": 1578010100000,
8781
"updated_at": 1578010105000,
@@ -95,7 +89,6 @@
9589
{
9690
"id": 3,
9791
"name": "Jane Doe",
98-
"nickname": "Jane",
9992
"email": "[email protected]",
10093
"created_at": 1578010110000,
10194
"updated_at": 1578010115000,

backend/embed/api_docs/paths/users/post.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"result": {
3232
"id": 1,
3333
"name": "Jamie Curnow",
34-
"nickname": "James",
3534
"email": "[email protected]",
3635
"created_at": 1578010100000,
3736
"updated_at": 1578010100000,

backend/embed/api_docs/paths/users/userID/get.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"result": {
4444
"id": 1,
4545
"name": "Jamie Curnow",
46-
"nickname": "James",
4746
"email": "[email protected]",
4847
"created_at": 1578010100000,
4948
"updated_at": 1578010105000,

0 commit comments

Comments
 (0)