passageidentity 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +18 -61
- data/docs/custom/AuthApi.md +141 -0
- data/docs/custom/ClientApi.md +107 -0
- data/docs/custom/UserApi.md +419 -0
- data/docs/generated/AppInfo.md +94 -0
- data/docs/generated/AppResponse.md +18 -0
- data/docs/generated/AppsApi.md +77 -0
- data/docs/generated/AuthMethods.md +22 -0
- data/docs/generated/CreateMagicLinkRequest.md +36 -0
- data/docs/generated/CreateUserRequest.md +22 -0
- data/docs/generated/ElementCustomization.md +56 -0
- data/docs/generated/FontFamily.md +15 -0
- data/docs/generated/LayoutConfig.md +26 -0
- data/docs/generated/Layouts.md +20 -0
- data/docs/generated/ListDevicesResponse.md +18 -0
- data/docs/generated/MagicLink.md +36 -0
- data/docs/generated/MagicLinkAuthMethod.md +22 -0
- data/docs/generated/MagicLinkChannel.md +15 -0
- data/docs/generated/MagicLinkResponse.md +18 -0
- data/docs/generated/MagicLinkType.md +15 -0
- data/docs/generated/MagicLinksApi.md +79 -0
- data/docs/generated/Model400Error.md +20 -0
- data/docs/generated/Model401Error.md +20 -0
- data/docs/generated/Model404Error.md +20 -0
- data/docs/generated/Model500Error.md +20 -0
- data/docs/generated/OtpAuthMethod.md +22 -0
- data/docs/generated/PasskeysAuthMethod.md +18 -0
- data/docs/generated/Technologies.md +15 -0
- data/docs/generated/TokensApi.md +78 -0
- data/docs/generated/TtlDisplayUnit.md +15 -0
- data/docs/generated/UpdateMagicLinkAuthMethod.md +22 -0
- data/docs/generated/UpdateOtpAuthMethod.md +22 -0
- data/docs/generated/UpdatePasskeysAuthMethod.md +18 -0
- data/docs/generated/UpdateUserRequest.md +22 -0
- data/docs/generated/UserDevicesApi.md +152 -0
- data/docs/generated/UserEventInfo.md +26 -0
- data/docs/generated/UserInfo.md +46 -0
- data/docs/generated/UserMetadataField.md +28 -0
- data/docs/generated/UserMetadataFieldType.md +15 -0
- data/docs/generated/UserResponse.md +18 -0
- data/docs/generated/UserStatus.md +15 -0
- data/docs/generated/UsersApi.md +440 -0
- data/docs/generated/WebAuthnDevices.md +34 -0
- data/docs/generated/WebAuthnIcons.md +20 -0
- data/docs/generated/WebAuthnType.md +15 -0
- data/generate.sh +31 -0
- data/lib/openapi_client/api/apps_api.rb +85 -0
- data/lib/openapi_client/api/magic_links_api.rb +96 -0
- data/lib/openapi_client/api/tokens_api.rb +91 -0
- data/lib/openapi_client/api/user_devices_api.rb +166 -0
- data/lib/openapi_client/api/users_api.rb +452 -0
- data/lib/openapi_client/api_client.rb +431 -0
- data/lib/openapi_client/api_error.rb +58 -0
- data/lib/openapi_client/configuration.rb +383 -0
- data/lib/openapi_client/models/app_info.rb +853 -0
- data/lib/openapi_client/models/app_response.rb +221 -0
- data/lib/openapi_client/models/auth_methods.rb +254 -0
- data/lib/openapi_client/models/create_magic_link_request.rb +374 -0
- data/lib/openapi_client/models/create_user_request.rb +234 -0
- data/lib/openapi_client/models/element_customization.rb +457 -0
- data/lib/openapi_client/models/font_family.rb +58 -0
- data/lib/openapi_client/models/layout_config.rb +285 -0
- data/lib/openapi_client/models/layouts.rb +241 -0
- data/lib/openapi_client/models/list_devices_response.rb +223 -0
- data/lib/openapi_client/models/magic_link.rb +387 -0
- data/lib/openapi_client/models/magic_link_auth_method.rb +302 -0
- data/lib/openapi_client/models/magic_link_channel.rb +40 -0
- data/lib/openapi_client/models/magic_link_response.rb +221 -0
- data/lib/openapi_client/models/magic_link_type.rb +40 -0
- data/lib/openapi_client/models/model400_error.rb +271 -0
- data/lib/openapi_client/models/model401_error.rb +271 -0
- data/lib/openapi_client/models/model404_error.rb +271 -0
- data/lib/openapi_client/models/model500_error.rb +271 -0
- data/lib/openapi_client/models/otp_auth_method.rb +302 -0
- data/lib/openapi_client/models/passkeys_auth_method.rb +228 -0
- data/lib/openapi_client/models/technologies.rb +46 -0
- data/lib/openapi_client/models/ttl_display_unit.rb +42 -0
- data/lib/openapi_client/models/update_magic_link_auth_method.rb +276 -0
- data/lib/openapi_client/models/update_otp_auth_method.rb +276 -0
- data/lib/openapi_client/models/update_passkeys_auth_method.rb +216 -0
- data/lib/openapi_client/models/update_user_request.rb +232 -0
- data/lib/openapi_client/models/user_event_info.rb +285 -0
- data/lib/openapi_client/models/user_info.rb +470 -0
- data/lib/openapi_client/models/user_metadata_field.rb +323 -0
- data/lib/openapi_client/models/user_metadata_field_type.rb +44 -0
- data/lib/openapi_client/models/user_response.rb +221 -0
- data/lib/openapi_client/models/user_status.rb +41 -0
- data/lib/openapi_client/models/web_authn_devices.rb +378 -0
- data/lib/openapi_client/models/web_authn_icons.rb +230 -0
- data/lib/openapi_client/models/web_authn_type.rb +41 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +74 -0
- data/lib/passageidentity/auth.rb +32 -5
- data/lib/passageidentity/client.rb +17 -121
- data/lib/passageidentity/user_api.rb +29 -131
- data/lib/passageidentity/version.rb +5 -0
- data/openapitools.json +7 -0
- data/passageidentity.gemspec +3 -1
- data/tests/auth_test.rb +6 -1
- data/tests/magic_link_test.rb +5 -4
- data/tests/user_api_test.rb +2 -2
- metadata +96 -2
@@ -0,0 +1,440 @@
|
|
1
|
+
# OpenapiClient::UsersApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.passage.id/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**activate_user**](UsersApi.md#activate_user) | **PATCH** /apps/{app_id}/users/{user_id}/activate | Activate User |
|
8
|
+
| [**create_user**](UsersApi.md#create_user) | **POST** /apps/{app_id}/users | Create User |
|
9
|
+
| [**deactivate_user**](UsersApi.md#deactivate_user) | **PATCH** /apps/{app_id}/users/{user_id}/deactivate | Deactivate User |
|
10
|
+
| [**delete_user**](UsersApi.md#delete_user) | **DELETE** /apps/{app_id}/users/{user_id} | Delete User |
|
11
|
+
| [**get_user**](UsersApi.md#get_user) | **GET** /apps/{app_id}/users/{user_id} | Get User |
|
12
|
+
| [**update_user**](UsersApi.md#update_user) | **PATCH** /apps/{app_id}/users/{user_id} | Update User |
|
13
|
+
|
14
|
+
|
15
|
+
## activate_user
|
16
|
+
|
17
|
+
> <UserResponse> activate_user(app_id, user_id)
|
18
|
+
|
19
|
+
Activate User
|
20
|
+
|
21
|
+
Activate a user. They will now be able to login.
|
22
|
+
|
23
|
+
### Examples
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'time'
|
27
|
+
require 'openapi_client'
|
28
|
+
# setup authorization
|
29
|
+
OpenapiClient.configure do |config|
|
30
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
31
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = OpenapiClient::UsersApi.new
|
35
|
+
app_id = 'app_id_example' # String | App ID
|
36
|
+
user_id = 'user_id_example' # String | User ID
|
37
|
+
|
38
|
+
begin
|
39
|
+
# Activate User
|
40
|
+
result = api_instance.activate_user(app_id, user_id)
|
41
|
+
p result
|
42
|
+
rescue OpenapiClient::ApiError => e
|
43
|
+
puts "Error when calling UsersApi->activate_user: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Using the activate_user_with_http_info variant
|
48
|
+
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
50
|
+
|
51
|
+
> <Array(<UserResponse>, Integer, Hash)> activate_user_with_http_info(app_id, user_id)
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
begin
|
55
|
+
# Activate User
|
56
|
+
data, status_code, headers = api_instance.activate_user_with_http_info(app_id, user_id)
|
57
|
+
p status_code # => 2xx
|
58
|
+
p headers # => { ... }
|
59
|
+
p data # => <UserResponse>
|
60
|
+
rescue OpenapiClient::ApiError => e
|
61
|
+
puts "Error when calling UsersApi->activate_user_with_http_info: #{e}"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
| Name | Type | Description | Notes |
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
69
|
+
| **app_id** | **String** | App ID | |
|
70
|
+
| **user_id** | **String** | User ID | |
|
71
|
+
|
72
|
+
### Return type
|
73
|
+
|
74
|
+
[**UserResponse**](UserResponse.md)
|
75
|
+
|
76
|
+
### Authorization
|
77
|
+
|
78
|
+
[bearerAuth](../README.md#bearerAuth)
|
79
|
+
|
80
|
+
### HTTP request headers
|
81
|
+
|
82
|
+
- **Content-Type**: Not defined
|
83
|
+
- **Accept**: application/json
|
84
|
+
|
85
|
+
|
86
|
+
## create_user
|
87
|
+
|
88
|
+
> <UserResponse> create_user(app_id, create_user_request)
|
89
|
+
|
90
|
+
Create User
|
91
|
+
|
92
|
+
Create user for an application. Must provide an email of phone number identifier.
|
93
|
+
|
94
|
+
### Examples
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
require 'time'
|
98
|
+
require 'openapi_client'
|
99
|
+
# setup authorization
|
100
|
+
OpenapiClient.configure do |config|
|
101
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
102
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
103
|
+
end
|
104
|
+
|
105
|
+
api_instance = OpenapiClient::UsersApi.new
|
106
|
+
app_id = 'app_id_example' # String | App ID
|
107
|
+
create_user_request = OpenapiClient::CreateUserRequest.new # CreateUserRequest | email, phone, user_metadata
|
108
|
+
|
109
|
+
begin
|
110
|
+
# Create User
|
111
|
+
result = api_instance.create_user(app_id, create_user_request)
|
112
|
+
p result
|
113
|
+
rescue OpenapiClient::ApiError => e
|
114
|
+
puts "Error when calling UsersApi->create_user: #{e}"
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
#### Using the create_user_with_http_info variant
|
119
|
+
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
121
|
+
|
122
|
+
> <Array(<UserResponse>, Integer, Hash)> create_user_with_http_info(app_id, create_user_request)
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
begin
|
126
|
+
# Create User
|
127
|
+
data, status_code, headers = api_instance.create_user_with_http_info(app_id, create_user_request)
|
128
|
+
p status_code # => 2xx
|
129
|
+
p headers # => { ... }
|
130
|
+
p data # => <UserResponse>
|
131
|
+
rescue OpenapiClient::ApiError => e
|
132
|
+
puts "Error when calling UsersApi->create_user_with_http_info: #{e}"
|
133
|
+
end
|
134
|
+
```
|
135
|
+
|
136
|
+
### Parameters
|
137
|
+
|
138
|
+
| Name | Type | Description | Notes |
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
140
|
+
| **app_id** | **String** | App ID | |
|
141
|
+
| **create_user_request** | [**CreateUserRequest**](CreateUserRequest.md) | email, phone, user_metadata | |
|
142
|
+
|
143
|
+
### Return type
|
144
|
+
|
145
|
+
[**UserResponse**](UserResponse.md)
|
146
|
+
|
147
|
+
### Authorization
|
148
|
+
|
149
|
+
[bearerAuth](../README.md#bearerAuth)
|
150
|
+
|
151
|
+
### HTTP request headers
|
152
|
+
|
153
|
+
- **Content-Type**: application/json
|
154
|
+
- **Accept**: application/json
|
155
|
+
|
156
|
+
|
157
|
+
## deactivate_user
|
158
|
+
|
159
|
+
> <UserResponse> deactivate_user(app_id, user_id)
|
160
|
+
|
161
|
+
Deactivate User
|
162
|
+
|
163
|
+
Deactivate a user. Their account will still exist, but they will not be able to login.
|
164
|
+
|
165
|
+
### Examples
|
166
|
+
|
167
|
+
```ruby
|
168
|
+
require 'time'
|
169
|
+
require 'openapi_client'
|
170
|
+
# setup authorization
|
171
|
+
OpenapiClient.configure do |config|
|
172
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
173
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
174
|
+
end
|
175
|
+
|
176
|
+
api_instance = OpenapiClient::UsersApi.new
|
177
|
+
app_id = 'app_id_example' # String | App ID
|
178
|
+
user_id = 'user_id_example' # String | User ID
|
179
|
+
|
180
|
+
begin
|
181
|
+
# Deactivate User
|
182
|
+
result = api_instance.deactivate_user(app_id, user_id)
|
183
|
+
p result
|
184
|
+
rescue OpenapiClient::ApiError => e
|
185
|
+
puts "Error when calling UsersApi->deactivate_user: #{e}"
|
186
|
+
end
|
187
|
+
```
|
188
|
+
|
189
|
+
#### Using the deactivate_user_with_http_info variant
|
190
|
+
|
191
|
+
This returns an Array which contains the response data, status code and headers.
|
192
|
+
|
193
|
+
> <Array(<UserResponse>, Integer, Hash)> deactivate_user_with_http_info(app_id, user_id)
|
194
|
+
|
195
|
+
```ruby
|
196
|
+
begin
|
197
|
+
# Deactivate User
|
198
|
+
data, status_code, headers = api_instance.deactivate_user_with_http_info(app_id, user_id)
|
199
|
+
p status_code # => 2xx
|
200
|
+
p headers # => { ... }
|
201
|
+
p data # => <UserResponse>
|
202
|
+
rescue OpenapiClient::ApiError => e
|
203
|
+
puts "Error when calling UsersApi->deactivate_user_with_http_info: #{e}"
|
204
|
+
end
|
205
|
+
```
|
206
|
+
|
207
|
+
### Parameters
|
208
|
+
|
209
|
+
| Name | Type | Description | Notes |
|
210
|
+
| ---- | ---- | ----------- | ----- |
|
211
|
+
| **app_id** | **String** | App ID | |
|
212
|
+
| **user_id** | **String** | User ID | |
|
213
|
+
|
214
|
+
### Return type
|
215
|
+
|
216
|
+
[**UserResponse**](UserResponse.md)
|
217
|
+
|
218
|
+
### Authorization
|
219
|
+
|
220
|
+
[bearerAuth](../README.md#bearerAuth)
|
221
|
+
|
222
|
+
### HTTP request headers
|
223
|
+
|
224
|
+
- **Content-Type**: Not defined
|
225
|
+
- **Accept**: application/json
|
226
|
+
|
227
|
+
|
228
|
+
## delete_user
|
229
|
+
|
230
|
+
> delete_user(app_id, user_id)
|
231
|
+
|
232
|
+
Delete User
|
233
|
+
|
234
|
+
Delete a user.
|
235
|
+
|
236
|
+
### Examples
|
237
|
+
|
238
|
+
```ruby
|
239
|
+
require 'time'
|
240
|
+
require 'openapi_client'
|
241
|
+
# setup authorization
|
242
|
+
OpenapiClient.configure do |config|
|
243
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
244
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
245
|
+
end
|
246
|
+
|
247
|
+
api_instance = OpenapiClient::UsersApi.new
|
248
|
+
app_id = 'app_id_example' # String | App ID
|
249
|
+
user_id = 'user_id_example' # String | User ID
|
250
|
+
|
251
|
+
begin
|
252
|
+
# Delete User
|
253
|
+
api_instance.delete_user(app_id, user_id)
|
254
|
+
rescue OpenapiClient::ApiError => e
|
255
|
+
puts "Error when calling UsersApi->delete_user: #{e}"
|
256
|
+
end
|
257
|
+
```
|
258
|
+
|
259
|
+
#### Using the delete_user_with_http_info variant
|
260
|
+
|
261
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
262
|
+
|
263
|
+
> <Array(nil, Integer, Hash)> delete_user_with_http_info(app_id, user_id)
|
264
|
+
|
265
|
+
```ruby
|
266
|
+
begin
|
267
|
+
# Delete User
|
268
|
+
data, status_code, headers = api_instance.delete_user_with_http_info(app_id, user_id)
|
269
|
+
p status_code # => 2xx
|
270
|
+
p headers # => { ... }
|
271
|
+
p data # => nil
|
272
|
+
rescue OpenapiClient::ApiError => e
|
273
|
+
puts "Error when calling UsersApi->delete_user_with_http_info: #{e}"
|
274
|
+
end
|
275
|
+
```
|
276
|
+
|
277
|
+
### Parameters
|
278
|
+
|
279
|
+
| Name | Type | Description | Notes |
|
280
|
+
| ---- | ---- | ----------- | ----- |
|
281
|
+
| **app_id** | **String** | App ID | |
|
282
|
+
| **user_id** | **String** | User ID | |
|
283
|
+
|
284
|
+
### Return type
|
285
|
+
|
286
|
+
nil (empty response body)
|
287
|
+
|
288
|
+
### Authorization
|
289
|
+
|
290
|
+
[bearerAuth](../README.md#bearerAuth)
|
291
|
+
|
292
|
+
### HTTP request headers
|
293
|
+
|
294
|
+
- **Content-Type**: Not defined
|
295
|
+
- **Accept**: application/json
|
296
|
+
|
297
|
+
|
298
|
+
## get_user
|
299
|
+
|
300
|
+
> <UserResponse> get_user(app_id, user_id)
|
301
|
+
|
302
|
+
Get User
|
303
|
+
|
304
|
+
Get information about a user.
|
305
|
+
|
306
|
+
### Examples
|
307
|
+
|
308
|
+
```ruby
|
309
|
+
require 'time'
|
310
|
+
require 'openapi_client'
|
311
|
+
# setup authorization
|
312
|
+
OpenapiClient.configure do |config|
|
313
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
314
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
315
|
+
end
|
316
|
+
|
317
|
+
api_instance = OpenapiClient::UsersApi.new
|
318
|
+
app_id = 'app_id_example' # String | App ID
|
319
|
+
user_id = 'user_id_example' # String | User ID
|
320
|
+
|
321
|
+
begin
|
322
|
+
# Get User
|
323
|
+
result = api_instance.get_user(app_id, user_id)
|
324
|
+
p result
|
325
|
+
rescue OpenapiClient::ApiError => e
|
326
|
+
puts "Error when calling UsersApi->get_user: #{e}"
|
327
|
+
end
|
328
|
+
```
|
329
|
+
|
330
|
+
#### Using the get_user_with_http_info variant
|
331
|
+
|
332
|
+
This returns an Array which contains the response data, status code and headers.
|
333
|
+
|
334
|
+
> <Array(<UserResponse>, Integer, Hash)> get_user_with_http_info(app_id, user_id)
|
335
|
+
|
336
|
+
```ruby
|
337
|
+
begin
|
338
|
+
# Get User
|
339
|
+
data, status_code, headers = api_instance.get_user_with_http_info(app_id, user_id)
|
340
|
+
p status_code # => 2xx
|
341
|
+
p headers # => { ... }
|
342
|
+
p data # => <UserResponse>
|
343
|
+
rescue OpenapiClient::ApiError => e
|
344
|
+
puts "Error when calling UsersApi->get_user_with_http_info: #{e}"
|
345
|
+
end
|
346
|
+
```
|
347
|
+
|
348
|
+
### Parameters
|
349
|
+
|
350
|
+
| Name | Type | Description | Notes |
|
351
|
+
| ---- | ---- | ----------- | ----- |
|
352
|
+
| **app_id** | **String** | App ID | |
|
353
|
+
| **user_id** | **String** | User ID | |
|
354
|
+
|
355
|
+
### Return type
|
356
|
+
|
357
|
+
[**UserResponse**](UserResponse.md)
|
358
|
+
|
359
|
+
### Authorization
|
360
|
+
|
361
|
+
[bearerAuth](../README.md#bearerAuth)
|
362
|
+
|
363
|
+
### HTTP request headers
|
364
|
+
|
365
|
+
- **Content-Type**: Not defined
|
366
|
+
- **Accept**: application/json
|
367
|
+
|
368
|
+
|
369
|
+
## update_user
|
370
|
+
|
371
|
+
> <UserResponse> update_user(app_id, user_id, update_user_request)
|
372
|
+
|
373
|
+
Update User
|
374
|
+
|
375
|
+
Update a user's information.
|
376
|
+
|
377
|
+
### Examples
|
378
|
+
|
379
|
+
```ruby
|
380
|
+
require 'time'
|
381
|
+
require 'openapi_client'
|
382
|
+
# setup authorization
|
383
|
+
OpenapiClient.configure do |config|
|
384
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
385
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
386
|
+
end
|
387
|
+
|
388
|
+
api_instance = OpenapiClient::UsersApi.new
|
389
|
+
app_id = 'app_id_example' # String | App ID
|
390
|
+
user_id = 'user_id_example' # String | User ID
|
391
|
+
update_user_request = OpenapiClient::UpdateUserRequest.new # UpdateUserRequest | user settings
|
392
|
+
|
393
|
+
begin
|
394
|
+
# Update User
|
395
|
+
result = api_instance.update_user(app_id, user_id, update_user_request)
|
396
|
+
p result
|
397
|
+
rescue OpenapiClient::ApiError => e
|
398
|
+
puts "Error when calling UsersApi->update_user: #{e}"
|
399
|
+
end
|
400
|
+
```
|
401
|
+
|
402
|
+
#### Using the update_user_with_http_info variant
|
403
|
+
|
404
|
+
This returns an Array which contains the response data, status code and headers.
|
405
|
+
|
406
|
+
> <Array(<UserResponse>, Integer, Hash)> update_user_with_http_info(app_id, user_id, update_user_request)
|
407
|
+
|
408
|
+
```ruby
|
409
|
+
begin
|
410
|
+
# Update User
|
411
|
+
data, status_code, headers = api_instance.update_user_with_http_info(app_id, user_id, update_user_request)
|
412
|
+
p status_code # => 2xx
|
413
|
+
p headers # => { ... }
|
414
|
+
p data # => <UserResponse>
|
415
|
+
rescue OpenapiClient::ApiError => e
|
416
|
+
puts "Error when calling UsersApi->update_user_with_http_info: #{e}"
|
417
|
+
end
|
418
|
+
```
|
419
|
+
|
420
|
+
### Parameters
|
421
|
+
|
422
|
+
| Name | Type | Description | Notes |
|
423
|
+
| ---- | ---- | ----------- | ----- |
|
424
|
+
| **app_id** | **String** | App ID | |
|
425
|
+
| **user_id** | **String** | User ID | |
|
426
|
+
| **update_user_request** | [**UpdateUserRequest**](UpdateUserRequest.md) | user settings | |
|
427
|
+
|
428
|
+
### Return type
|
429
|
+
|
430
|
+
[**UserResponse**](UserResponse.md)
|
431
|
+
|
432
|
+
### Authorization
|
433
|
+
|
434
|
+
[bearerAuth](../README.md#bearerAuth)
|
435
|
+
|
436
|
+
### HTTP request headers
|
437
|
+
|
438
|
+
- **Content-Type**: application/json
|
439
|
+
- **Accept**: application/json
|
440
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# OpenapiClient::WebAuthnDevices
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **created_at** | **Time** | The first time this webAuthn device was used to authenticate the user | |
|
8
|
+
| **cred_id** | **String** | The CredID for this webAuthn device | |
|
9
|
+
| **friendly_name** | **String** | The friendly name for the webAuthn device used to authenticate | |
|
10
|
+
| **id** | **String** | The ID of the webAuthn device used for authentication | |
|
11
|
+
| **last_login_at** | **Time** | The last time this webAuthn device was used to authenticate the user | |
|
12
|
+
| **type** | [**WebAuthnType**](WebAuthnType.md) | | |
|
13
|
+
| **updated_at** | **Time** | The last time this webAuthn device was updated | |
|
14
|
+
| **usage_count** | **Integer** | How many times this webAuthn device has been used to authenticate the user | |
|
15
|
+
| **icons** | [**WebAuthnIcons**](WebAuthnIcons.md) | | |
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'openapi_client'
|
21
|
+
|
22
|
+
instance = OpenapiClient::WebAuthnDevices.new(
|
23
|
+
created_at: null,
|
24
|
+
cred_id: null,
|
25
|
+
friendly_name: null,
|
26
|
+
id: null,
|
27
|
+
last_login_at: null,
|
28
|
+
type: null,
|
29
|
+
updated_at: null,
|
30
|
+
usage_count: null,
|
31
|
+
icons: null
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# OpenapiClient::WebAuthnIcons
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **light** | **String** | | |
|
8
|
+
| **dark** | **String** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'openapi_client'
|
14
|
+
|
15
|
+
instance = OpenapiClient::WebAuthnIcons.new(
|
16
|
+
light: null,
|
17
|
+
dark: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/generate.sh
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# #!/bin/bash
|
2
|
+
# set -e
|
3
|
+
|
4
|
+
if [ -z "$1" ]; then
|
5
|
+
echo "Required generator file is missing."
|
6
|
+
exit 1
|
7
|
+
fi
|
8
|
+
|
9
|
+
file="$1"
|
10
|
+
|
11
|
+
npm install @openapitools/openapi-generator-cli -g
|
12
|
+
|
13
|
+
mkdir generated
|
14
|
+
|
15
|
+
openapi-generator-cli generate \
|
16
|
+
-i "$file" \
|
17
|
+
-g ruby \
|
18
|
+
-o ./generated \
|
19
|
+
--additional-properties=modelPropertyNaming=original,library=faraday
|
20
|
+
|
21
|
+
rm -rf ./docs/generated
|
22
|
+
mv ./generated/docs ./docs/generated
|
23
|
+
mv ./generated/README.md ./docs/generated
|
24
|
+
|
25
|
+
rm -rf ./lib/openapi_client
|
26
|
+
mv ./generated/lib/openapi_client ./lib
|
27
|
+
|
28
|
+
rm -rf ./lib/openapi_client.rb
|
29
|
+
mv ./generated/lib/openapi_client.rb ./lib/openapi_client.rb
|
30
|
+
|
31
|
+
rm -rf ./generated
|
@@ -0,0 +1,85 @@
|
|
1
|
+
=begin
|
2
|
+
#Passage Management API
|
3
|
+
|
4
|
+
#Passage's management API to manage your Passage apps and users.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1
|
7
|
+
Contact: support@passage.id
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
class AppsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get App
|
23
|
+
# Get app information.
|
24
|
+
# @param app_id [String] App ID
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [AppResponse]
|
27
|
+
def get_app(app_id, opts = {})
|
28
|
+
data, _status_code, _headers = get_app_with_http_info(app_id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get App
|
33
|
+
# Get app information.
|
34
|
+
# @param app_id [String] App ID
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(AppResponse, Integer, Hash)>] AppResponse data, response status code and response headers
|
37
|
+
def get_app_with_http_info(app_id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.get_app ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'app_id' is set
|
42
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppsApi.get_app"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/apps/{app_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:debug_body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:debug_return_type] || 'AppResponse'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:operation => :"AppsApi.get_app",
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: AppsApi#get_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|