@boxyhq/saml-jackson 1.2.2 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controller/admin.d.ts +4 -4
- package/dist/controller/admin.js +6 -6
- package/dist/controller/api.d.ts +460 -204
- package/dist/controller/api.js +561 -377
- package/dist/controller/connection/oidc.d.ts +9 -0
- package/dist/controller/connection/oidc.js +145 -0
- package/dist/controller/connection/saml.d.ts +9 -0
- package/dist/controller/connection/saml.js +174 -0
- package/dist/controller/logout.d.ts +3 -3
- package/dist/controller/logout.js +14 -14
- package/dist/controller/oauth.d.ts +26 -8
- package/dist/controller/oauth.js +375 -143
- package/dist/controller/oidc-discovery.js +2 -1
- package/dist/controller/utils.d.ts +10 -2
- package/dist/controller/utils.js +88 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +23 -14
- package/dist/loadConnection.d.ts +3 -0
- package/dist/{read-config.js → loadConnection.js} +13 -12
- package/dist/opentelemetry/metrics.js +12 -12
- package/dist/typings.d.ts +155 -36
- package/package.json +11 -10
- package/dist/read-config.d.ts +0 -3
package/dist/controller/api.d.ts
CHANGED
@@ -1,266 +1,522 @@
|
|
1
|
-
import {
|
2
|
-
export declare class
|
3
|
-
private
|
4
|
-
|
5
|
-
|
1
|
+
import { GetConfigQuery, GetConnectionsQuery, DelConnectionsQuery, IConnectionAPIController, SAMLSSOConnectionWithEncodedMetadata, SAMLSSOConnectionWithRawMetadata, OIDCSSOConnection, SAMLSSORecord, OIDCSSORecord } from '../typings';
|
2
|
+
export declare class ConnectionAPIController implements IConnectionAPIController {
|
3
|
+
private connectionStore;
|
4
|
+
private opts;
|
5
|
+
constructor({ connectionStore, opts }: {
|
6
|
+
connectionStore: any;
|
7
|
+
opts: any;
|
6
8
|
});
|
7
|
-
private _validateRedirectUrl;
|
8
|
-
private _validateIdPConfig;
|
9
9
|
/**
|
10
10
|
* @swagger
|
11
|
+
* definitions:
|
12
|
+
* Connection:
|
13
|
+
* type: object
|
14
|
+
* example:
|
15
|
+
* {
|
16
|
+
* "idpMetadata": {
|
17
|
+
* "sso": {
|
18
|
+
* "postUrl": "https://dev-20901260.okta.com/app/dev-20901260_jacksonnext_1/xxxxxxxxxxxsso/saml",
|
19
|
+
* "redirectUrl": "https://dev-20901260.okta.com/app/dev-20901260_jacksonnext_1/xxxxxxxxxxxsso/saml"
|
20
|
+
* },
|
21
|
+
* "entityID": "http://www.okta.com/xxxxxxxxxxxxx",
|
22
|
+
* "thumbprint": "Eo+eUi3UM3XIMkFFtdVK3yJ5vO9f7YZdasdasdad",
|
23
|
+
* "loginType": "idp",
|
24
|
+
* "provider": "okta.com"
|
25
|
+
* },
|
26
|
+
* "defaultRedirectUrl": "https://hoppscotch.io/",
|
27
|
+
* "redirectUrl": ["https://hoppscotch.io/"],
|
28
|
+
* "tenant": "hoppscotch.io",
|
29
|
+
* "product": "API Engine",
|
30
|
+
* "name": "Hoppscotch-SP",
|
31
|
+
* "description": "SP for hoppscotch.io",
|
32
|
+
* "clientID": "Xq8AJt3yYAxmXizsCWmUBDRiVP1iTC8Y/otnvFIMitk",
|
33
|
+
* "clientSecret": "00e3e11a3426f97d8000000738300009130cd45419c5943",
|
34
|
+
* "certs": {
|
35
|
+
* "publicKey": "-----BEGIN CERTIFICATE-----.......-----END CERTIFICATE-----",
|
36
|
+
* "privateKey": "-----BEGIN PRIVATE KEY-----......-----END PRIVATE KEY-----"
|
37
|
+
* }
|
38
|
+
* }
|
39
|
+
* validationErrorsPost:
|
40
|
+
* description: Please provide rawMetadata or encodedRawMetadata | Please provide a defaultRedirectUrl | Please provide redirectUrl | redirectUrl is invalid | Exceeded maximum number of allowed redirect urls | defaultRedirectUrl is invalid | Please provide tenant | Please provide product | Please provide a friendly name | Description should not exceed 100 characters | Strategy: xxxx not supported | Please provide the clientId from OpenID Provider | Please provide the clientSecret from OpenID Provider | Please provide the discoveryUrl for the OpenID Provider
|
11
41
|
*
|
42
|
+
* parameters:
|
43
|
+
* nameParamPost:
|
44
|
+
* name: name
|
45
|
+
* description: Name/identifier for the connection
|
46
|
+
* type: string
|
47
|
+
* in: formData
|
48
|
+
* descriptionParamPost:
|
49
|
+
* name: description
|
50
|
+
* description: A short description for the connection not more than 100 characters
|
51
|
+
* type: string
|
52
|
+
* in: formData
|
53
|
+
* encodedRawMetadataParamPost:
|
54
|
+
* name: encodedRawMetadata
|
55
|
+
* description: Base64 encoding of the XML metadata
|
56
|
+
* in: formData
|
57
|
+
* type: string
|
58
|
+
* rawMetadataParamPost:
|
59
|
+
* name: rawMetadata
|
60
|
+
* description: Raw XML metadata
|
61
|
+
* in: formData
|
62
|
+
* type: string
|
63
|
+
* defaultRedirectUrlParamPost:
|
64
|
+
* name: defaultRedirectUrl
|
65
|
+
* description: The redirect URL to use in the IdP login flow
|
66
|
+
* in: formData
|
67
|
+
* required: true
|
68
|
+
* type: string
|
69
|
+
* redirectUrlParamPost:
|
70
|
+
* name: redirectUrl
|
71
|
+
* description: JSON encoded array containing a list of allowed redirect URLs
|
72
|
+
* in: formData
|
73
|
+
* required: true
|
74
|
+
* type: string
|
75
|
+
* tenantParamPost:
|
76
|
+
* name: tenant
|
77
|
+
* description: Tenant
|
78
|
+
* in: formData
|
79
|
+
* required: true
|
80
|
+
* type: string
|
81
|
+
* productParamPost:
|
82
|
+
* name: product
|
83
|
+
* description: Product
|
84
|
+
* in: formData
|
85
|
+
* required: true
|
86
|
+
* type: string
|
87
|
+
* oidcDiscoveryUrlPost:
|
88
|
+
* name: oidcDiscoveryUrl
|
89
|
+
* description: well-known URL where the OpenID Provider configuration is exposed
|
90
|
+
* in: formData
|
91
|
+
* type: string
|
92
|
+
* oidcClientIdPost:
|
93
|
+
* name: oidcClientId
|
94
|
+
* description: clientId of the application set up on the OpenID Provider
|
95
|
+
* in: formData
|
96
|
+
* type: string
|
97
|
+
* oidcClientSecretPost:
|
98
|
+
* name: oidcClientSecret
|
99
|
+
* description: clientSecret of the application set up on the OpenID Provider
|
100
|
+
* in: formData
|
101
|
+
* type: string
|
12
102
|
* /api/v1/saml/config:
|
13
103
|
* post:
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
104
|
+
* summary: Create SAML config
|
105
|
+
* operationId: create-saml-config
|
106
|
+
* deprecated: true
|
107
|
+
* tags: [SAML Config - Deprecated]
|
108
|
+
* produces:
|
109
|
+
* - application/json
|
110
|
+
* consumes:
|
111
|
+
* - application/x-www-form-urlencoded
|
112
|
+
* - application/json
|
113
|
+
* parameters:
|
114
|
+
* - $ref: '#/parameters/nameParamPost'
|
115
|
+
* - $ref: '#/parameters/descriptionParamPost'
|
116
|
+
* - $ref: '#/parameters/encodedRawMetadataParamPost'
|
117
|
+
* - $ref: '#/parameters/rawMetadataParamPost'
|
118
|
+
* - $ref: '#/parameters/defaultRedirectUrlParamPost'
|
119
|
+
* - $ref: '#/parameters/redirectUrlParamPost'
|
120
|
+
* - $ref: '#/parameters/tenantParamPost'
|
121
|
+
* - $ref: '#/parameters/productParamPost'
|
122
|
+
* responses:
|
123
|
+
* 200:
|
124
|
+
* description: Success
|
125
|
+
* schema:
|
126
|
+
* $ref: '#/definitions/Connection'
|
127
|
+
* 400:
|
128
|
+
* $ref: '#/definitions/validationErrorsPost'
|
129
|
+
* 401:
|
130
|
+
* description: Unauthorized
|
131
|
+
* 500:
|
132
|
+
* description: Please set OpenID response handler path (oidcPath) on Jackson
|
133
|
+
* /api/v1/connections:
|
134
|
+
* post:
|
135
|
+
* summary: Create SSO connection
|
136
|
+
* operationId: create-sso-connection
|
137
|
+
* tags: [Connections]
|
17
138
|
* produces:
|
18
|
-
*
|
139
|
+
* - application/json
|
19
140
|
* consumes:
|
20
|
-
*
|
141
|
+
* - application/x-www-form-urlencoded
|
142
|
+
* - application/json
|
21
143
|
* parameters:
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
*
|
29
|
-
*
|
30
|
-
*
|
31
|
-
*
|
32
|
-
*
|
33
|
-
* type: string
|
34
|
-
* - name: rawMetadata
|
35
|
-
* description: Raw XML metadata
|
36
|
-
* in: formData
|
37
|
-
* type: string
|
38
|
-
* - name: defaultRedirectUrl
|
39
|
-
* description: The redirect URL to use in the IdP login flow
|
40
|
-
* in: formData
|
41
|
-
* required: true
|
42
|
-
* type: string
|
43
|
-
* - name: redirectUrl
|
44
|
-
* description: JSON encoded array containing a list of allowed redirect URLs
|
45
|
-
* in: formData
|
46
|
-
* required: true
|
47
|
-
* type: string
|
48
|
-
* - name: tenant
|
49
|
-
* description: Tenant
|
50
|
-
* in: formData
|
51
|
-
* required: true
|
52
|
-
* type: string
|
53
|
-
* - name: product
|
54
|
-
* description: Product
|
55
|
-
* in: formData
|
56
|
-
* required: true
|
57
|
-
* type: string
|
144
|
+
* - $ref: '#/parameters/nameParamPost'
|
145
|
+
* - $ref: '#/parameters/descriptionParamPost'
|
146
|
+
* - $ref: '#/parameters/encodedRawMetadataParamPost'
|
147
|
+
* - $ref: '#/parameters/rawMetadataParamPost'
|
148
|
+
* - $ref: '#/parameters/defaultRedirectUrlParamPost'
|
149
|
+
* - $ref: '#/parameters/redirectUrlParamPost'
|
150
|
+
* - $ref: '#/parameters/tenantParamPost'
|
151
|
+
* - $ref: '#/parameters/productParamPost'
|
152
|
+
* - $ref: '#/parameters/oidcDiscoveryUrlPost'
|
153
|
+
* - $ref: '#/parameters/oidcClientIdPost'
|
154
|
+
* - $ref: '#/parameters/oidcClientSecretPost'
|
58
155
|
* responses:
|
59
156
|
* 200:
|
60
157
|
* description: Success
|
61
158
|
* schema:
|
62
|
-
*
|
63
|
-
* example:
|
64
|
-
* {
|
65
|
-
* "idpMetadata": {
|
66
|
-
* "sso": {
|
67
|
-
* "postUrl": "https://dev-20901260.okta.com/app/dev-20901260_jacksonnext_1/xxxxxxxxxxxxx/sso/saml",
|
68
|
-
* "redirectUrl": "https://dev-20901260.okta.com/app/dev-20901260_jacksonnext_1/xxxxxxxxxxxxx/sso/saml"
|
69
|
-
* },
|
70
|
-
* "entityID": "http://www.okta.com/xxxxxxxxxxxxx",
|
71
|
-
* "thumbprint": "Eo+eUi3UM3XIMkFFtdVK3yJ5vO9f7YZdasdasdad",
|
72
|
-
* "loginType": "idp",
|
73
|
-
* "provider": "okta.com"
|
74
|
-
* },
|
75
|
-
* "defaultRedirectUrl": "https://hoppscotch.io/",
|
76
|
-
* "redirectUrl": ["https://hoppscotch.io/"],
|
77
|
-
* "tenant": "hoppscotch.io",
|
78
|
-
* "product": "API Engine",
|
79
|
-
* "name": "Hoppscotch-SP",
|
80
|
-
* "description": "SP for hoppscotch.io",
|
81
|
-
* "clientID": "Xq8AJt3yYAxmXizsCWmUBDRiVP1iTC8Y/otnvFIMitk",
|
82
|
-
* "clientSecret": "00e3e11a3426f97d8000000738300009130cd45419c5943",
|
83
|
-
* "certs": {
|
84
|
-
* "publicKey": "-----BEGIN CERTIFICATE-----.......-----END CERTIFICATE-----",
|
85
|
-
* "privateKey": "-----BEGIN PRIVATE KEY-----......-----END PRIVATE KEY-----"
|
86
|
-
* }
|
87
|
-
* }
|
159
|
+
* $ref: '#/definitions/Connection'
|
88
160
|
* 400:
|
89
|
-
*
|
161
|
+
* $ref: '#/definitions/validationErrorsPost'
|
90
162
|
* 401:
|
91
163
|
* description: Unauthorized
|
92
164
|
*/
|
93
|
-
|
165
|
+
createSAMLConnection(body: SAMLSSOConnectionWithEncodedMetadata | SAMLSSOConnectionWithRawMetadata): Promise<SAMLSSORecord>;
|
166
|
+
config(...args: Parameters<ConnectionAPIController['createSAMLConnection']>): Promise<SAMLSSORecord>;
|
167
|
+
createOIDCConnection(body: OIDCSSOConnection): Promise<OIDCSSORecord>;
|
94
168
|
/**
|
95
169
|
* @swagger
|
96
|
-
*
|
170
|
+
* definitions:
|
171
|
+
* validationErrorsPatch:
|
172
|
+
* description: Please provide clientID | Please provide clientSecret | clientSecret mismatch | Tenant/Product config mismatch with IdP metadata | Description should not exceed 100 characters| redirectUrl is invalid | Exceeded maximum number of allowed redirect urls | defaultRedirectUrl is invalid | Tenant/Product config mismatch with OIDC Provider metadata
|
173
|
+
* parameters:
|
174
|
+
* clientIDParamPatch:
|
175
|
+
* name: clientID
|
176
|
+
* description: Client ID for the connection
|
177
|
+
* type: string
|
178
|
+
* in: formData
|
179
|
+
* required: true
|
180
|
+
* clientSecretParamPatch:
|
181
|
+
* name: clientSecret
|
182
|
+
* description: Client Secret for the connection
|
183
|
+
* type: string
|
184
|
+
* in: formData
|
185
|
+
* required: true
|
186
|
+
* nameParamPatch:
|
187
|
+
* name: name
|
188
|
+
* description: Name/identifier for the connection
|
189
|
+
* type: string
|
190
|
+
* in: formData
|
191
|
+
* descriptionParamPatch:
|
192
|
+
* name: description
|
193
|
+
* description: A short description for the connection not more than 100 characters
|
194
|
+
* type: string
|
195
|
+
* in: formData
|
196
|
+
* encodedRawMetadataParamPatch:
|
197
|
+
* name: encodedRawMetadata
|
198
|
+
* description: Base64 encoding of the XML metadata
|
199
|
+
* in: formData
|
200
|
+
* type: string
|
201
|
+
* rawMetadataParamPatch:
|
202
|
+
* name: rawMetadata
|
203
|
+
* description: Raw XML metadata
|
204
|
+
* in: formData
|
205
|
+
* type: string
|
206
|
+
* oidcDiscoveryUrlPatch:
|
207
|
+
* name: oidcDiscoveryUrl
|
208
|
+
* description: well-known URL where the OpenID Provider configuration is exposed
|
209
|
+
* in: formData
|
210
|
+
* type: string
|
211
|
+
* oidcClientIdPatch:
|
212
|
+
* name: oidcClientId
|
213
|
+
* description: clientId of the application set up on the OpenID Provider
|
214
|
+
* in: formData
|
215
|
+
* type: string
|
216
|
+
* oidcClientSecretPatch:
|
217
|
+
* name: oidcClientSecret
|
218
|
+
* description: clientSecret of the application set up on the OpenID Provider
|
219
|
+
* in: formData
|
220
|
+
* type: string
|
221
|
+
* defaultRedirectUrlParamPatch:
|
222
|
+
* name: defaultRedirectUrl
|
223
|
+
* description: The redirect URL to use in the IdP login flow
|
224
|
+
* in: formData
|
225
|
+
* type: string
|
226
|
+
* redirectUrlParamPatch:
|
227
|
+
* name: redirectUrl
|
228
|
+
* description: JSON encoded array containing a list of allowed redirect URLs
|
229
|
+
* in: formData
|
230
|
+
* type: string
|
231
|
+
* tenantParamPatch:
|
232
|
+
* name: tenant
|
233
|
+
* description: Tenant
|
234
|
+
* in: formData
|
235
|
+
* required: true
|
236
|
+
* type: string
|
237
|
+
* productParamPatch:
|
238
|
+
* name: product
|
239
|
+
* description: Product
|
240
|
+
* in: formData
|
241
|
+
* required: true
|
242
|
+
* type: string
|
97
243
|
* /api/v1/saml/config:
|
98
244
|
* patch:
|
99
|
-
* summary: Update SAML
|
245
|
+
* summary: Update SAML Config
|
100
246
|
* operationId: update-saml-config
|
101
|
-
* tags: [SAML Config]
|
247
|
+
* tags: [SAML Config - Deprecated]
|
248
|
+
* deprecated: true
|
249
|
+
* consumes:
|
250
|
+
* - application/json
|
251
|
+
* - application/x-www-form-urlencoded
|
252
|
+
* parameters:
|
253
|
+
* - $ref: '#/parameters/clientIDParamPatch'
|
254
|
+
* - $ref: '#/parameters/clientSecretParamPatch'
|
255
|
+
* - $ref: '#/parameters/nameParamPatch'
|
256
|
+
* - $ref: '#/parameters/descriptionParamPatch'
|
257
|
+
* - $ref: '#/parameters/encodedRawMetadataParamPatch'
|
258
|
+
* - $ref: '#/parameters/rawMetadataParamPatch'
|
259
|
+
* - $ref: '#/parameters/defaultRedirectUrlParamPatch'
|
260
|
+
* - $ref: '#/parameters/redirectUrlParamPatch'
|
261
|
+
* - $ref: '#/parameters/tenantParamPatch'
|
262
|
+
* - $ref: '#/parameters/productParamPatch'
|
263
|
+
* responses:
|
264
|
+
* 204:
|
265
|
+
* description: Success
|
266
|
+
* 400:
|
267
|
+
* $ref: '#/definitions/validationErrorsPatch'
|
268
|
+
* 401:
|
269
|
+
* description: Unauthorized
|
270
|
+
* /api/v1/connections:
|
271
|
+
* patch:
|
272
|
+
* summary: Update SSO Connection
|
273
|
+
* operationId: update-sso-connection
|
274
|
+
* tags: [Connections]
|
102
275
|
* consumes:
|
103
276
|
* - application/json
|
104
277
|
* - application/x-www-form-urlencoded
|
105
278
|
* parameters:
|
106
|
-
* -
|
107
|
-
*
|
108
|
-
*
|
109
|
-
*
|
110
|
-
*
|
111
|
-
* -
|
112
|
-
*
|
113
|
-
*
|
114
|
-
*
|
115
|
-
*
|
116
|
-
* -
|
117
|
-
*
|
118
|
-
*
|
119
|
-
* in: formData
|
120
|
-
* - name: description
|
121
|
-
* description: A short description for the config not more than 100 characters
|
122
|
-
* type: string
|
123
|
-
* in: formData
|
124
|
-
* - name: encodedRawMetadata
|
125
|
-
* description: Base64 encoding of the XML metadata
|
126
|
-
* in: formData
|
127
|
-
* type: string
|
128
|
-
* - name: rawMetadata
|
129
|
-
* description: Raw XML metadata
|
130
|
-
* in: formData
|
131
|
-
* type: string
|
132
|
-
* - name: defaultRedirectUrl
|
133
|
-
* description: The redirect URL to use in the IdP login flow
|
134
|
-
* in: formData
|
135
|
-
* required: true
|
136
|
-
* type: string
|
137
|
-
* - name: redirectUrl
|
138
|
-
* description: JSON encoded array containing a list of allowed redirect URLs
|
139
|
-
* in: formData
|
140
|
-
* required: true
|
141
|
-
* type: string
|
142
|
-
* - name: tenant
|
143
|
-
* description: Tenant
|
144
|
-
* in: formData
|
145
|
-
* required: true
|
146
|
-
* type: string
|
147
|
-
* - name: product
|
148
|
-
* description: Product
|
149
|
-
* in: formData
|
150
|
-
* required: true
|
151
|
-
* type: string
|
279
|
+
* - $ref: '#/parameters/clientIDParamPatch'
|
280
|
+
* - $ref: '#/parameters/clientSecretParamPatch'
|
281
|
+
* - $ref: '#/parameters/nameParamPatch'
|
282
|
+
* - $ref: '#/parameters/descriptionParamPatch'
|
283
|
+
* - $ref: '#/parameters/encodedRawMetadataParamPatch'
|
284
|
+
* - $ref: '#/parameters/rawMetadataParamPatch'
|
285
|
+
* - $ref: '#/parameters/oidcDiscoveryUrlPatch'
|
286
|
+
* - $ref: '#/parameters/oidcClientIdPatch'
|
287
|
+
* - $ref: '#/parameters/oidcClientSecretPatch'
|
288
|
+
* - $ref: '#/parameters/defaultRedirectUrlParamPatch'
|
289
|
+
* - $ref: '#/parameters/redirectUrlParamPatch'
|
290
|
+
* - $ref: '#/parameters/tenantParamPatch'
|
291
|
+
* - $ref: '#/parameters/productParamPatch'
|
152
292
|
* responses:
|
153
293
|
* 204:
|
154
294
|
* description: Success
|
155
295
|
* 400:
|
156
|
-
*
|
296
|
+
* $ref: '#/definitions/validationErrorsPatch'
|
157
297
|
* 401:
|
158
298
|
* description: Unauthorized
|
299
|
+
* 500:
|
300
|
+
* description: Please set OpenID response handler path (oidcPath) on Jackson
|
159
301
|
*/
|
160
|
-
|
302
|
+
updateSAMLConnection(body: (SAMLSSOConnectionWithEncodedMetadata | SAMLSSOConnectionWithRawMetadata) & {
|
303
|
+
clientID: string;
|
304
|
+
clientSecret: string;
|
305
|
+
}): Promise<void>;
|
306
|
+
updateConfig(...args: Parameters<ConnectionAPIController['updateSAMLConnection']>): Promise<void>;
|
307
|
+
updateOIDCConnection(body: OIDCSSOConnection & {
|
308
|
+
clientID: string;
|
309
|
+
clientSecret: string;
|
310
|
+
}): Promise<void>;
|
311
|
+
/**
|
312
|
+
* @swagger
|
313
|
+
* parameters:
|
314
|
+
* tenantParamGet:
|
315
|
+
* in: query
|
316
|
+
* name: tenant
|
317
|
+
* type: string
|
318
|
+
* description: Tenant
|
319
|
+
* productParamGet:
|
320
|
+
* in: query
|
321
|
+
* name: product
|
322
|
+
* type: string
|
323
|
+
* description: Product
|
324
|
+
* clientIDParamGet:
|
325
|
+
* in: query
|
326
|
+
* name: clientID
|
327
|
+
* type: string
|
328
|
+
* description: Client ID
|
329
|
+
* strategyParamGet:
|
330
|
+
* in: query
|
331
|
+
* name: strategy
|
332
|
+
* type: string
|
333
|
+
* description: Strategy which can help to filter connections with tenant/product query
|
334
|
+
* definitions:
|
335
|
+
* Connection:
|
336
|
+
* type: object
|
337
|
+
* properties:
|
338
|
+
* clientID:
|
339
|
+
* type: string
|
340
|
+
* description: Connection clientID
|
341
|
+
* clientSecret:
|
342
|
+
* type: string
|
343
|
+
* description: Connection clientSecret
|
344
|
+
* name:
|
345
|
+
* type: string
|
346
|
+
* description: Connection name
|
347
|
+
* description:
|
348
|
+
* type: string
|
349
|
+
* description: Connection description
|
350
|
+
* redirectUrl:
|
351
|
+
* type: string
|
352
|
+
* description: A list of allowed redirect URLs
|
353
|
+
* defaultRedirectUrl:
|
354
|
+
* type: string
|
355
|
+
* description: The redirect URL to use in the IdP login flow
|
356
|
+
* tenant:
|
357
|
+
* type: string
|
358
|
+
* description: Connection tenant
|
359
|
+
* product:
|
360
|
+
* type: string
|
361
|
+
* description: Connection product
|
362
|
+
* idpMetadata:
|
363
|
+
* type: object
|
364
|
+
* description: SAML IdP metadata
|
365
|
+
* certs:
|
366
|
+
* type: object
|
367
|
+
* description: Certs generated for SAML connection
|
368
|
+
* oidcProvider:
|
369
|
+
* type: object
|
370
|
+
* description: OIDC IdP metadata
|
371
|
+
* responses:
|
372
|
+
* '200Get':
|
373
|
+
* description: Success
|
374
|
+
* schema:
|
375
|
+
* type: array
|
376
|
+
* items:
|
377
|
+
* $ref: '#/definitions/Connection'
|
378
|
+
* '400Get':
|
379
|
+
* description: Please provide `clientID` or `tenant` and `product`.
|
380
|
+
* '401Get':
|
381
|
+
* description: Unauthorized
|
382
|
+
* /api/v1/connections:
|
383
|
+
* get:
|
384
|
+
* summary: Get SSO Connections
|
385
|
+
* parameters:
|
386
|
+
* - $ref: '#/parameters/tenantParamGet'
|
387
|
+
* - $ref: '#/parameters/productParamGet'
|
388
|
+
* - $ref: '#/parameters/clientIDParamGet'
|
389
|
+
* - $ref: '#/parameters/strategyParamGet'
|
390
|
+
* operationId: get-connections
|
391
|
+
* tags: [Connections]
|
392
|
+
* responses:
|
393
|
+
* '200':
|
394
|
+
* $ref: '#/responses/200Get'
|
395
|
+
* '400':
|
396
|
+
* $ref: '#/responses/400Get'
|
397
|
+
* '401':
|
398
|
+
* $ref: '#/responses/401Get'
|
399
|
+
*/
|
400
|
+
getConnections(body: GetConnectionsQuery): Promise<Array<SAMLSSORecord | OIDCSSORecord>>;
|
161
401
|
/**
|
162
402
|
* @swagger
|
163
|
-
*
|
164
403
|
* /api/v1/saml/config:
|
165
404
|
* get:
|
166
|
-
* summary: Get SAML
|
405
|
+
* summary: Get SAML Config
|
167
406
|
* operationId: get-saml-config
|
168
|
-
* tags:
|
169
|
-
*
|
407
|
+
* tags: [SAML Config - Deprecated]
|
408
|
+
* deprecated: true
|
170
409
|
* parameters:
|
171
|
-
* -
|
172
|
-
*
|
173
|
-
*
|
174
|
-
* description: Tenant
|
175
|
-
* - in: query
|
176
|
-
* name: product
|
177
|
-
* type: string
|
178
|
-
* description: Product
|
179
|
-
* - in: query
|
180
|
-
* name: clientID
|
181
|
-
* type: string
|
182
|
-
* description: Client ID
|
410
|
+
* - $ref: '#/parameters/tenantParamGet'
|
411
|
+
* - $ref: '#/parameters/productParamGet'
|
412
|
+
* - $ref: '#/parameters/clientIDParamGet'
|
183
413
|
* responses:
|
184
|
-
*
|
414
|
+
* '200':
|
185
415
|
* description: Success
|
186
416
|
* schema:
|
187
417
|
* type: object
|
188
418
|
* example:
|
189
419
|
* {
|
190
|
-
*
|
191
|
-
*
|
192
|
-
*
|
193
|
-
*
|
194
|
-
*
|
195
|
-
*
|
196
|
-
*
|
197
|
-
*
|
198
|
-
*
|
199
|
-
*
|
200
|
-
*
|
201
|
-
*
|
202
|
-
*
|
203
|
-
*
|
204
|
-
*
|
205
|
-
*
|
206
|
-
*
|
207
|
-
*
|
208
|
-
*
|
209
|
-
*
|
210
|
-
*
|
211
|
-
*
|
212
|
-
*
|
213
|
-
*
|
214
|
-
*
|
215
|
-
*
|
216
|
-
*
|
420
|
+
* "idpMetadata": {
|
421
|
+
* "sso": {
|
422
|
+
* "postUrl": "https://dev-20901260.okta.com/app/dev-20901260_jacksonnext_1/xxxxxxxxxxxxx/sso/saml",
|
423
|
+
* "redirectUrl": "https://dev-20901260.okta.com/app/dev-20901260_jacksonnext_1/xxxxxxxxxxxxx/sso/saml"
|
424
|
+
* },
|
425
|
+
* "entityID": "http://www.okta.com/xxxxxxxxxxxxx",
|
426
|
+
* "thumbprint": "Eo+eUi3UM3XIMkFFtdVK3yJ5vO9f7YZdasdasdad",
|
427
|
+
* "loginType": "idp",
|
428
|
+
* "provider": "okta.com"
|
429
|
+
* },
|
430
|
+
* "defaultRedirectUrl": "https://hoppscotch.io/",
|
431
|
+
* "redirectUrl": ["https://hoppscotch.io/"],
|
432
|
+
* "tenant": "hoppscotch.io",
|
433
|
+
* "product": "API Engine",
|
434
|
+
* "name": "Hoppscotch-SP",
|
435
|
+
* "description": "SP for hoppscotch.io",
|
436
|
+
* "clientID": "Xq8AJt3yYAxmXizsCWmUBDRiVP1iTC8Y/otnvFIMitk",
|
437
|
+
* "clientSecret": "00e3e11a3426f97d8000000738300009130cd45419c5943",
|
438
|
+
* "certs": {
|
439
|
+
* "publicKey": "-----BEGIN CERTIFICATE-----.......-----END CERTIFICATE-----",
|
440
|
+
* "privateKey": "-----BEGIN PRIVATE KEY-----......-----END PRIVATE KEY-----"
|
441
|
+
* }
|
442
|
+
* }
|
443
|
+
* '400':
|
444
|
+
* $ref: '#/responses/400Get'
|
445
|
+
* '401':
|
446
|
+
* $ref: '#/responses/401Get'
|
217
447
|
*/
|
218
|
-
getConfig(body:
|
219
|
-
clientID: string;
|
220
|
-
tenant: string;
|
221
|
-
product: string;
|
222
|
-
}): Promise<any>;
|
448
|
+
getConfig(body: GetConfigQuery): Promise<SAMLSSORecord | Record<string, never>>;
|
223
449
|
/**
|
224
450
|
* @swagger
|
451
|
+
* parameters:
|
452
|
+
* clientIDDel:
|
453
|
+
* name: clientID
|
454
|
+
* in: formData
|
455
|
+
* type: string
|
456
|
+
* description: Client ID
|
457
|
+
* clientSecretDel:
|
458
|
+
* name: clientSecret
|
459
|
+
* in: formData
|
460
|
+
* type: string
|
461
|
+
* description: Client Secret
|
462
|
+
* tenantDel:
|
463
|
+
* name: tenant
|
464
|
+
* in: formData
|
465
|
+
* type: string
|
466
|
+
* description: Tenant
|
467
|
+
* productDel:
|
468
|
+
* name: product
|
469
|
+
* in: formData
|
470
|
+
* type: string
|
471
|
+
* description: Product
|
472
|
+
* strategyDel:
|
473
|
+
* name: strategy
|
474
|
+
* in: formData
|
475
|
+
* type: string
|
476
|
+
* description: Strategy which can help to filter connections with tenant/product query
|
477
|
+
* /api/v1/connections:
|
478
|
+
* delete:
|
479
|
+
* parameters:
|
480
|
+
* - $ref: '#/parameters/clientIDDel'
|
481
|
+
* - $ref: '#/parameters/clientSecretDel'
|
482
|
+
* - $ref: '#/parameters/tenantDel'
|
483
|
+
* - $ref: '#/parameters/productDel'
|
484
|
+
* - $ref: '#/parameters/strategyDel'
|
485
|
+
* summary: Delete SSO Connections
|
486
|
+
* operationId: delete-sso-connection
|
487
|
+
* tags: [Connections]
|
488
|
+
* consumes:
|
489
|
+
* - application/x-www-form-urlencoded
|
490
|
+
* - application/json
|
491
|
+
* responses:
|
492
|
+
* '200':
|
493
|
+
* description: Success
|
494
|
+
* '400':
|
495
|
+
* description: clientSecret mismatch | Please provide `clientID` and `clientSecret` or `tenant` and `product`.
|
496
|
+
* '401':
|
497
|
+
* description: Unauthorized
|
225
498
|
* /api/v1/saml/config:
|
226
499
|
* delete:
|
227
|
-
* summary: Delete SAML
|
500
|
+
* summary: Delete SAML Config
|
228
501
|
* operationId: delete-saml-config
|
229
|
-
* tags:
|
230
|
-
*
|
502
|
+
* tags: [SAML Config - Deprecated]
|
503
|
+
* deprecated: true
|
231
504
|
* consumes:
|
232
505
|
* - application/x-www-form-urlencoded
|
506
|
+
* - application/json
|
233
507
|
* parameters:
|
234
|
-
*
|
235
|
-
*
|
236
|
-
*
|
237
|
-
*
|
238
|
-
* description: Client ID
|
239
|
-
* - name: clientSecret
|
240
|
-
* in: formData
|
241
|
-
* type: string
|
242
|
-
* required: true
|
243
|
-
* description: Client Secret
|
244
|
-
* - name: tenant
|
245
|
-
* in: formData
|
246
|
-
* type: string
|
247
|
-
* description: Tenant
|
248
|
-
* - name: product
|
249
|
-
* in: formData
|
250
|
-
* type: string
|
251
|
-
* description: Product
|
508
|
+
* - $ref: '#/parameters/clientIDDel'
|
509
|
+
* - $ref: '#/parameters/clientSecretDel'
|
510
|
+
* - $ref: '#/parameters/tenantDel'
|
511
|
+
* - $ref: '#/parameters/productDel'
|
252
512
|
* responses:
|
253
513
|
* '200':
|
254
514
|
* description: Success
|
255
515
|
* '400':
|
256
|
-
* description: clientSecret mismatch | Please provide `clientID` and `clientSecret` or `tenant` and `product`.
|
516
|
+
* description: clientSecret mismatch | Please provide `clientID` and `clientSecret` or `tenant` and `product`.
|
257
517
|
* '401':
|
258
518
|
* description: Unauthorized
|
259
519
|
*/
|
260
|
-
|
261
|
-
|
262
|
-
clientSecret: string;
|
263
|
-
tenant: string;
|
264
|
-
product: string;
|
265
|
-
}): Promise<void>;
|
520
|
+
deleteConnections(body: DelConnectionsQuery): Promise<void>;
|
521
|
+
deleteConfig(body: DelConnectionsQuery): Promise<void>;
|
266
522
|
}
|