@@ -23,6 +23,67 @@ const docTemplate = `{
2323 "host": "{{.Host}}",
2424 "basePath": "{{.BasePath}}",
2525 "paths": {
26+ "/api/auth/session": {
27+ "post": {
28+ "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+ },
2687 "/api/client/available": {
2788 "post": {
2889 "description": "Check if a client profile is available",
@@ -690,12 +751,6 @@ const docTemplate = `{
690751 "properties": {
691752 "id": {
692753 "type": "string"
693- },
694- "key": {
695- "type": "string"
696- },
697- "signature": {
698- "type": "string"
699754 }
700755 }
701756 },
@@ -738,6 +793,32 @@ const docTemplate = `{
738793 }
739794 }
740795 },
796+ "api.SessionRequest": {
797+ "type": "object",
798+ "required": [
799+ "key",
800+ "signature"
801+ ],
802+ "properties": {
803+ "key": {
804+ "type": "string"
805+ },
806+ "signature": {
807+ "type": "string"
808+ }
809+ }
810+ },
811+ "api.SessionResponse": {
812+ "type": "object",
813+ "properties": {
814+ "expires_at": {
815+ "type": "integer"
816+ },
817+ "token": {
818+ "type": "string"
819+ }
820+ }
821+ },
741822 "api.TxRenewRequest": {
742823 "type": "object",
743824 "properties": {
@@ -825,12 +906,6 @@ const docTemplate = `{
825906 "client_id": {
826907 "type": "string"
827908 },
828- "key": {
829- "type": "string"
830- },
831- "signature": {
832- "type": "string"
833- },
834909 "wg_pubkey": {
835910 "type": "string"
836911 }
@@ -866,12 +941,6 @@ const docTemplate = `{
866941 "properties": {
867942 "client_id": {
868943 "type": "string"
869- },
870- "key": {
871- "type": "string"
872- },
873- "signature": {
874- "type": "string"
875944 }
876945 }
877946 },
@@ -895,12 +964,6 @@ const docTemplate = `{
895964 "client_id": {
896965 "type": "string"
897966 },
898- "key": {
899- "type": "string"
900- },
901- "signature": {
902- "type": "string"
903- },
904967 "wg_pubkey": {
905968 "type": "string"
906969 }
@@ -912,12 +975,6 @@ const docTemplate = `{
912975 "client_id": {
913976 "type": "string"
914977 },
915- "key": {
916- "type": "string"
917- },
918- "signature": {
919- "type": "string"
920- },
921978 "wg_pubkey": {
922979 "type": "string"
923980 }
0 commit comments