ory-kratos-client 0.0.3.alpha10 → 0.1.0.alpha4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/AdminApi.md +50 -0
- data/docs/CommonApi.md +50 -0
- data/docs/ErrorContainer.md +19 -0
- data/docs/FormField.md +5 -1
- data/docs/PublicApi.md +54 -6
- data/lib/ory-kratos-client.rb +1 -0
- data/lib/ory-kratos-client/api/admin_api.rb +59 -0
- data/lib/ory-kratos-client/api/common_api.rb +59 -0
- data/lib/ory-kratos-client/api/public_api.rb +69 -6
- data/lib/ory-kratos-client/models/error_container.rb +215 -0
- data/lib/ory-kratos-client/models/form_field.rb +21 -1
- data/lib/ory-kratos-client/version.rb +1 -1
- data/spec/api/admin_api_spec.rb +12 -0
- data/spec/api/common_api_spec.rb +12 -0
- data/spec/models/error_container_spec.rb +47 -0
- metadata +21 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c94782432c7923935e4592d44073755dafbe466a17c3d97bdc50066e048fd0c2
|
4
|
+
data.tar.gz: a6d52e9bed1a9bd2ec3f00258d8458ab52e64f730eef8d70ea89fb28e12701dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8dd3f7ac5ef5e022c013fccc4a01a6ad720264d777677dbb3533381abbf2000350088312f52f82b099af2a232cb8782188ed02ae496b9f7cb031df98ea3ce8f
|
7
|
+
data.tar.gz: 34a0eccd05e6c78ab0ecb0adf07b8ce17cb53dadc6d31b2d18c2c2f0b00444d50bfbc39ff86febd226a788a208014b88ee8a9a3a3cf6fb0d16b5f7ec0ef2cb18
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Welcome to the ORY Kratos HTTP API documentation!
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: latest
|
10
|
-
- Package version: v0.0
|
10
|
+
- Package version: v0.1.0-alpha.4
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,16 +23,16 @@ gem build ory-kratos-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./ory-kratos-client-v0.0
|
26
|
+
gem install ./ory-kratos-client-v0.1.0-alpha.4.gem
|
27
27
|
```
|
28
28
|
|
29
|
-
(for development, run `gem install --dev ./ory-kratos-client-v0.0
|
29
|
+
(for development, run `gem install --dev ./ory-kratos-client-v0.1.0-alpha.4.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ory-kratos-client', '~> v0.0
|
35
|
+
gem 'ory-kratos-client', '~> v0.1.0-alpha.4'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -81,17 +81,20 @@ Class | Method | HTTP request | Description
|
|
81
81
|
*OryHydraClient::AdminApi* | [**get_self_service_browser_login_request**](docs/AdminApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
82
82
|
*OryHydraClient::AdminApi* | [**get_self_service_browser_profile_management_request**](docs/AdminApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
83
83
|
*OryHydraClient::AdminApi* | [**get_self_service_browser_registration_request**](docs/AdminApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
84
|
+
*OryHydraClient::AdminApi* | [**get_self_service_error**](docs/AdminApi.md#get_self_service_error) | **GET** /self-service/errors | Get user-facing self-service errors
|
84
85
|
*OryHydraClient::AdminApi* | [**list_identities**](docs/AdminApi.md#list_identities) | **GET** /identities | List all identities in the system
|
85
86
|
*OryHydraClient::AdminApi* | [**update_identity**](docs/AdminApi.md#update_identity) | **PUT** /identities/{id} | Update an identity
|
86
87
|
*OryHydraClient::CommonApi* | [**get_self_service_browser_login_request**](docs/CommonApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
87
88
|
*OryHydraClient::CommonApi* | [**get_self_service_browser_profile_management_request**](docs/CommonApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
88
89
|
*OryHydraClient::CommonApi* | [**get_self_service_browser_registration_request**](docs/CommonApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
90
|
+
*OryHydraClient::CommonApi* | [**get_self_service_error**](docs/CommonApi.md#get_self_service_error) | **GET** /self-service/errors | Get user-facing self-service errors
|
89
91
|
*OryHydraClient::HealthApi* | [**is_instance_alive**](docs/HealthApi.md#is_instance_alive) | **GET** /health/alive | Check alive status
|
90
92
|
*OryHydraClient::HealthApi* | [**is_instance_ready**](docs/HealthApi.md#is_instance_ready) | **GET** /health/ready | Check readiness status
|
91
93
|
*OryHydraClient::PublicApi* | [**complete_self_service_browser_profile_management_flow**](docs/PublicApi.md#complete_self_service_browser_profile_management_flow) | **POST** /self-service/browser/flows/profile/update | Complete the browser-based profile management flows
|
92
94
|
*OryHydraClient::PublicApi* | [**get_self_service_browser_login_request**](docs/PublicApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
93
95
|
*OryHydraClient::PublicApi* | [**get_self_service_browser_profile_management_request**](docs/PublicApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
94
96
|
*OryHydraClient::PublicApi* | [**get_self_service_browser_registration_request**](docs/PublicApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
97
|
+
*OryHydraClient::PublicApi* | [**get_self_service_error**](docs/PublicApi.md#get_self_service_error) | **GET** /self-service/errors | Get user-facing self-service errors
|
95
98
|
*OryHydraClient::PublicApi* | [**initialize_self_service_browser_login_flow**](docs/PublicApi.md#initialize_self_service_browser_login_flow) | **GET** /self-service/browser/flows/login | Initialize browser-based login user flow
|
96
99
|
*OryHydraClient::PublicApi* | [**initialize_self_service_browser_logout_flow**](docs/PublicApi.md#initialize_self_service_browser_logout_flow) | **GET** /self-service/browser/flows/logout | Initialize Browser-Based Logout User Flow
|
97
100
|
*OryHydraClient::PublicApi* | [**initialize_self_service_browser_registration_flow**](docs/PublicApi.md#initialize_self_service_browser_registration_flow) | **GET** /self-service/browser/flows/registration | Initialize browser-based registration user flow
|
@@ -104,6 +107,7 @@ Class | Method | HTTP request | Description
|
|
104
107
|
|
105
108
|
- [OryHydraClient::CompleteSelfServiceBrowserProfileManagementFlowPayload](docs/CompleteSelfServiceBrowserProfileManagementFlowPayload.md)
|
106
109
|
- [OryHydraClient::Error](docs/Error.md)
|
110
|
+
- [OryHydraClient::ErrorContainer](docs/ErrorContainer.md)
|
107
111
|
- [OryHydraClient::Form](docs/Form.md)
|
108
112
|
- [OryHydraClient::FormField](docs/FormField.md)
|
109
113
|
- [OryHydraClient::GenericError](docs/GenericError.md)
|
data/docs/AdminApi.md
CHANGED
@@ -10,6 +10,7 @@ Method | HTTP request | Description
|
|
10
10
|
[**get_self_service_browser_login_request**](AdminApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
11
11
|
[**get_self_service_browser_profile_management_request**](AdminApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
12
12
|
[**get_self_service_browser_registration_request**](AdminApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
13
|
+
[**get_self_service_error**](AdminApi.md#get_self_service_error) | **GET** /self-service/errors | Get user-facing self-service errors
|
13
14
|
[**list_identities**](AdminApi.md#list_identities) | **GET** /identities | List all identities in the system
|
14
15
|
[**update_identity**](AdminApi.md#update_identity) | **PUT** /identities/{id} | Update an identity
|
15
16
|
|
@@ -296,6 +297,55 @@ No authorization required
|
|
296
297
|
- **Accept**: application/json
|
297
298
|
|
298
299
|
|
300
|
+
## get_self_service_error
|
301
|
+
|
302
|
+
> ErrorContainer get_self_service_error(opts)
|
303
|
+
|
304
|
+
Get user-facing self-service errors
|
305
|
+
|
306
|
+
This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
307
|
+
|
308
|
+
### Example
|
309
|
+
|
310
|
+
```ruby
|
311
|
+
# load the gem
|
312
|
+
require 'ory-kratos-client'
|
313
|
+
|
314
|
+
api_instance = OryHydraClient::AdminApi.new
|
315
|
+
opts = {
|
316
|
+
id: 'id_example' # String |
|
317
|
+
}
|
318
|
+
|
319
|
+
begin
|
320
|
+
#Get user-facing self-service errors
|
321
|
+
result = api_instance.get_self_service_error(opts)
|
322
|
+
p result
|
323
|
+
rescue OryHydraClient::ApiError => e
|
324
|
+
puts "Exception when calling AdminApi->get_self_service_error: #{e}"
|
325
|
+
end
|
326
|
+
```
|
327
|
+
|
328
|
+
### Parameters
|
329
|
+
|
330
|
+
|
331
|
+
Name | Type | Description | Notes
|
332
|
+
------------- | ------------- | ------------- | -------------
|
333
|
+
**id** | **String**| | [optional]
|
334
|
+
|
335
|
+
### Return type
|
336
|
+
|
337
|
+
[**ErrorContainer**](ErrorContainer.md)
|
338
|
+
|
339
|
+
### Authorization
|
340
|
+
|
341
|
+
No authorization required
|
342
|
+
|
343
|
+
### HTTP request headers
|
344
|
+
|
345
|
+
- **Content-Type**: Not defined
|
346
|
+
- **Accept**: application/json
|
347
|
+
|
348
|
+
|
299
349
|
## list_identities
|
300
350
|
|
301
351
|
> Array<Identity> list_identities
|
data/docs/CommonApi.md
CHANGED
@@ -7,6 +7,7 @@ Method | HTTP request | Description
|
|
7
7
|
[**get_self_service_browser_login_request**](CommonApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
8
8
|
[**get_self_service_browser_profile_management_request**](CommonApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
9
9
|
[**get_self_service_browser_registration_request**](CommonApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
10
|
+
[**get_self_service_error**](CommonApi.md#get_self_service_error) | **GET** /self-service/errors | Get user-facing self-service errors
|
10
11
|
|
11
12
|
|
12
13
|
|
@@ -150,3 +151,52 @@ No authorization required
|
|
150
151
|
- **Content-Type**: Not defined
|
151
152
|
- **Accept**: application/json
|
152
153
|
|
154
|
+
|
155
|
+
## get_self_service_error
|
156
|
+
|
157
|
+
> ErrorContainer get_self_service_error(opts)
|
158
|
+
|
159
|
+
Get user-facing self-service errors
|
160
|
+
|
161
|
+
This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
162
|
+
|
163
|
+
### Example
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
# load the gem
|
167
|
+
require 'ory-kratos-client'
|
168
|
+
|
169
|
+
api_instance = OryHydraClient::CommonApi.new
|
170
|
+
opts = {
|
171
|
+
id: 'id_example' # String |
|
172
|
+
}
|
173
|
+
|
174
|
+
begin
|
175
|
+
#Get user-facing self-service errors
|
176
|
+
result = api_instance.get_self_service_error(opts)
|
177
|
+
p result
|
178
|
+
rescue OryHydraClient::ApiError => e
|
179
|
+
puts "Exception when calling CommonApi->get_self_service_error: #{e}"
|
180
|
+
end
|
181
|
+
```
|
182
|
+
|
183
|
+
### Parameters
|
184
|
+
|
185
|
+
|
186
|
+
Name | Type | Description | Notes
|
187
|
+
------------- | ------------- | ------------- | -------------
|
188
|
+
**id** | **String**| | [optional]
|
189
|
+
|
190
|
+
### Return type
|
191
|
+
|
192
|
+
[**ErrorContainer**](ErrorContainer.md)
|
193
|
+
|
194
|
+
### Authorization
|
195
|
+
|
196
|
+
No authorization required
|
197
|
+
|
198
|
+
### HTTP request headers
|
199
|
+
|
200
|
+
- **Content-Type**: Not defined
|
201
|
+
- **Accept**: application/json
|
202
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::ErrorContainer
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**errors** | [**Object**](.md) | | [optional]
|
8
|
+
**id** | **String** | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::ErrorContainer.new(errors: null,
|
16
|
+
id: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/FormField.md
CHANGED
@@ -4,8 +4,10 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
+
**disabled** | **String** | Disabled is the equivalent of <input disabled=\"{{.Disabled}}\"> | [optional]
|
7
8
|
**errors** | [**Array<Error>**](Error.md) | Errors contains all validation errors this particular field has caused. | [optional]
|
8
9
|
**name** | **String** | Name is the equivalent of <input name=\"{{.Name}}\"> | [optional]
|
10
|
+
**pattern** | **String** | Pattern is the equivalent of <input pattern=\"{{.Pattern}}\"> | [optional]
|
9
11
|
**required** | **Boolean** | Required is the equivalent of <input required=\"{{.Required}}\"> | [optional]
|
10
12
|
**type** | **String** | Type is the equivalent of <input type=\"{{.Type}}\"> | [optional]
|
11
13
|
**value** | [**Object**](.md) | Value is the equivalent of <input value=\"{{.Value}}\"> | [optional]
|
@@ -15,8 +17,10 @@ Name | Type | Description | Notes
|
|
15
17
|
```ruby
|
16
18
|
require 'OryHydraClient'
|
17
19
|
|
18
|
-
instance = OryHydraClient::FormField.new(
|
20
|
+
instance = OryHydraClient::FormField.new(disabled: null,
|
21
|
+
errors: null,
|
19
22
|
name: null,
|
23
|
+
pattern: null,
|
20
24
|
required: null,
|
21
25
|
type: null,
|
22
26
|
value: null)
|
data/docs/PublicApi.md
CHANGED
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|
8
8
|
[**get_self_service_browser_login_request**](PublicApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
9
9
|
[**get_self_service_browser_profile_management_request**](PublicApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
10
10
|
[**get_self_service_browser_registration_request**](PublicApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
11
|
+
[**get_self_service_error**](PublicApi.md#get_self_service_error) | **GET** /self-service/errors | Get user-facing self-service errors
|
11
12
|
[**initialize_self_service_browser_login_flow**](PublicApi.md#initialize_self_service_browser_login_flow) | **GET** /self-service/browser/flows/login | Initialize browser-based login user flow
|
12
13
|
[**initialize_self_service_browser_logout_flow**](PublicApi.md#initialize_self_service_browser_logout_flow) | **GET** /self-service/browser/flows/logout | Initialize Browser-Based Logout User Flow
|
13
14
|
[**initialize_self_service_browser_registration_flow**](PublicApi.md#initialize_self_service_browser_registration_flow) | **GET** /self-service/browser/flows/registration | Initialize browser-based registration user flow
|
@@ -18,7 +19,7 @@ Method | HTTP request | Description
|
|
18
19
|
|
19
20
|
## complete_self_service_browser_profile_management_flow
|
20
21
|
|
21
|
-
> complete_self_service_browser_profile_management_flow(
|
22
|
+
> complete_self_service_browser_profile_management_flow(request, body)
|
22
23
|
|
23
24
|
Complete the browser-based profile management flows
|
24
25
|
|
@@ -31,14 +32,12 @@ This endpoint completes a browser-based profile management flow. This is usually
|
|
31
32
|
require 'ory-kratos-client'
|
32
33
|
|
33
34
|
api_instance = OryHydraClient::PublicApi.new
|
35
|
+
request = 'request_example' # String | Request is the request ID.
|
34
36
|
body = OryHydraClient::CompleteSelfServiceBrowserProfileManagementFlowPayload.new # CompleteSelfServiceBrowserProfileManagementFlowPayload |
|
35
|
-
opts = {
|
36
|
-
request: 'request_example' # String | Request is the request ID. type: string
|
37
|
-
}
|
38
37
|
|
39
38
|
begin
|
40
39
|
#Complete the browser-based profile management flows
|
41
|
-
api_instance.complete_self_service_browser_profile_management_flow(
|
40
|
+
api_instance.complete_self_service_browser_profile_management_flow(request, body)
|
42
41
|
rescue OryHydraClient::ApiError => e
|
43
42
|
puts "Exception when calling PublicApi->complete_self_service_browser_profile_management_flow: #{e}"
|
44
43
|
end
|
@@ -49,8 +48,8 @@ end
|
|
49
48
|
|
50
49
|
Name | Type | Description | Notes
|
51
50
|
------------- | ------------- | ------------- | -------------
|
51
|
+
**request** | **String**| Request is the request ID. |
|
52
52
|
**body** | [**CompleteSelfServiceBrowserProfileManagementFlowPayload**](CompleteSelfServiceBrowserProfileManagementFlowPayload.md)| |
|
53
|
-
**request** | **String**| Request is the request ID. type: string | [optional]
|
54
53
|
|
55
54
|
### Return type
|
56
55
|
|
@@ -207,6 +206,55 @@ No authorization required
|
|
207
206
|
- **Accept**: application/json
|
208
207
|
|
209
208
|
|
209
|
+
## get_self_service_error
|
210
|
+
|
211
|
+
> ErrorContainer get_self_service_error(opts)
|
212
|
+
|
213
|
+
Get user-facing self-service errors
|
214
|
+
|
215
|
+
This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
216
|
+
|
217
|
+
### Example
|
218
|
+
|
219
|
+
```ruby
|
220
|
+
# load the gem
|
221
|
+
require 'ory-kratos-client'
|
222
|
+
|
223
|
+
api_instance = OryHydraClient::PublicApi.new
|
224
|
+
opts = {
|
225
|
+
id: 'id_example' # String |
|
226
|
+
}
|
227
|
+
|
228
|
+
begin
|
229
|
+
#Get user-facing self-service errors
|
230
|
+
result = api_instance.get_self_service_error(opts)
|
231
|
+
p result
|
232
|
+
rescue OryHydraClient::ApiError => e
|
233
|
+
puts "Exception when calling PublicApi->get_self_service_error: #{e}"
|
234
|
+
end
|
235
|
+
```
|
236
|
+
|
237
|
+
### Parameters
|
238
|
+
|
239
|
+
|
240
|
+
Name | Type | Description | Notes
|
241
|
+
------------- | ------------- | ------------- | -------------
|
242
|
+
**id** | **String**| | [optional]
|
243
|
+
|
244
|
+
### Return type
|
245
|
+
|
246
|
+
[**ErrorContainer**](ErrorContainer.md)
|
247
|
+
|
248
|
+
### Authorization
|
249
|
+
|
250
|
+
No authorization required
|
251
|
+
|
252
|
+
### HTTP request headers
|
253
|
+
|
254
|
+
- **Content-Type**: Not defined
|
255
|
+
- **Accept**: application/json
|
256
|
+
|
257
|
+
|
210
258
|
## initialize_self_service_browser_login_flow
|
211
259
|
|
212
260
|
> initialize_self_service_browser_login_flow
|
data/lib/ory-kratos-client.rb
CHANGED
@@ -19,6 +19,7 @@ require 'ory-kratos-client/configuration'
|
|
19
19
|
# Models
|
20
20
|
require 'ory-kratos-client/models/complete_self_service_browser_profile_management_flow_payload'
|
21
21
|
require 'ory-kratos-client/models/error'
|
22
|
+
require 'ory-kratos-client/models/error_container'
|
22
23
|
require 'ory-kratos-client/models/form'
|
23
24
|
require 'ory-kratos-client/models/form_field'
|
24
25
|
require 'ory-kratos-client/models/generic_error'
|
@@ -396,6 +396,65 @@ module OryHydraClient
|
|
396
396
|
return data, status_code, headers
|
397
397
|
end
|
398
398
|
|
399
|
+
# Get user-facing self-service errors
|
400
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
401
|
+
# @param [Hash] opts the optional parameters
|
402
|
+
# @option opts [String] :id
|
403
|
+
# @return [ErrorContainer]
|
404
|
+
def get_self_service_error(opts = {})
|
405
|
+
data, _status_code, _headers = get_self_service_error_with_http_info(opts)
|
406
|
+
data
|
407
|
+
end
|
408
|
+
|
409
|
+
# Get user-facing self-service errors
|
410
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
411
|
+
# @param [Hash] opts the optional parameters
|
412
|
+
# @option opts [String] :id
|
413
|
+
# @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
|
414
|
+
def get_self_service_error_with_http_info(opts = {})
|
415
|
+
if @api_client.config.debugging
|
416
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.get_self_service_error ...'
|
417
|
+
end
|
418
|
+
# resource path
|
419
|
+
local_var_path = '/self-service/errors'
|
420
|
+
|
421
|
+
# query parameters
|
422
|
+
query_params = opts[:query_params] || {}
|
423
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
424
|
+
|
425
|
+
# header parameters
|
426
|
+
header_params = opts[:header_params] || {}
|
427
|
+
# HTTP header 'Accept' (if needed)
|
428
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
429
|
+
|
430
|
+
# form parameters
|
431
|
+
form_params = opts[:form_params] || {}
|
432
|
+
|
433
|
+
# http body (model)
|
434
|
+
post_body = opts[:body]
|
435
|
+
|
436
|
+
# return_type
|
437
|
+
return_type = opts[:return_type] || 'ErrorContainer'
|
438
|
+
|
439
|
+
# auth_names
|
440
|
+
auth_names = opts[:auth_names] || []
|
441
|
+
|
442
|
+
new_options = opts.merge(
|
443
|
+
:header_params => header_params,
|
444
|
+
:query_params => query_params,
|
445
|
+
:form_params => form_params,
|
446
|
+
:body => post_body,
|
447
|
+
:auth_names => auth_names,
|
448
|
+
:return_type => return_type
|
449
|
+
)
|
450
|
+
|
451
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
452
|
+
if @api_client.config.debugging
|
453
|
+
@api_client.config.logger.debug "API called: AdminApi#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
454
|
+
end
|
455
|
+
return data, status_code, headers
|
456
|
+
end
|
457
|
+
|
399
458
|
# List all identities in the system
|
400
459
|
# This endpoint returns a login request's context with, for example, error details and other information. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
401
460
|
# @param [Hash] opts the optional parameters
|
@@ -207,5 +207,64 @@ module OryHydraClient
|
|
207
207
|
end
|
208
208
|
return data, status_code, headers
|
209
209
|
end
|
210
|
+
|
211
|
+
# Get user-facing self-service errors
|
212
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @option opts [String] :id
|
215
|
+
# @return [ErrorContainer]
|
216
|
+
def get_self_service_error(opts = {})
|
217
|
+
data, _status_code, _headers = get_self_service_error_with_http_info(opts)
|
218
|
+
data
|
219
|
+
end
|
220
|
+
|
221
|
+
# Get user-facing self-service errors
|
222
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @option opts [String] :id
|
225
|
+
# @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
|
226
|
+
def get_self_service_error_with_http_info(opts = {})
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug 'Calling API: CommonApi.get_self_service_error ...'
|
229
|
+
end
|
230
|
+
# resource path
|
231
|
+
local_var_path = '/self-service/errors'
|
232
|
+
|
233
|
+
# query parameters
|
234
|
+
query_params = opts[:query_params] || {}
|
235
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
236
|
+
|
237
|
+
# header parameters
|
238
|
+
header_params = opts[:header_params] || {}
|
239
|
+
# HTTP header 'Accept' (if needed)
|
240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
241
|
+
|
242
|
+
# form parameters
|
243
|
+
form_params = opts[:form_params] || {}
|
244
|
+
|
245
|
+
# http body (model)
|
246
|
+
post_body = opts[:body]
|
247
|
+
|
248
|
+
# return_type
|
249
|
+
return_type = opts[:return_type] || 'ErrorContainer'
|
250
|
+
|
251
|
+
# auth_names
|
252
|
+
auth_names = opts[:auth_names] || []
|
253
|
+
|
254
|
+
new_options = opts.merge(
|
255
|
+
:header_params => header_params,
|
256
|
+
:query_params => query_params,
|
257
|
+
:form_params => form_params,
|
258
|
+
:body => post_body,
|
259
|
+
:auth_names => auth_names,
|
260
|
+
:return_type => return_type
|
261
|
+
)
|
262
|
+
|
263
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug "API called: CommonApi#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
266
|
+
end
|
267
|
+
return data, status_code, headers
|
268
|
+
end
|
210
269
|
end
|
211
270
|
end
|
@@ -21,25 +21,29 @@ module OryHydraClient
|
|
21
21
|
end
|
22
22
|
# Complete the browser-based profile management flows
|
23
23
|
# This endpoint completes a browser-based profile management flow. This is usually achieved by POSTing data to this endpoint. If the provided profile data is valid against the Identity's Traits JSON Schema, the data will be updated and the browser redirected to `url.profile_ui` for further steps. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. More information can be found at [ORY Kratos Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-profile-management).
|
24
|
+
# @param request [String] Request is the request ID.
|
24
25
|
# @param body [CompleteSelfServiceBrowserProfileManagementFlowPayload]
|
25
26
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [String] :request Request is the request ID. type: string
|
27
27
|
# @return [nil]
|
28
|
-
def complete_self_service_browser_profile_management_flow(body, opts = {})
|
29
|
-
complete_self_service_browser_profile_management_flow_with_http_info(body, opts)
|
28
|
+
def complete_self_service_browser_profile_management_flow(request, body, opts = {})
|
29
|
+
complete_self_service_browser_profile_management_flow_with_http_info(request, body, opts)
|
30
30
|
nil
|
31
31
|
end
|
32
32
|
|
33
33
|
# Complete the browser-based profile management flows
|
34
34
|
# This endpoint completes a browser-based profile management flow. This is usually achieved by POSTing data to this endpoint. If the provided profile data is valid against the Identity's Traits JSON Schema, the data will be updated and the browser redirected to `url.profile_ui` for further steps. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. More information can be found at [ORY Kratos Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-profile-management).
|
35
|
+
# @param request [String] Request is the request ID.
|
35
36
|
# @param body [CompleteSelfServiceBrowserProfileManagementFlowPayload]
|
36
37
|
# @param [Hash] opts the optional parameters
|
37
|
-
# @option opts [String] :request Request is the request ID. type: string
|
38
38
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
39
|
-
def complete_self_service_browser_profile_management_flow_with_http_info(body, opts = {})
|
39
|
+
def complete_self_service_browser_profile_management_flow_with_http_info(request, body, opts = {})
|
40
40
|
if @api_client.config.debugging
|
41
41
|
@api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_profile_management_flow ...'
|
42
42
|
end
|
43
|
+
# verify the required parameter 'request' is set
|
44
|
+
if @api_client.config.client_side_validation && request.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.complete_self_service_browser_profile_management_flow"
|
46
|
+
end
|
43
47
|
# verify the required parameter 'body' is set
|
44
48
|
if @api_client.config.client_side_validation && body.nil?
|
45
49
|
fail ArgumentError, "Missing the required parameter 'body' when calling PublicApi.complete_self_service_browser_profile_management_flow"
|
@@ -49,7 +53,7 @@ module OryHydraClient
|
|
49
53
|
|
50
54
|
# query parameters
|
51
55
|
query_params = opts[:query_params] || {}
|
52
|
-
query_params[:'request'] =
|
56
|
+
query_params[:'request'] = request
|
53
57
|
|
54
58
|
# header parameters
|
55
59
|
header_params = opts[:header_params] || {}
|
@@ -275,6 +279,65 @@ module OryHydraClient
|
|
275
279
|
return data, status_code, headers
|
276
280
|
end
|
277
281
|
|
282
|
+
# Get user-facing self-service errors
|
283
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @option opts [String] :id
|
286
|
+
# @return [ErrorContainer]
|
287
|
+
def get_self_service_error(opts = {})
|
288
|
+
data, _status_code, _headers = get_self_service_error_with_http_info(opts)
|
289
|
+
data
|
290
|
+
end
|
291
|
+
|
292
|
+
# Get user-facing self-service errors
|
293
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
294
|
+
# @param [Hash] opts the optional parameters
|
295
|
+
# @option opts [String] :id
|
296
|
+
# @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
|
297
|
+
def get_self_service_error_with_http_info(opts = {})
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_error ...'
|
300
|
+
end
|
301
|
+
# resource path
|
302
|
+
local_var_path = '/self-service/errors'
|
303
|
+
|
304
|
+
# query parameters
|
305
|
+
query_params = opts[:query_params] || {}
|
306
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
307
|
+
|
308
|
+
# header parameters
|
309
|
+
header_params = opts[:header_params] || {}
|
310
|
+
# HTTP header 'Accept' (if needed)
|
311
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
312
|
+
|
313
|
+
# form parameters
|
314
|
+
form_params = opts[:form_params] || {}
|
315
|
+
|
316
|
+
# http body (model)
|
317
|
+
post_body = opts[:body]
|
318
|
+
|
319
|
+
# return_type
|
320
|
+
return_type = opts[:return_type] || 'ErrorContainer'
|
321
|
+
|
322
|
+
# auth_names
|
323
|
+
auth_names = opts[:auth_names] || []
|
324
|
+
|
325
|
+
new_options = opts.merge(
|
326
|
+
:header_params => header_params,
|
327
|
+
:query_params => query_params,
|
328
|
+
:form_params => form_params,
|
329
|
+
:body => post_body,
|
330
|
+
:auth_names => auth_names,
|
331
|
+
:return_type => return_type
|
332
|
+
)
|
333
|
+
|
334
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
335
|
+
if @api_client.config.debugging
|
336
|
+
@api_client.config.logger.debug "API called: PublicApi#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
337
|
+
end
|
338
|
+
return data, status_code, headers
|
339
|
+
end
|
340
|
+
|
278
341
|
# Initialize browser-based login user flow
|
279
342
|
# This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `urls.login_ui` with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
|
280
343
|
# @param [Hash] opts the optional parameters
|
@@ -0,0 +1,215 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory Kratos
|
3
|
+
|
4
|
+
#Welcome to the ORY Kratos HTTP API documentation!
|
5
|
+
|
6
|
+
The version of the OpenAPI document: latest
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.2
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module OryHydraClient
|
16
|
+
class ErrorContainer
|
17
|
+
attr_accessor :errors
|
18
|
+
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'errors' => :'errors',
|
25
|
+
:'id' => :'id'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.openapi_types
|
31
|
+
{
|
32
|
+
:'errors' => :'Object',
|
33
|
+
:'id' => :'String'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# List of attributes with nullable: true
|
38
|
+
def self.openapi_nullable
|
39
|
+
Set.new([
|
40
|
+
])
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
45
|
+
def initialize(attributes = {})
|
46
|
+
if (!attributes.is_a?(Hash))
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::ErrorContainer` initialize method"
|
48
|
+
end
|
49
|
+
|
50
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::ErrorContainer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
|
+
end
|
55
|
+
h[k.to_sym] = v
|
56
|
+
}
|
57
|
+
|
58
|
+
if attributes.key?(:'errors')
|
59
|
+
self.errors = attributes[:'errors']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.key?(:'id')
|
63
|
+
self.id = attributes[:'id']
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
68
|
+
# @return Array for valid properties with the reasons
|
69
|
+
def list_invalid_properties
|
70
|
+
invalid_properties = Array.new
|
71
|
+
invalid_properties
|
72
|
+
end
|
73
|
+
|
74
|
+
# Check to see if the all the properties in the model are valid
|
75
|
+
# @return true if the model is valid
|
76
|
+
def valid?
|
77
|
+
true
|
78
|
+
end
|
79
|
+
|
80
|
+
# Checks equality by comparing each attribute.
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
errors == o.errors &&
|
86
|
+
id == o.id
|
87
|
+
end
|
88
|
+
|
89
|
+
# @see the `==` method
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def eql?(o)
|
92
|
+
self == o
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Integer] Hash code
|
97
|
+
def hash
|
98
|
+
[errors, id].hash
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def self.build_from_hash(attributes)
|
105
|
+
new.build_from_hash(attributes)
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def build_from_hash(attributes)
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
113
|
+
self.class.openapi_types.each_pair do |key, type|
|
114
|
+
if type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :DateTime
|
135
|
+
DateTime.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
OryHydraClient.const_get(type).build_from_hash(value)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Returns the string representation of the object
|
170
|
+
# @return [String] String presentation of the object
|
171
|
+
def to_s
|
172
|
+
to_hash.to_s
|
173
|
+
end
|
174
|
+
|
175
|
+
# to_body is an alias to to_hash (backward compatibility)
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
177
|
+
def to_body
|
178
|
+
to_hash
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the object in the form of hash
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_hash
|
184
|
+
hash = {}
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
186
|
+
value = self.send(attr)
|
187
|
+
if value.nil?
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
190
|
+
end
|
191
|
+
|
192
|
+
hash[param] = _to_hash(value)
|
193
|
+
end
|
194
|
+
hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Outputs non-array value in the form of hash
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
199
|
+
# @param [Object] value Any valid value
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
201
|
+
def _to_hash(value)
|
202
|
+
if value.is_a?(Array)
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
204
|
+
elsif value.is_a?(Hash)
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
207
|
+
end
|
208
|
+
elsif value.respond_to? :to_hash
|
209
|
+
value.to_hash
|
210
|
+
else
|
211
|
+
value
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
@@ -15,12 +15,18 @@ require 'date'
|
|
15
15
|
module OryHydraClient
|
16
16
|
# Field represents a HTML Form Field
|
17
17
|
class FormField
|
18
|
+
# Disabled is the equivalent of <input disabled=\"{{.Disabled}}\">
|
19
|
+
attr_accessor :disabled
|
20
|
+
|
18
21
|
# Errors contains all validation errors this particular field has caused.
|
19
22
|
attr_accessor :errors
|
20
23
|
|
21
24
|
# Name is the equivalent of <input name=\"{{.Name}}\">
|
22
25
|
attr_accessor :name
|
23
26
|
|
27
|
+
# Pattern is the equivalent of <input pattern=\"{{.Pattern}}\">
|
28
|
+
attr_accessor :pattern
|
29
|
+
|
24
30
|
# Required is the equivalent of <input required=\"{{.Required}}\">
|
25
31
|
attr_accessor :required
|
26
32
|
|
@@ -33,8 +39,10 @@ module OryHydraClient
|
|
33
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
40
|
def self.attribute_map
|
35
41
|
{
|
42
|
+
:'disabled' => :'disabled',
|
36
43
|
:'errors' => :'errors',
|
37
44
|
:'name' => :'name',
|
45
|
+
:'pattern' => :'pattern',
|
38
46
|
:'required' => :'required',
|
39
47
|
:'type' => :'type',
|
40
48
|
:'value' => :'value'
|
@@ -44,8 +52,10 @@ module OryHydraClient
|
|
44
52
|
# Attribute type mapping.
|
45
53
|
def self.openapi_types
|
46
54
|
{
|
55
|
+
:'disabled' => :'String',
|
47
56
|
:'errors' => :'Array<Error>',
|
48
57
|
:'name' => :'String',
|
58
|
+
:'pattern' => :'String',
|
49
59
|
:'required' => :'Boolean',
|
50
60
|
:'type' => :'String',
|
51
61
|
:'value' => :'Object'
|
@@ -73,6 +83,10 @@ module OryHydraClient
|
|
73
83
|
h[k.to_sym] = v
|
74
84
|
}
|
75
85
|
|
86
|
+
if attributes.key?(:'disabled')
|
87
|
+
self.disabled = attributes[:'disabled']
|
88
|
+
end
|
89
|
+
|
76
90
|
if attributes.key?(:'errors')
|
77
91
|
if (value = attributes[:'errors']).is_a?(Array)
|
78
92
|
self.errors = value
|
@@ -83,6 +97,10 @@ module OryHydraClient
|
|
83
97
|
self.name = attributes[:'name']
|
84
98
|
end
|
85
99
|
|
100
|
+
if attributes.key?(:'pattern')
|
101
|
+
self.pattern = attributes[:'pattern']
|
102
|
+
end
|
103
|
+
|
86
104
|
if attributes.key?(:'required')
|
87
105
|
self.required = attributes[:'required']
|
88
106
|
end
|
@@ -114,8 +132,10 @@ module OryHydraClient
|
|
114
132
|
def ==(o)
|
115
133
|
return true if self.equal?(o)
|
116
134
|
self.class == o.class &&
|
135
|
+
disabled == o.disabled &&
|
117
136
|
errors == o.errors &&
|
118
137
|
name == o.name &&
|
138
|
+
pattern == o.pattern &&
|
119
139
|
required == o.required &&
|
120
140
|
type == o.type &&
|
121
141
|
value == o.value
|
@@ -130,7 +150,7 @@ module OryHydraClient
|
|
130
150
|
# Calculates hash code according to all attributes.
|
131
151
|
# @return [Integer] Hash code
|
132
152
|
def hash
|
133
|
-
[errors, name, required, type, value].hash
|
153
|
+
[disabled, errors, name, pattern, required, type, value].hash
|
134
154
|
end
|
135
155
|
|
136
156
|
# Builds the object from hash
|
data/spec/api/admin_api_spec.rb
CHANGED
@@ -104,6 +104,18 @@ describe 'AdminApi' do
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
# unit tests for get_self_service_error
|
108
|
+
# Get user-facing self-service errors
|
109
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @option opts [String] :id
|
112
|
+
# @return [ErrorContainer]
|
113
|
+
describe 'get_self_service_error test' do
|
114
|
+
it 'should work' do
|
115
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
107
119
|
# unit tests for list_identities
|
108
120
|
# List all identities in the system
|
109
121
|
# This endpoint returns a login request's context with, for example, error details and other information. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
data/spec/api/common_api_spec.rb
CHANGED
@@ -68,4 +68,16 @@ describe 'CommonApi' do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
# unit tests for get_self_service_error
|
72
|
+
# Get user-facing self-service errors
|
73
|
+
# This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
|
74
|
+
# @param [Hash] opts the optional parameters
|
75
|
+
# @option opts [String] :id
|
76
|
+
# @return [ErrorContainer]
|
77
|
+
describe 'get_self_service_error test' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
71
83
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory Kratos
|
3
|
+
|
4
|
+
#Welcome to the ORY Kratos HTTP API documentation!
|
5
|
+
|
6
|
+
The version of the OpenAPI document: latest
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.2
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for OryHydraClient::ErrorContainer
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'ErrorContainer' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = OryHydraClient::ErrorContainer.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of ErrorContainer' do
|
31
|
+
it 'should create an instance of ErrorContainer' do
|
32
|
+
expect(@instance).to be_instance_of(OryHydraClient::ErrorContainer)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "errors"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "id"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ory-kratos-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.1.0.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ORY GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- docs/CommonApi.md
|
85
85
|
- docs/CompleteSelfServiceBrowserProfileManagementFlowPayload.md
|
86
86
|
- docs/Error.md
|
87
|
+
- docs/ErrorContainer.md
|
87
88
|
- docs/Form.md
|
88
89
|
- docs/FormField.md
|
89
90
|
- docs/GenericError.md
|
@@ -116,6 +117,7 @@ files:
|
|
116
117
|
- lib/ory-kratos-client/configuration.rb
|
117
118
|
- lib/ory-kratos-client/models/complete_self_service_browser_profile_management_flow_payload.rb
|
118
119
|
- lib/ory-kratos-client/models/error.rb
|
120
|
+
- lib/ory-kratos-client/models/error_container.rb
|
119
121
|
- lib/ory-kratos-client/models/form.rb
|
120
122
|
- lib/ory-kratos-client/models/form_field.rb
|
121
123
|
- lib/ory-kratos-client/models/generic_error.rb
|
@@ -144,6 +146,7 @@ files:
|
|
144
146
|
- spec/api_client_spec.rb
|
145
147
|
- spec/configuration_spec.rb
|
146
148
|
- spec/models/complete_self_service_browser_profile_management_flow_payload_spec.rb
|
149
|
+
- spec/models/error_container_spec.rb
|
147
150
|
- spec/models/error_spec.rb
|
148
151
|
- spec/models/form_field_spec.rb
|
149
152
|
- spec/models/form_spec.rb
|
@@ -189,31 +192,32 @@ signing_key:
|
|
189
192
|
specification_version: 4
|
190
193
|
summary: Ory Kratos Ruby Gem
|
191
194
|
test_files:
|
192
|
-
- spec/api/health_api_spec.rb
|
193
|
-
- spec/api/public_api_spec.rb
|
194
195
|
- spec/api/admin_api_spec.rb
|
195
|
-
- spec/api/
|
196
|
+
- spec/api/public_api_spec.rb
|
197
|
+
- spec/api/health_api_spec.rb
|
196
198
|
- spec/api/common_api_spec.rb
|
199
|
+
- spec/api/version_api_spec.rb
|
197
200
|
- spec/api_client_spec.rb
|
198
201
|
- spec/configuration_spec.rb
|
202
|
+
- spec/models/login_request_spec.rb
|
203
|
+
- spec/models/oidc_strategy_request_method_spec.rb
|
204
|
+
- spec/models/health_not_ready_status_spec.rb
|
205
|
+
- spec/models/login_request_method_spec.rb
|
199
206
|
- spec/models/generic_error_payload_spec.rb
|
200
|
-
- spec/models/profile_management_request_spec.rb
|
201
|
-
- spec/models/form_field_spec.rb
|
202
|
-
- spec/models/registration_request_method_config_spec.rb
|
203
|
-
- spec/models/version_spec.rb
|
204
207
|
- spec/models/oidc_strategy_credentials_config_spec.rb
|
208
|
+
- spec/models/form_field_spec.rb
|
205
209
|
- spec/models/error_spec.rb
|
206
|
-
- spec/models/
|
210
|
+
- spec/models/complete_self_service_browser_profile_management_flow_payload_spec.rb
|
211
|
+
- spec/models/registration_request_spec.rb
|
212
|
+
- spec/models/health_status_spec.rb
|
207
213
|
- spec/models/login_request_method_config_spec.rb
|
208
|
-
- spec/models/login_request_method_spec.rb
|
209
214
|
- spec/models/generic_error_spec.rb
|
210
|
-
- spec/models/health_not_ready_status_spec.rb
|
211
|
-
- spec/models/oidc_strategy_request_method_spec.rb
|
212
215
|
- spec/models/registration_request_method_spec.rb
|
213
|
-
- spec/models/
|
214
|
-
- spec/models/
|
216
|
+
- spec/models/identity_spec.rb
|
217
|
+
- spec/models/error_container_spec.rb
|
218
|
+
- spec/models/profile_management_request_spec.rb
|
219
|
+
- spec/models/version_spec.rb
|
220
|
+
- spec/models/registration_request_method_config_spec.rb
|
215
221
|
- spec/models/session_spec.rb
|
216
|
-
- spec/models/registration_request_spec.rb
|
217
222
|
- spec/models/form_spec.rb
|
218
|
-
- spec/models/identity_spec.rb
|
219
223
|
- spec/spec_helper.rb
|