You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Exchange a wallet-signed challenge for a short-lived session token covering all of the wallet's subscriptions",
29
+
"consumes": [
30
+
"application/json"
31
+
],
32
+
"produces": [
33
+
"application/json"
34
+
],
35
+
"summary": "AuthSession",
36
+
"parameters": [
37
+
{
38
+
"description": "Session Request",
39
+
"name": "SessionRequest",
40
+
"in": "body",
41
+
"required": true,
42
+
"schema": {
43
+
"$ref": "#/definitions/api.SessionRequest"
44
+
}
45
+
}
46
+
],
47
+
"responses": {
48
+
"200": {
49
+
"description": "Session token",
50
+
"schema": {
51
+
"$ref": "#/definitions/api.SessionResponse"
52
+
}
53
+
},
54
+
"400": {
55
+
"description": "Bad Request",
56
+
"schema": {
57
+
"$ref": "#/definitions/api.ErrorResponse"
58
+
}
59
+
},
60
+
"401": {
61
+
"description": "Unauthorized",
62
+
"schema": {
63
+
"$ref": "#/definitions/api.ErrorResponse"
64
+
}
65
+
},
66
+
"403": {
67
+
"description": "Forbidden (no subscriptions for wallet)",
68
+
"schema": {
69
+
"$ref": "#/definitions/api.ErrorResponse"
70
+
}
71
+
},
72
+
"405": {
73
+
"description": "Method Not Allowed",
74
+
"schema": {
75
+
"type": "string"
76
+
}
77
+
},
78
+
"500": {
79
+
"description": "Server Error",
80
+
"schema": {
81
+
"$ref": "#/definitions/api.ErrorResponse"
82
+
}
83
+
}
84
+
}
85
+
}
86
+
},
26
87
"/api/client/available": {
27
88
"post": {
28
89
"description": "Check if a client profile is available",
@@ -123,7 +184,12 @@ const docTemplate = `{
123
184
},
124
185
"/api/client/profile": {
125
186
"post": {
126
-
"description": "Fetch a client VPN profile given a COSE payload via signed S3 link",
187
+
"security": [
188
+
{
189
+
"BearerAuth": []
190
+
}
191
+
],
192
+
"description": "Fetch a client VPN profile via a signed S3 link; authenticate with a session Bearer token and provide the subscription id in the body",
127
193
"consumes": [
128
194
"application/json"
129
195
],
@@ -152,6 +218,18 @@ const docTemplate = `{
152
218
"type": "string"
153
219
}
154
220
},
221
+
"401": {
222
+
"description": "Unauthorized",
223
+
"schema": {
224
+
"type": "string"
225
+
}
226
+
},
227
+
"403": {
228
+
"description": "Forbidden",
229
+
"schema": {
230
+
"type": "string"
231
+
}
232
+
},
155
233
"405": {
156
234
"description": "Method Not Allowed",
157
235
"schema": {
@@ -169,6 +247,11 @@ const docTemplate = `{
169
247
},
170
248
"/api/client/wg-devices": {
171
249
"post": {
250
+
"security": [
251
+
{
252
+
"BearerAuth": []
253
+
}
254
+
],
172
255
"description": "List all WireGuard devices registered for a client",
173
256
"consumes": [
174
257
"application/json"
@@ -224,6 +307,11 @@ const docTemplate = `{
224
307
},
225
308
"/api/client/wg-peer": {
226
309
"delete": {
310
+
"security": [
311
+
{
312
+
"BearerAuth": []
313
+
}
314
+
],
227
315
"description": "Remove a WireGuard device registration",
228
316
"consumes": [
229
317
"application/json"
@@ -291,6 +379,11 @@ const docTemplate = `{
291
379
},
292
380
"/api/client/wg-profile": {
293
381
"post": {
382
+
"security": [
383
+
{
384
+
"BearerAuth": []
385
+
}
386
+
],
294
387
"description": "Get a WireGuard configuration profile for a registered device",
295
388
"consumes": [
296
389
"application/json"
@@ -359,6 +452,11 @@ const docTemplate = `{
359
452
},
360
453
"/api/client/wg-register": {
361
454
"post": {
455
+
"security": [
456
+
{
457
+
"BearerAuth": []
458
+
}
459
+
],
362
460
"description": "Register a new WireGuard device for a client",
363
461
"consumes": [
364
462
"application/json"
@@ -690,12 +788,6 @@ const docTemplate = `{
690
788
"properties": {
691
789
"id": {
692
790
"type": "string"
693
-
},
694
-
"key": {
695
-
"type": "string"
696
-
},
697
-
"signature": {
698
-
"type": "string"
699
791
}
700
792
}
701
793
},
@@ -738,6 +830,32 @@ const docTemplate = `{
738
830
}
739
831
}
740
832
},
833
+
"api.SessionRequest": {
834
+
"type": "object",
835
+
"required": [
836
+
"key",
837
+
"signature"
838
+
],
839
+
"properties": {
840
+
"key": {
841
+
"type": "string"
842
+
},
843
+
"signature": {
844
+
"type": "string"
845
+
}
846
+
}
847
+
},
848
+
"api.SessionResponse": {
849
+
"type": "object",
850
+
"properties": {
851
+
"expires_at": {
852
+
"type": "integer"
853
+
},
854
+
"token": {
855
+
"type": "string"
856
+
}
857
+
}
858
+
},
741
859
"api.TxRenewRequest": {
742
860
"type": "object",
743
861
"properties": {
@@ -825,12 +943,6 @@ const docTemplate = `{
825
943
"client_id": {
826
944
"type": "string"
827
945
},
828
-
"key": {
829
-
"type": "string"
830
-
},
831
-
"signature": {
832
-
"type": "string"
833
-
},
834
946
"wg_pubkey": {
835
947
"type": "string"
836
948
}
@@ -866,12 +978,6 @@ const docTemplate = `{
866
978
"properties": {
867
979
"client_id": {
868
980
"type": "string"
869
-
},
870
-
"key": {
871
-
"type": "string"
872
-
},
873
-
"signature": {
874
-
"type": "string"
875
981
}
876
982
}
877
983
},
@@ -895,12 +1001,6 @@ const docTemplate = `{
895
1001
"client_id": {
896
1002
"type": "string"
897
1003
},
898
-
"key": {
899
-
"type": "string"
900
-
},
901
-
"signature": {
902
-
"type": "string"
903
-
},
904
1004
"wg_pubkey": {
905
1005
"type": "string"
906
1006
}
@@ -912,12 +1012,6 @@ const docTemplate = `{
912
1012
"client_id": {
913
1013
"type": "string"
914
1014
},
915
-
"key": {
916
-
"type": "string"
917
-
},
918
-
"signature": {
919
-
"type": "string"
920
-
},
921
1015
"wg_pubkey": {
922
1016
"type": "string"
923
1017
}
@@ -940,6 +1034,14 @@ const docTemplate = `{
940
1034
}
941
1035
}
942
1036
}
1037
+
},
1038
+
"securityDefinitions": {
1039
+
"BearerAuth": {
1040
+
"description": "Session token from POST /api/auth/session, sent as \"Bearer \u003ctoken\u003e\".",
0 commit comments