ory-kratos-client 0.3.0.alpha1 → 0.5.3.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +84 -54
  4. data/docs/AdminApi.md +244 -86
  5. data/docs/CommonApi.md +53 -5
  6. data/docs/CompleteSelfServiceLoginFlowWithPasswordMethod.md +21 -0
  7. data/docs/CompleteSelfServiceRecoveryFlowWithLinkMethod.md +19 -0
  8. data/docs/CompleteSelfServiceSettingsFlowWithPasswordMethod.md +19 -0
  9. data/docs/CompleteSelfServiceVerificationFlowWithLinkMethod.md +19 -0
  10. data/docs/CreateIdentity.md +19 -0
  11. data/docs/CreateRecoveryLink.md +19 -0
  12. data/docs/ErrorContainer.md +2 -2
  13. data/docs/Form.md +2 -2
  14. data/docs/FormField.md +3 -3
  15. data/docs/GenericErrorPayload.md +1 -1
  16. data/docs/Identity.md +9 -7
  17. data/docs/LoginFlow.md +33 -0
  18. data/docs/LoginFlowMethod.md +19 -0
  19. data/docs/LoginFlowMethodConfig.md +25 -0
  20. data/docs/LoginRequest.md +2 -0
  21. data/docs/LoginRequestMethodConfig.md +2 -2
  22. data/docs/LoginViaApiResponse.md +19 -0
  23. data/docs/Message.md +23 -0
  24. data/docs/PublicApi.md +689 -157
  25. data/docs/RecoveryAddress.md +21 -0
  26. data/docs/RecoveryFlow.md +33 -0
  27. data/docs/RecoveryFlowMethod.md +19 -0
  28. data/docs/RecoveryFlowMethodConfig.md +23 -0
  29. data/docs/RecoveryLink.md +19 -0
  30. data/docs/RecoveryRequest.md +31 -0
  31. data/docs/RecoveryRequestMethod.md +19 -0
  32. data/docs/RegistrationFlow.md +31 -0
  33. data/docs/RegistrationFlowMethod.md +19 -0
  34. data/docs/RegistrationFlowMethodConfig.md +25 -0
  35. data/docs/RegistrationRequest.md +2 -0
  36. data/docs/RegistrationRequestMethodConfig.md +2 -2
  37. data/docs/RegistrationViaApiResponse.md +21 -0
  38. data/docs/RequestMethodConfig.md +2 -2
  39. data/docs/RevokeSession.md +17 -0
  40. data/docs/Session.md +6 -4
  41. data/docs/SettingsFlow.md +35 -0
  42. data/docs/SettingsFlowMethod.md +19 -0
  43. data/docs/SettingsFlowMethodConfig.md +23 -0
  44. data/docs/SettingsRequest.md +4 -2
  45. data/docs/SettingsViaApiResponse.md +19 -0
  46. data/docs/UpdateIdentity.md +19 -0
  47. data/docs/VerifiableAddress.md +3 -3
  48. data/docs/VerificationFlow.md +33 -0
  49. data/docs/VerificationFlowMethod.md +19 -0
  50. data/docs/VerificationFlowMethodConfig.md +23 -0
  51. data/docs/VerificationRequest.md +2 -0
  52. data/lib/ory-kratos-client.rb +31 -17
  53. data/lib/ory-kratos-client/api/admin_api.rb +321 -130
  54. data/lib/ory-kratos-client/api/common_api.rb +73 -10
  55. data/lib/ory-kratos-client/api/health_api.rb +2 -2
  56. data/lib/ory-kratos-client/api/public_api.rb +830 -236
  57. data/lib/ory-kratos-client/api/version_api.rb +2 -2
  58. data/lib/ory-kratos-client/api_client.rb +10 -7
  59. data/lib/ory-kratos-client/api_error.rb +2 -2
  60. data/lib/ory-kratos-client/configuration.rb +9 -2
  61. data/lib/ory-kratos-client/models/complete_self_service_browser_settings_strategy_profile_flow_payload.rb +2 -2
  62. data/lib/ory-kratos-client/models/complete_self_service_login_flow_with_password_method.rb +227 -0
  63. data/lib/ory-kratos-client/models/complete_self_service_recovery_flow_with_link_method.rb +217 -0
  64. data/lib/ory-kratos-client/models/complete_self_service_settings_flow_with_password_method.rb +222 -0
  65. data/lib/ory-kratos-client/models/complete_self_service_verification_flow_with_link_method.rb +217 -0
  66. data/lib/ory-kratos-client/models/create_identity.rb +227 -0
  67. data/lib/ory-kratos-client/models/create_recovery_link.rb +238 -0
  68. data/lib/ory-kratos-client/models/error_container.rb +13 -2
  69. data/lib/ory-kratos-client/models/form.rb +14 -15
  70. data/lib/ory-kratos-client/models/form_field.rb +11 -11
  71. data/lib/ory-kratos-client/models/generic_error.rb +2 -2
  72. data/lib/ory-kratos-client/models/generic_error_payload.rb +4 -6
  73. data/lib/ory-kratos-client/models/health_not_ready_status.rb +2 -2
  74. data/lib/ory-kratos-client/models/health_status.rb +2 -2
  75. data/lib/ory-kratos-client/models/identity.rb +53 -35
  76. data/lib/ory-kratos-client/models/login_flow.rb +315 -0
  77. data/lib/ory-kratos-client/models/login_flow_method.rb +226 -0
  78. data/lib/ory-kratos-client/models/login_flow_method_config.rb +267 -0
  79. data/lib/ory-kratos-client/models/login_request.rb +14 -3
  80. data/lib/ory-kratos-client/models/login_request_method.rb +2 -2
  81. data/lib/ory-kratos-client/models/login_request_method_config.rb +14 -15
  82. data/lib/ory-kratos-client/models/login_via_api_response.rb +227 -0
  83. data/lib/ory-kratos-client/models/message.rb +234 -0
  84. data/lib/ory-kratos-client/models/provider_credentials_config.rb +2 -2
  85. data/lib/ory-kratos-client/models/recovery_address.rb +239 -0
  86. data/lib/ory-kratos-client/models/recovery_flow.rb +319 -0
  87. data/lib/ory-kratos-client/models/recovery_flow_method.rb +226 -0
  88. data/lib/ory-kratos-client/models/recovery_flow_method_config.rb +255 -0
  89. data/lib/ory-kratos-client/models/recovery_link.rb +222 -0
  90. data/lib/ory-kratos-client/models/recovery_request.rb +309 -0
  91. data/lib/ory-kratos-client/models/recovery_request_method.rb +216 -0
  92. data/lib/ory-kratos-client/models/registration_flow.rb +304 -0
  93. data/lib/ory-kratos-client/models/registration_flow_method.rb +226 -0
  94. data/lib/ory-kratos-client/models/registration_flow_method_config.rb +267 -0
  95. data/lib/ory-kratos-client/models/registration_request.rb +14 -3
  96. data/lib/ory-kratos-client/models/registration_request_method.rb +2 -2
  97. data/lib/ory-kratos-client/models/registration_request_method_config.rb +14 -15
  98. data/lib/ory-kratos-client/models/registration_via_api_response.rb +236 -0
  99. data/lib/ory-kratos-client/models/request_method_config.rb +14 -15
  100. data/lib/ory-kratos-client/models/revoke_session.rb +212 -0
  101. data/lib/ory-kratos-client/models/session.rb +29 -20
  102. data/lib/ory-kratos-client/models/settings_flow.rb +333 -0
  103. data/lib/ory-kratos-client/models/settings_flow_method.rb +226 -0
  104. data/lib/ory-kratos-client/models/settings_flow_method_config.rb +255 -0
  105. data/lib/ory-kratos-client/models/settings_request.rb +23 -13
  106. data/lib/ory-kratos-client/models/settings_request_method.rb +2 -2
  107. data/lib/ory-kratos-client/models/settings_via_api_response.rb +226 -0
  108. data/lib/ory-kratos-client/models/update_identity.rb +222 -0
  109. data/lib/ory-kratos-client/models/verifiable_address.rb +17 -17
  110. data/lib/ory-kratos-client/models/verification_flow.rb +299 -0
  111. data/lib/ory-kratos-client/models/verification_flow_method.rb +226 -0
  112. data/lib/ory-kratos-client/models/verification_flow_method_config.rb +255 -0
  113. data/lib/ory-kratos-client/models/verification_request.rb +14 -3
  114. data/lib/ory-kratos-client/models/version.rb +2 -2
  115. data/lib/ory-kratos-client/version.rb +3 -3
  116. data/ory-kratos-client.gemspec +2 -2
  117. data/spec/models/complete_self_service_login_flow_with_password_method_spec.rb +53 -0
  118. data/spec/models/complete_self_service_recovery_flow_with_link_method_spec.rb +47 -0
  119. data/spec/models/complete_self_service_settings_flow_with_password_method_spec.rb +47 -0
  120. data/spec/models/complete_self_service_verification_flow_with_link_method_spec.rb +47 -0
  121. data/spec/models/create_identity_spec.rb +47 -0
  122. data/spec/models/create_recovery_link_spec.rb +47 -0
  123. data/spec/models/login_flow_method_config_spec.rb +65 -0
  124. data/spec/models/login_flow_method_spec.rb +47 -0
  125. data/spec/models/login_flow_spec.rb +89 -0
  126. data/spec/models/login_via_api_response_spec.rb +47 -0
  127. data/spec/models/message_spec.rb +59 -0
  128. data/spec/models/recovery_address_spec.rb +53 -0
  129. data/spec/models/recovery_flow_method_config_spec.rb +59 -0
  130. data/spec/models/recovery_flow_method_spec.rb +47 -0
  131. data/spec/models/recovery_flow_spec.rb +89 -0
  132. data/spec/models/recovery_link_spec.rb +47 -0
  133. data/spec/models/recovery_request_method_spec.rb +47 -0
  134. data/spec/models/recovery_request_spec.rb +83 -0
  135. data/spec/models/registration_flow_method_config_spec.rb +65 -0
  136. data/spec/models/registration_flow_method_spec.rb +47 -0
  137. data/spec/models/registration_flow_spec.rb +83 -0
  138. data/spec/models/registration_via_api_response_spec.rb +53 -0
  139. data/spec/models/revoke_session_spec.rb +41 -0
  140. data/spec/models/settings_flow_method_config_spec.rb +59 -0
  141. data/spec/models/settings_flow_method_spec.rb +47 -0
  142. data/spec/models/settings_flow_spec.rb +95 -0
  143. data/spec/models/settings_via_api_response_spec.rb +47 -0
  144. data/spec/models/update_identity_spec.rb +47 -0
  145. data/spec/models/verification_flow_method_config_spec.rb +59 -0
  146. data/spec/models/verification_flow_method_spec.rb +47 -0
  147. data/spec/models/verification_flow_spec.rb +89 -0
  148. metadata +147 -23
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -80,7 +80,7 @@ module OryHydraClient
80
80
  end
81
81
 
82
82
  # Get the request context of browser-based login user flows
83
- # This endpoint returns a login request's context with, for example, error details and other information. 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
83
+ # This endpoint returns a login request's context with, for example, error details and other information. 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. 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).
84
84
  # @param request [String] Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
85
85
  # @param [Hash] opts the optional parameters
86
86
  # @return [LoginRequest]
@@ -90,7 +90,7 @@ module OryHydraClient
90
90
  end
91
91
 
92
92
  # Get the request context of browser-based login user flows
93
- # This endpoint returns a login request's context with, for example, error details and other information. 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
93
+ # This endpoint returns a login request's context with, for example, error details and other information. 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. 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).
94
94
  # @param request [String] Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
95
95
  # @param [Hash] opts the optional parameters
96
96
  # @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers
@@ -142,8 +142,71 @@ module OryHydraClient
142
142
  return data, status_code, headers
143
143
  end
144
144
 
145
+ # Get the request context of browser-based recovery flows
146
+ # When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/password-reset-account-recovery).
147
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recover?request&#x3D;abcde&#x60;).
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [RecoveryRequest]
150
+ def get_self_service_browser_recovery_request(request, opts = {})
151
+ data, _status_code, _headers = get_self_service_browser_recovery_request_with_http_info(request, opts)
152
+ data
153
+ end
154
+
155
+ # Get the request context of browser-based recovery flows
156
+ # When accessing this endpoint through ORY Kratos&#39; Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/password-reset-account-recovery).
157
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recover?request&#x3D;abcde&#x60;).
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [Array<(RecoveryRequest, Integer, Hash)>] RecoveryRequest data, response status code and response headers
160
+ def get_self_service_browser_recovery_request_with_http_info(request, opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug 'Calling API: CommonApi.get_self_service_browser_recovery_request ...'
163
+ end
164
+ # verify the required parameter 'request' is set
165
+ if @api_client.config.client_side_validation && request.nil?
166
+ fail ArgumentError, "Missing the required parameter 'request' when calling CommonApi.get_self_service_browser_recovery_request"
167
+ end
168
+ # resource path
169
+ local_var_path = '/self-service/browser/flows/requests/recovery'
170
+
171
+ # query parameters
172
+ query_params = opts[:query_params] || {}
173
+ query_params[:'request'] = request
174
+
175
+ # header parameters
176
+ header_params = opts[:header_params] || {}
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+
180
+ # form parameters
181
+ form_params = opts[:form_params] || {}
182
+
183
+ # http body (model)
184
+ post_body = opts[:body]
185
+
186
+ # return_type
187
+ return_type = opts[:return_type] || 'RecoveryRequest'
188
+
189
+ # auth_names
190
+ auth_names = opts[:auth_names] || []
191
+
192
+ new_options = opts.merge(
193
+ :header_params => header_params,
194
+ :query_params => query_params,
195
+ :form_params => form_params,
196
+ :body => post_body,
197
+ :auth_names => auth_names,
198
+ :return_type => return_type
199
+ )
200
+
201
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug "API called: CommonApi#get_self_service_browser_recovery_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
204
+ end
205
+ return data, status_code, headers
206
+ end
207
+
145
208
  # Get the request context of browser-based registration user flows
146
- # This endpoint returns a registration request's context with, for example, error details and other information. 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
209
+ # This endpoint returns a registration request's context with, for example, error details and other information. 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. 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).
147
210
  # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
148
211
  # @param [Hash] opts the optional parameters
149
212
  # @return [RegistrationRequest]
@@ -153,7 +216,7 @@ module OryHydraClient
153
216
  end
154
217
 
155
218
  # Get the request context of browser-based registration user flows
156
- # This endpoint returns a registration request&#39;s context with, for example, error details and other information. When accessing this endpoint through ORY Kratos&#39; 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
219
+ # This endpoint returns a registration request&#39;s context with, for example, error details and other information. When accessing this endpoint through ORY Kratos&#39; 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. 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).
157
220
  # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
158
221
  # @param [Hash] opts the optional parameters
159
222
  # @return [Array<(RegistrationRequest, Integer, Hash)>] RegistrationRequest data, response status code and response headers
@@ -207,7 +270,7 @@ module OryHydraClient
207
270
 
208
271
  # Get the request context of browser-based settings flows
209
272
  # When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
210
- # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
273
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/settingss?request&#x3D;abcde&#x60;).
211
274
  # @param [Hash] opts the optional parameters
212
275
  # @return [SettingsRequest]
213
276
  def get_self_service_browser_settings_request(request, opts = {})
@@ -217,7 +280,7 @@ module OryHydraClient
217
280
 
218
281
  # Get the request context of browser-based settings flows
219
282
  # When accessing this endpoint through ORY Kratos&#39; Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
220
- # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
283
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/settingss?request&#x3D;abcde&#x60;).
221
284
  # @param [Hash] opts the optional parameters
222
285
  # @return [Array<(SettingsRequest, Integer, Hash)>] SettingsRequest data, response status code and response headers
223
286
  def get_self_service_browser_settings_request_with_http_info(request, opts = {})
@@ -269,7 +332,7 @@ module OryHydraClient
269
332
  end
270
333
 
271
334
  # Get user-facing self-service errors
272
- # 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).
335
+ # 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. 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).
273
336
  # @param [Hash] opts the optional parameters
274
337
  # @option opts [String] :error
275
338
  # @return [ErrorContainer]
@@ -279,7 +342,7 @@ module OryHydraClient
279
342
  end
280
343
 
281
344
  # Get user-facing self-service errors
282
- # This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos&#39; 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).
345
+ # This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos&#39; 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. 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).
283
346
  # @param [Hash] opts the optional parameters
284
347
  # @option opts [String] :error
285
348
  # @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.5.3-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.5.3-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -19,7 +19,7 @@ module OryHydraClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Complete the browser-based settings flow for the OpenID Connect strategy
22
+ # Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
23
23
  # This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. > 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 User Settings & Profile Management Documentation](../self-service/flows/user-settings).
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [nil]
@@ -28,7 +28,7 @@ module OryHydraClient
28
28
  nil
29
29
  end
30
30
 
31
- # Complete the browser-based settings flow for the OpenID Connect strategy
31
+ # Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
32
32
  # This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. &gt; 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 User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -75,42 +75,53 @@ module OryHydraClient
75
75
  return data, status_code, headers
76
76
  end
77
77
 
78
- # Complete the browser-based settings flow for the password strategy
79
- # This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. > 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 User Settings & Profile Management Documentation](../self-service/flows/user-settings).
78
+ # Complete Login Flow with Username/Email Password Method
79
+ # Use this endpoint to complete a login flow by sending an identity's identifier and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. 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).
80
+ # @param flow [String] The Flow ID
80
81
  # @param [Hash] opts the optional parameters
81
- # @return [nil]
82
- def complete_self_service_browser_settings_password_strategy_flow(opts = {})
83
- complete_self_service_browser_settings_password_strategy_flow_with_http_info(opts)
84
- nil
82
+ # @option opts [CompleteSelfServiceLoginFlowWithPasswordMethod] :body
83
+ # @return [LoginViaApiResponse]
84
+ def complete_self_service_login_flow_with_password_method(flow, opts = {})
85
+ data, _status_code, _headers = complete_self_service_login_flow_with_password_method_with_http_info(flow, opts)
86
+ data
85
87
  end
86
88
 
87
- # Complete the browser-based settings flow for the password strategy
88
- # This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. &gt; 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 User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
89
+ # Complete Login Flow with Username/Email Password Method
90
+ # Use this endpoint to complete a login flow by sending an identity&#39;s identifier and password. This endpoint behaves differently for API and browser flows. API flows expect &#x60;application/json&#x60; to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect &#x60;application/x-www-form-urlencoded&#x60; to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the &#x60;return_to&#x60; value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. 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).
91
+ # @param flow [String] The Flow ID
89
92
  # @param [Hash] opts the optional parameters
90
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
91
- def complete_self_service_browser_settings_password_strategy_flow_with_http_info(opts = {})
93
+ # @option opts [CompleteSelfServiceLoginFlowWithPasswordMethod] :body
94
+ # @return [Array<(LoginViaApiResponse, Integer, Hash)>] LoginViaApiResponse data, response status code and response headers
95
+ def complete_self_service_login_flow_with_password_method_with_http_info(flow, opts = {})
92
96
  if @api_client.config.debugging
93
- @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_settings_password_strategy_flow ...'
97
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_login_flow_with_password_method ...'
98
+ end
99
+ # verify the required parameter 'flow' is set
100
+ if @api_client.config.client_side_validation && flow.nil?
101
+ fail ArgumentError, "Missing the required parameter 'flow' when calling PublicApi.complete_self_service_login_flow_with_password_method"
94
102
  end
95
103
  # resource path
96
- local_var_path = '/self-service/browser/flows/settings/strategies/password'
104
+ local_var_path = '/self-service/login/methods/password'
97
105
 
98
106
  # query parameters
99
107
  query_params = opts[:query_params] || {}
108
+ query_params[:'flow'] = flow
100
109
 
101
110
  # header parameters
102
111
  header_params = opts[:header_params] || {}
103
112
  # HTTP header 'Accept' (if needed)
104
113
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
114
+ # HTTP header 'Content-Type'
115
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
105
116
 
106
117
  # form parameters
107
118
  form_params = opts[:form_params] || {}
108
119
 
109
120
  # http body (model)
110
- post_body = opts[:body]
121
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
111
122
 
112
123
  # return_type
113
- return_type = opts[:return_type]
124
+ return_type = opts[:return_type] || 'LoginViaApiResponse'
114
125
 
115
126
  # auth_names
116
127
  auth_names = opts[:auth_names] || []
@@ -126,46 +137,104 @@ module OryHydraClient
126
137
 
127
138
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
128
139
  if @api_client.config.debugging
129
- @api_client.config.logger.debug "API called: PublicApi#complete_self_service_browser_settings_password_strategy_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_login_flow_with_password_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
141
  end
131
142
  return data, status_code, headers
132
143
  end
133
144
 
134
- # Complete the browser-based settings flow for profile data
135
- # This endpoint completes a browser-based settings 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.settings_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 User Settings & Profile Management Documentation](../self-service/flows/user-settings).
136
- # @param request [String] Request is the request ID.
137
- # @param body [CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload]
145
+ # Complete Recovery Flow with Link Method
146
+ # Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
138
147
  # @param [Hash] opts the optional parameters
148
+ # @option opts [String] :token Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user.
149
+ # @option opts [String] :flow The Flow ID format: uuid
150
+ # @option opts [CompleteSelfServiceRecoveryFlowWithLinkMethod] :body
139
151
  # @return [nil]
140
- def complete_self_service_browser_settings_profile_strategy_flow(request, body, opts = {})
141
- complete_self_service_browser_settings_profile_strategy_flow_with_http_info(request, body, opts)
152
+ def complete_self_service_recovery_flow_with_link_method(opts = {})
153
+ complete_self_service_recovery_flow_with_link_method_with_http_info(opts)
142
154
  nil
143
155
  end
144
156
 
145
- # Complete the browser-based settings flow for profile data
146
- # This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. If the provided profile data is valid against the Identity&#39;s Traits JSON Schema, the data will be updated and the browser redirected to &#x60;url.settings_ui&#x60; for further steps. &gt; 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 User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
147
- # @param request [String] Request is the request ID.
148
- # @param body [CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload]
157
+ # Complete Recovery Flow with Link Method
158
+ # Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: &#x60;choose_method&#x60; expects &#x60;flow&#x60; (in the URL query) and &#x60;email&#x60; (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in &#x60;choose_method&#x60; state. &#x60;passed_challenge&#x60; expects a &#x60;token&#x60; to be sent in the URL query and given the nature of the flow (\&quot;sending a recovery link\&quot;) does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
149
159
  # @param [Hash] opts the optional parameters
160
+ # @option opts [String] :token Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user.
161
+ # @option opts [String] :flow The Flow ID format: uuid
162
+ # @option opts [CompleteSelfServiceRecoveryFlowWithLinkMethod] :body
150
163
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
151
- def complete_self_service_browser_settings_profile_strategy_flow_with_http_info(request, body, opts = {})
164
+ def complete_self_service_recovery_flow_with_link_method_with_http_info(opts = {})
152
165
  if @api_client.config.debugging
153
- @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_settings_profile_strategy_flow ...'
166
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_recovery_flow_with_link_method ...'
154
167
  end
155
- # verify the required parameter 'request' is set
156
- if @api_client.config.client_side_validation && request.nil?
157
- fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.complete_self_service_browser_settings_profile_strategy_flow"
168
+ # resource path
169
+ local_var_path = '/self-service/recovery/methods/link'
170
+
171
+ # query parameters
172
+ query_params = opts[:query_params] || {}
173
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
174
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
+ # HTTP header 'Content-Type'
181
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
182
+
183
+ # form parameters
184
+ form_params = opts[:form_params] || {}
185
+
186
+ # http body (model)
187
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
188
+
189
+ # return_type
190
+ return_type = opts[:return_type]
191
+
192
+ # auth_names
193
+ auth_names = opts[:auth_names] || []
194
+
195
+ new_options = opts.merge(
196
+ :header_params => header_params,
197
+ :query_params => query_params,
198
+ :form_params => form_params,
199
+ :body => post_body,
200
+ :auth_names => auth_names,
201
+ :return_type => return_type
202
+ )
203
+
204
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_recovery_flow_with_link_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
158
207
  end
159
- # verify the required parameter 'body' is set
160
- if @api_client.config.client_side_validation && body.nil?
161
- fail ArgumentError, "Missing the required parameter 'body' when calling PublicApi.complete_self_service_browser_settings_profile_strategy_flow"
208
+ return data, status_code, headers
209
+ end
210
+
211
+ # Complete Registration Flow with Username/Email Password Method
212
+ # Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. 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).
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [String] :flow Flow is flow ID.
215
+ # @option opts [Object] :payload
216
+ # @return [RegistrationViaApiResponse]
217
+ def complete_self_service_registration_flow_with_password_method(opts = {})
218
+ data, _status_code, _headers = complete_self_service_registration_flow_with_password_method_with_http_info(opts)
219
+ data
220
+ end
221
+
222
+ # Complete Registration Flow with Username/Email Password Method
223
+ # Use this endpoint to complete a registration flow by sending an identity&#39;s traits and password. This endpoint behaves differently for API and browser flows. API flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the &#x60;session&#x60; and &#x60;session_token&#x60; will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect &#x60;application/x-www-form-urlencoded&#x60; to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the &#x60;return_to&#x60; value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. 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).
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [String] :flow Flow is flow ID.
226
+ # @option opts [Object] :payload
227
+ # @return [Array<(RegistrationViaApiResponse, Integer, Hash)>] RegistrationViaApiResponse data, response status code and response headers
228
+ def complete_self_service_registration_flow_with_password_method_with_http_info(opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_registration_flow_with_password_method ...'
162
231
  end
163
232
  # resource path
164
- local_var_path = '/self-service/browser/flows/settings/strategies/profile'
233
+ local_var_path = '/self-service/registration/methods/password'
165
234
 
166
235
  # query parameters
167
236
  query_params = opts[:query_params] || {}
168
- query_params[:'request'] = request
237
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
169
238
 
170
239
  # header parameters
171
240
  header_params = opts[:header_params] || {}
@@ -178,10 +247,10 @@ module OryHydraClient
178
247
  form_params = opts[:form_params] || {}
179
248
 
180
249
  # http body (model)
181
- post_body = opts[:body] || @api_client.object_to_http_body(body)
250
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'payload'])
182
251
 
183
252
  # return_type
184
- return_type = opts[:return_type]
253
+ return_type = opts[:return_type] || 'RegistrationViaApiResponse'
185
254
 
186
255
  # auth_names
187
256
  auth_names = opts[:auth_names] || []
@@ -197,57 +266,180 @@ module OryHydraClient
197
266
 
198
267
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
199
268
  if @api_client.config.debugging
200
- @api_client.config.logger.debug "API called: PublicApi#complete_self_service_browser_settings_profile_strategy_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_registration_flow_with_password_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+
274
+ # Complete Settings Flow with Username/Email Password Method
275
+ # Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
276
+ # @param [Hash] opts the optional parameters
277
+ # @option opts [String] :flow Flow is flow ID.
278
+ # @option opts [CompleteSelfServiceSettingsFlowWithPasswordMethod] :body
279
+ # @return [SettingsViaApiResponse]
280
+ def complete_self_service_settings_flow_with_password_method(opts = {})
281
+ data, _status_code, _headers = complete_self_service_settings_flow_with_password_method_with_http_info(opts)
282
+ data
283
+ end
284
+
285
+ # Complete Settings Flow with Username/Email Password Method
286
+ # Use this endpoint to complete a settings flow by sending an identity&#39;s updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached. Implies that the user needs to re-authenticate. Browser flows expect &#x60;application/x-www-form-urlencoded&#x60; to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the &#x60;return_to&#x60; value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached. More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
287
+ # @param [Hash] opts the optional parameters
288
+ # @option opts [String] :flow Flow is flow ID.
289
+ # @option opts [CompleteSelfServiceSettingsFlowWithPasswordMethod] :body
290
+ # @return [Array<(SettingsViaApiResponse, Integer, Hash)>] SettingsViaApiResponse data, response status code and response headers
291
+ def complete_self_service_settings_flow_with_password_method_with_http_info(opts = {})
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_settings_flow_with_password_method ...'
294
+ end
295
+ # resource path
296
+ local_var_path = '/self-service/settings/methods/password'
297
+
298
+ # query parameters
299
+ query_params = opts[:query_params] || {}
300
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
301
+
302
+ # header parameters
303
+ header_params = opts[:header_params] || {}
304
+ # HTTP header 'Accept' (if needed)
305
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
306
+ # HTTP header 'Content-Type'
307
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
308
+
309
+ # form parameters
310
+ form_params = opts[:form_params] || {}
311
+
312
+ # http body (model)
313
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
314
+
315
+ # return_type
316
+ return_type = opts[:return_type] || 'SettingsViaApiResponse'
317
+
318
+ # auth_names
319
+ auth_names = opts[:auth_names] || ['sessionToken']
320
+
321
+ new_options = opts.merge(
322
+ :header_params => header_params,
323
+ :query_params => query_params,
324
+ :form_params => form_params,
325
+ :body => post_body,
326
+ :auth_names => auth_names,
327
+ :return_type => return_type
328
+ )
329
+
330
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
331
+ if @api_client.config.debugging
332
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_settings_flow_with_password_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
333
+ end
334
+ return data, status_code, headers
335
+ end
336
+
337
+ # Complete Settings Flow with Profile Method
338
+ # Use this endpoint to complete a settings flow by sending an identity's updated traits. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached and a sensitive field was updated (e.g. recovery email). Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
339
+ # @param [Hash] opts the optional parameters
340
+ # @option opts [String] :flow Flow is flow ID.
341
+ # @option opts [Object] :payload
342
+ # @return [SettingsFlow]
343
+ def complete_self_service_settings_flow_with_profile_method(opts = {})
344
+ data, _status_code, _headers = complete_self_service_settings_flow_with_profile_method_with_http_info(opts)
345
+ data
346
+ end
347
+
348
+ # Complete Settings Flow with Profile Method
349
+ # Use this endpoint to complete a settings flow by sending an identity&#39;s updated traits. This endpoint behaves differently for API and browser flows. API-initiated flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached and a sensitive field was updated (e.g. recovery email). Implies that the user needs to re-authenticate. Browser flows expect &#x60;application/x-www-form-urlencoded&#x60; to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the &#x60;return_to&#x60; value if it was set and if the flow succeeded; a HTTP 302 redirect to the settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached. More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
350
+ # @param [Hash] opts the optional parameters
351
+ # @option opts [String] :flow Flow is flow ID.
352
+ # @option opts [Object] :payload
353
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
354
+ def complete_self_service_settings_flow_with_profile_method_with_http_info(opts = {})
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_settings_flow_with_profile_method ...'
357
+ end
358
+ # resource path
359
+ local_var_path = '/self-service/settings/methods/profile'
360
+
361
+ # query parameters
362
+ query_params = opts[:query_params] || {}
363
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
364
+
365
+ # header parameters
366
+ header_params = opts[:header_params] || {}
367
+ # HTTP header 'Accept' (if needed)
368
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
369
+ # HTTP header 'Content-Type'
370
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
371
+
372
+ # form parameters
373
+ form_params = opts[:form_params] || {}
374
+
375
+ # http body (model)
376
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'payload'])
377
+
378
+ # return_type
379
+ return_type = opts[:return_type] || 'SettingsFlow'
380
+
381
+ # auth_names
382
+ auth_names = opts[:auth_names] || ['sessionToken']
383
+
384
+ new_options = opts.merge(
385
+ :header_params => header_params,
386
+ :query_params => query_params,
387
+ :form_params => form_params,
388
+ :body => post_body,
389
+ :auth_names => auth_names,
390
+ :return_type => return_type
391
+ )
392
+
393
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
394
+ if @api_client.config.debugging
395
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_settings_flow_with_profile_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
201
396
  end
202
397
  return data, status_code, headers
203
398
  end
204
399
 
205
- # Complete the browser-based verification flows
206
- # This endpoint completes a browser-based verification flow. This is usually achieved by POSTing data to this endpoint. If the provided data is valid against the Identity's Traits JSON Schema, the data will be updated and the browser redirected to `url.settings_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 Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
207
- # @param request [String] Request is the Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verify?request&#x3D;abcde&#x60;).
208
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
400
+ # Complete Verification Flow with Link Method
401
+ # Use this endpoint to complete a verification flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a verification link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
209
402
  # @param [Hash] opts the optional parameters
403
+ # @option opts [String] :token Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user.
404
+ # @option opts [String] :flow The Flow ID format: uuid
405
+ # @option opts [CompleteSelfServiceVerificationFlowWithLinkMethod] :body
210
406
  # @return [nil]
211
- def complete_self_service_browser_verification_flow(request, via, opts = {})
212
- complete_self_service_browser_verification_flow_with_http_info(request, via, opts)
407
+ def complete_self_service_verification_flow_with_link_method(opts = {})
408
+ complete_self_service_verification_flow_with_link_method_with_http_info(opts)
213
409
  nil
214
410
  end
215
411
 
216
- # Complete the browser-based verification flows
217
- # This endpoint completes a browser-based verification flow. This is usually achieved by POSTing data to this endpoint. If the provided data is valid against the Identity&#39;s Traits JSON Schema, the data will be updated and the browser redirected to &#x60;url.settings_ui&#x60; for further steps. &gt; 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 Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
218
- # @param request [String] Request is the Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verify?request&#x3D;abcde&#x60;).
219
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
412
+ # Complete Verification Flow with Link Method
413
+ # Use this endpoint to complete a verification flow using the link method. This endpoint behaves differently for API and browser flows and has several states: &#x60;choose_method&#x60; expects &#x60;flow&#x60; (in the URL query) and &#x60;email&#x60; (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in &#x60;choose_method&#x60; state. &#x60;passed_challenge&#x60; expects a &#x60;token&#x60; to be sent in the URL query and given the nature of the flow (\&quot;sending a verification link\&quot;) does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
220
414
  # @param [Hash] opts the optional parameters
415
+ # @option opts [String] :token Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user.
416
+ # @option opts [String] :flow The Flow ID format: uuid
417
+ # @option opts [CompleteSelfServiceVerificationFlowWithLinkMethod] :body
221
418
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
222
- def complete_self_service_browser_verification_flow_with_http_info(request, via, opts = {})
419
+ def complete_self_service_verification_flow_with_link_method_with_http_info(opts = {})
223
420
  if @api_client.config.debugging
224
- @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_verification_flow ...'
225
- end
226
- # verify the required parameter 'request' is set
227
- if @api_client.config.client_side_validation && request.nil?
228
- fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.complete_self_service_browser_verification_flow"
229
- end
230
- # verify the required parameter 'via' is set
231
- if @api_client.config.client_side_validation && via.nil?
232
- fail ArgumentError, "Missing the required parameter 'via' when calling PublicApi.complete_self_service_browser_verification_flow"
421
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_verification_flow_with_link_method ...'
233
422
  end
234
423
  # resource path
235
- local_var_path = '/self-service/browser/flows/verification/{via}/complete'.sub('{' + 'via' + '}', CGI.escape(via.to_s))
424
+ local_var_path = '/self-service/verification/methods/link'
236
425
 
237
426
  # query parameters
238
427
  query_params = opts[:query_params] || {}
239
- query_params[:'request'] = request
428
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
429
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
240
430
 
241
431
  # header parameters
242
432
  header_params = opts[:header_params] || {}
243
433
  # HTTP header 'Accept' (if needed)
244
434
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
435
+ # HTTP header 'Content-Type'
436
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
245
437
 
246
438
  # form parameters
247
439
  form_params = opts[:form_params] || {}
248
440
 
249
441
  # http body (model)
250
- post_body = opts[:body]
442
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
251
443
 
252
444
  # return_type
253
445
  return_type = opts[:return_type]
@@ -266,12 +458,12 @@ module OryHydraClient
266
458
 
267
459
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
268
460
  if @api_client.config.debugging
269
- @api_client.config.logger.debug "API called: PublicApi#complete_self_service_browser_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
461
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_verification_flow_with_link_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
462
  end
271
463
  return data, status_code, headers
272
464
  end
273
465
 
274
- # Get a traits schema definition
466
+ # Get a Traits Schema Definition
275
467
  # @param id [String] ID must be set to the ID of schema you want to get
276
468
  # @param [Hash] opts the optional parameters
277
469
  # @return [Object]
@@ -280,7 +472,7 @@ module OryHydraClient
280
472
  data
281
473
  end
282
474
 
283
- # Get a traits schema definition
475
+ # Get a Traits Schema Definition
284
476
  # @param id [String] ID must be set to the ID of schema you want to get
285
477
  # @param [Hash] opts the optional parameters
286
478
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
@@ -331,35 +523,35 @@ module OryHydraClient
331
523
  return data, status_code, headers
332
524
  end
333
525
 
334
- # Get the request context of browser-based login user flows
335
- # This endpoint returns a login request's context with, for example, error details and other information. 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
336
- # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
526
+ # Get User-Facing Self-Service Errors
527
+ # This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. 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).
528
+ # @param error [String] Error is the container&#39;s ID
337
529
  # @param [Hash] opts the optional parameters
338
- # @return [LoginRequest]
339
- def get_self_service_browser_login_request(request, opts = {})
340
- data, _status_code, _headers = get_self_service_browser_login_request_with_http_info(request, opts)
530
+ # @return [ErrorContainer]
531
+ def get_self_service_error(error, opts = {})
532
+ data, _status_code, _headers = get_self_service_error_with_http_info(error, opts)
341
533
  data
342
534
  end
343
535
 
344
- # Get the request context of browser-based login user flows
345
- # This endpoint returns a login request&#39;s context with, for example, error details and other information. When accessing this endpoint through ORY Kratos&#39; 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
346
- # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
536
+ # Get User-Facing Self-Service Errors
537
+ # This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: &#x60;?error&#x3D;stub:500&#x60; - returns a stub 500 (Internal Server Error) error. 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).
538
+ # @param error [String] Error is the container&#39;s ID
347
539
  # @param [Hash] opts the optional parameters
348
- # @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers
349
- def get_self_service_browser_login_request_with_http_info(request, opts = {})
540
+ # @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
541
+ def get_self_service_error_with_http_info(error, opts = {})
350
542
  if @api_client.config.debugging
351
- @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_browser_login_request ...'
543
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_error ...'
352
544
  end
353
- # verify the required parameter 'request' is set
354
- if @api_client.config.client_side_validation && request.nil?
355
- fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.get_self_service_browser_login_request"
545
+ # verify the required parameter 'error' is set
546
+ if @api_client.config.client_side_validation && error.nil?
547
+ fail ArgumentError, "Missing the required parameter 'error' when calling PublicApi.get_self_service_error"
356
548
  end
357
549
  # resource path
358
- local_var_path = '/self-service/browser/flows/requests/login'
550
+ local_var_path = '/self-service/errors'
359
551
 
360
552
  # query parameters
361
553
  query_params = opts[:query_params] || {}
362
- query_params[:'request'] = request
554
+ query_params[:'error'] = error
363
555
 
364
556
  # header parameters
365
557
  header_params = opts[:header_params] || {}
@@ -373,7 +565,7 @@ module OryHydraClient
373
565
  post_body = opts[:body]
374
566
 
375
567
  # return_type
376
- return_type = opts[:return_type] || 'LoginRequest'
568
+ return_type = opts[:return_type] || 'ErrorContainer'
377
569
 
378
570
  # auth_names
379
571
  auth_names = opts[:auth_names] || []
@@ -389,40 +581,40 @@ module OryHydraClient
389
581
 
390
582
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
391
583
  if @api_client.config.debugging
392
- @api_client.config.logger.debug "API called: PublicApi#get_self_service_browser_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
584
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
393
585
  end
394
586
  return data, status_code, headers
395
587
  end
396
588
 
397
- # Get the request context of browser-based registration user flows
398
- # This endpoint returns a registration request's context with, for example, error details and other information. 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
399
- # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
589
+ # Get Login Flow
590
+ # This endpoint returns a login flow's context with, for example, error details and other information. 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).
591
+ # @param id [String] The Login Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
400
592
  # @param [Hash] opts the optional parameters
401
- # @return [RegistrationRequest]
402
- def get_self_service_browser_registration_request(request, opts = {})
403
- data, _status_code, _headers = get_self_service_browser_registration_request_with_http_info(request, opts)
593
+ # @return [LoginFlow]
594
+ def get_self_service_login_flow(id, opts = {})
595
+ data, _status_code, _headers = get_self_service_login_flow_with_http_info(id, opts)
404
596
  data
405
597
  end
406
598
 
407
- # Get the request context of browser-based registration user flows
408
- # This endpoint returns a registration request&#39;s context with, for example, error details and other information. When accessing this endpoint through ORY Kratos&#39; 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 Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
409
- # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
599
+ # Get Login Flow
600
+ # This endpoint returns a login flow&#39;s context with, for example, error details and other information. 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).
601
+ # @param id [String] The Login Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).
410
602
  # @param [Hash] opts the optional parameters
411
- # @return [Array<(RegistrationRequest, Integer, Hash)>] RegistrationRequest data, response status code and response headers
412
- def get_self_service_browser_registration_request_with_http_info(request, opts = {})
603
+ # @return [Array<(LoginFlow, Integer, Hash)>] LoginFlow data, response status code and response headers
604
+ def get_self_service_login_flow_with_http_info(id, opts = {})
413
605
  if @api_client.config.debugging
414
- @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_browser_registration_request ...'
606
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_login_flow ...'
415
607
  end
416
- # verify the required parameter 'request' is set
417
- if @api_client.config.client_side_validation && request.nil?
418
- fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.get_self_service_browser_registration_request"
608
+ # verify the required parameter 'id' is set
609
+ if @api_client.config.client_side_validation && id.nil?
610
+ fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.get_self_service_login_flow"
419
611
  end
420
612
  # resource path
421
- local_var_path = '/self-service/browser/flows/requests/registration'
613
+ local_var_path = '/self-service/login/flows'
422
614
 
423
615
  # query parameters
424
616
  query_params = opts[:query_params] || {}
425
- query_params[:'request'] = request
617
+ query_params[:'id'] = id
426
618
 
427
619
  # header parameters
428
620
  header_params = opts[:header_params] || {}
@@ -436,7 +628,7 @@ module OryHydraClient
436
628
  post_body = opts[:body]
437
629
 
438
630
  # return_type
439
- return_type = opts[:return_type] || 'RegistrationRequest'
631
+ return_type = opts[:return_type] || 'LoginFlow'
440
632
 
441
633
  # auth_names
442
634
  auth_names = opts[:auth_names] || []
@@ -452,40 +644,40 @@ module OryHydraClient
452
644
 
453
645
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
454
646
  if @api_client.config.debugging
455
- @api_client.config.logger.debug "API called: PublicApi#get_self_service_browser_registration_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
647
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
456
648
  end
457
649
  return data, status_code, headers
458
650
  end
459
651
 
460
- # Get the request context of browser-based settings flows
461
- # When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
462
- # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
652
+ # Get information about a recovery flow
653
+ # This endpoint returns a recovery flow's context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
654
+ # @param id [String] The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
463
655
  # @param [Hash] opts the optional parameters
464
- # @return [SettingsRequest]
465
- def get_self_service_browser_settings_request(request, opts = {})
466
- data, _status_code, _headers = get_self_service_browser_settings_request_with_http_info(request, opts)
656
+ # @return [RecoveryFlow]
657
+ def get_self_service_recovery_flow(id, opts = {})
658
+ data, _status_code, _headers = get_self_service_recovery_flow_with_http_info(id, opts)
467
659
  data
468
660
  end
469
661
 
470
- # Get the request context of browser-based settings flows
471
- # When accessing this endpoint through ORY Kratos&#39; Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
472
- # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
662
+ # Get information about a recovery flow
663
+ # This endpoint returns a recovery flow&#39;s context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
664
+ # @param id [String] The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
473
665
  # @param [Hash] opts the optional parameters
474
- # @return [Array<(SettingsRequest, Integer, Hash)>] SettingsRequest data, response status code and response headers
475
- def get_self_service_browser_settings_request_with_http_info(request, opts = {})
666
+ # @return [Array<(RecoveryFlow, Integer, Hash)>] RecoveryFlow data, response status code and response headers
667
+ def get_self_service_recovery_flow_with_http_info(id, opts = {})
476
668
  if @api_client.config.debugging
477
- @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_browser_settings_request ...'
669
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_recovery_flow ...'
478
670
  end
479
- # verify the required parameter 'request' is set
480
- if @api_client.config.client_side_validation && request.nil?
481
- fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.get_self_service_browser_settings_request"
671
+ # verify the required parameter 'id' is set
672
+ if @api_client.config.client_side_validation && id.nil?
673
+ fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.get_self_service_recovery_flow"
482
674
  end
483
675
  # resource path
484
- local_var_path = '/self-service/browser/flows/requests/settings'
676
+ local_var_path = '/self-service/recovery/flows'
485
677
 
486
678
  # query parameters
487
679
  query_params = opts[:query_params] || {}
488
- query_params[:'request'] = request
680
+ query_params[:'id'] = id
489
681
 
490
682
  # header parameters
491
683
  header_params = opts[:header_params] || {}
@@ -499,7 +691,7 @@ module OryHydraClient
499
691
  post_body = opts[:body]
500
692
 
501
693
  # return_type
502
- return_type = opts[:return_type] || 'SettingsRequest'
694
+ return_type = opts[:return_type] || 'RecoveryFlow'
503
695
 
504
696
  # auth_names
505
697
  auth_names = opts[:auth_names] || []
@@ -515,36 +707,40 @@ module OryHydraClient
515
707
 
516
708
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
517
709
  if @api_client.config.debugging
518
- @api_client.config.logger.debug "API called: PublicApi#get_self_service_browser_settings_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
710
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
519
711
  end
520
712
  return data, status_code, headers
521
713
  end
522
714
 
523
- # Get user-facing self-service errors
524
- # 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).
715
+ # Get Registration Flow
716
+ # This endpoint returns a registration flow's context with, for example, error details and other information. 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).
717
+ # @param id [String] The Registration Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
525
718
  # @param [Hash] opts the optional parameters
526
- # @option opts [String] :error
527
- # @return [ErrorContainer]
528
- def get_self_service_error(opts = {})
529
- data, _status_code, _headers = get_self_service_error_with_http_info(opts)
719
+ # @return [RegistrationFlow]
720
+ def get_self_service_registration_flow(id, opts = {})
721
+ data, _status_code, _headers = get_self_service_registration_flow_with_http_info(id, opts)
530
722
  data
531
723
  end
532
724
 
533
- # Get user-facing self-service errors
534
- # This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos&#39; 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).
725
+ # Get Registration Flow
726
+ # This endpoint returns a registration flow&#39;s context with, for example, error details and other information. 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).
727
+ # @param id [String] The Registration Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).
535
728
  # @param [Hash] opts the optional parameters
536
- # @option opts [String] :error
537
- # @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
538
- def get_self_service_error_with_http_info(opts = {})
729
+ # @return [Array<(RegistrationFlow, Integer, Hash)>] RegistrationFlow data, response status code and response headers
730
+ def get_self_service_registration_flow_with_http_info(id, opts = {})
539
731
  if @api_client.config.debugging
540
- @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_error ...'
732
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_registration_flow ...'
733
+ end
734
+ # verify the required parameter 'id' is set
735
+ if @api_client.config.client_side_validation && id.nil?
736
+ fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.get_self_service_registration_flow"
541
737
  end
542
738
  # resource path
543
- local_var_path = '/self-service/errors'
739
+ local_var_path = '/self-service/registration/flows'
544
740
 
545
741
  # query parameters
546
742
  query_params = opts[:query_params] || {}
547
- query_params[:'error'] = opts[:'error'] if !opts[:'error'].nil?
743
+ query_params[:'id'] = id
548
744
 
549
745
  # header parameters
550
746
  header_params = opts[:header_params] || {}
@@ -558,7 +754,7 @@ module OryHydraClient
558
754
  post_body = opts[:body]
559
755
 
560
756
  # return_type
561
- return_type = opts[:return_type] || 'ErrorContainer'
757
+ return_type = opts[:return_type] || 'RegistrationFlow'
562
758
 
563
759
  # auth_names
564
760
  auth_names = opts[:auth_names] || []
@@ -574,40 +770,40 @@ module OryHydraClient
574
770
 
575
771
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
576
772
  if @api_client.config.debugging
577
- @api_client.config.logger.debug "API called: PublicApi#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
773
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
578
774
  end
579
775
  return data, status_code, headers
580
776
  end
581
777
 
582
- # Get the request context of browser-based verification flows
583
- # When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
584
- # @param request [String] Request is the Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verify?request&#x3D;abcde&#x60;).
778
+ # Get Settings Flow
779
+ # When accessing this endpoint through ORY Kratos' Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos' Admin API. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
780
+ # @param id [String] ID is the Settings Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
585
781
  # @param [Hash] opts the optional parameters
586
- # @return [VerificationRequest]
587
- def get_self_service_verification_request(request, opts = {})
588
- data, _status_code, _headers = get_self_service_verification_request_with_http_info(request, opts)
782
+ # @return [SettingsFlow]
783
+ def get_self_service_settings_flow(id, opts = {})
784
+ data, _status_code, _headers = get_self_service_settings_flow_with_http_info(id, opts)
589
785
  data
590
786
  end
591
787
 
592
- # Get the request context of browser-based verification flows
593
- # When accessing this endpoint through ORY Kratos&#39; Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
594
- # @param request [String] Request is the Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verify?request&#x3D;abcde&#x60;).
788
+ # Get Settings Flow
789
+ # When accessing this endpoint through ORY Kratos&#39; Public API you must ensure that either the ORY Kratos Session Cookie or the ORY Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using ORY Kratos&#39; Admin API. More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
790
+ # @param id [String] ID is the Settings Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
595
791
  # @param [Hash] opts the optional parameters
596
- # @return [Array<(VerificationRequest, Integer, Hash)>] VerificationRequest data, response status code and response headers
597
- def get_self_service_verification_request_with_http_info(request, opts = {})
792
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
793
+ def get_self_service_settings_flow_with_http_info(id, opts = {})
598
794
  if @api_client.config.debugging
599
- @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_verification_request ...'
795
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_settings_flow ...'
600
796
  end
601
- # verify the required parameter 'request' is set
602
- if @api_client.config.client_side_validation && request.nil?
603
- fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.get_self_service_verification_request"
797
+ # verify the required parameter 'id' is set
798
+ if @api_client.config.client_side_validation && id.nil?
799
+ fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.get_self_service_settings_flow"
604
800
  end
605
801
  # resource path
606
- local_var_path = '/self-service/browser/flows/requests/verification'
802
+ local_var_path = '/self-service/settings/flows'
607
803
 
608
804
  # query parameters
609
805
  query_params = opts[:query_params] || {}
610
- query_params[:'request'] = request
806
+ query_params[:'id'] = id
611
807
 
612
808
  # header parameters
613
809
  header_params = opts[:header_params] || {}
@@ -621,10 +817,10 @@ module OryHydraClient
621
817
  post_body = opts[:body]
622
818
 
623
819
  # return_type
624
- return_type = opts[:return_type] || 'VerificationRequest'
820
+ return_type = opts[:return_type] || 'SettingsFlow'
625
821
 
626
822
  # auth_names
627
- auth_names = opts[:auth_names] || []
823
+ auth_names = opts[:auth_names] || ['sessionToken']
628
824
 
629
825
  new_options = opts.merge(
630
826
  :header_params => header_params,
@@ -637,33 +833,40 @@ module OryHydraClient
637
833
 
638
834
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
639
835
  if @api_client.config.debugging
640
- @api_client.config.logger.debug "API called: PublicApi#get_self_service_verification_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
836
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
641
837
  end
642
838
  return data, status_code, headers
643
839
  end
644
840
 
645
- # Initialize browser-based login user flow
646
- # 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).
841
+ # Get Verification Flow
842
+ # This endpoint returns a verification flow's context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
843
+ # @param id [String] The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
647
844
  # @param [Hash] opts the optional parameters
648
- # @return [nil]
649
- def initialize_self_service_browser_login_flow(opts = {})
650
- initialize_self_service_browser_login_flow_with_http_info(opts)
651
- nil
845
+ # @return [VerificationFlow]
846
+ def get_self_service_verification_flow(id, opts = {})
847
+ data, _status_code, _headers = get_self_service_verification_flow_with_http_info(id, opts)
848
+ data
652
849
  end
653
850
 
654
- # Initialize browser-based login user flow
655
- # This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to &#x60;urls.login_ui&#x60; with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60;. &gt; 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).
851
+ # Get Verification Flow
852
+ # This endpoint returns a verification flow&#39;s context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
853
+ # @param id [String] The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
656
854
  # @param [Hash] opts the optional parameters
657
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
658
- def initialize_self_service_browser_login_flow_with_http_info(opts = {})
855
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
856
+ def get_self_service_verification_flow_with_http_info(id, opts = {})
659
857
  if @api_client.config.debugging
660
- @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_login_flow ...'
858
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_verification_flow ...'
859
+ end
860
+ # verify the required parameter 'id' is set
861
+ if @api_client.config.client_side_validation && id.nil?
862
+ fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.get_self_service_verification_flow"
661
863
  end
662
864
  # resource path
663
- local_var_path = '/self-service/browser/flows/login'
865
+ local_var_path = '/self-service/verification/flows'
664
866
 
665
867
  # query parameters
666
868
  query_params = opts[:query_params] || {}
869
+ query_params[:'id'] = id
667
870
 
668
871
  # header parameters
669
872
  header_params = opts[:header_params] || {}
@@ -677,7 +880,7 @@ module OryHydraClient
677
880
  post_body = opts[:body]
678
881
 
679
882
  # return_type
680
- return_type = opts[:return_type]
883
+ return_type = opts[:return_type] || 'VerificationFlow'
681
884
 
682
885
  # auth_names
683
886
  auth_names = opts[:auth_names] || []
@@ -693,7 +896,7 @@ module OryHydraClient
693
896
 
694
897
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
695
898
  if @api_client.config.debugging
696
- @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
899
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
697
900
  end
698
901
  return data, status_code, headers
699
902
  end
@@ -754,25 +957,84 @@ module OryHydraClient
754
957
  return data, status_code, headers
755
958
  end
756
959
 
757
- # Initialize browser-based registration user flow
758
- # This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `urls.registration_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).
960
+ # Initialize Login Flow for API clients
961
+ # This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: 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).
962
+ # @param [Hash] opts the optional parameters
963
+ # @option opts [Boolean] :refresh Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session.
964
+ # @return [LoginFlow]
965
+ def initialize_self_service_login_via_api_flow(opts = {})
966
+ data, _status_code, _headers = initialize_self_service_login_via_api_flow_with_http_info(opts)
967
+ data
968
+ end
969
+
970
+ # Initialize Login Flow for API clients
971
+ # This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter &#x60;?refresh&#x3D;true&#x60; is set. To fetch an existing login flow call &#x60;/self-service/login/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: 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).
972
+ # @param [Hash] opts the optional parameters
973
+ # @option opts [Boolean] :refresh Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session.
974
+ # @return [Array<(LoginFlow, Integer, Hash)>] LoginFlow data, response status code and response headers
975
+ def initialize_self_service_login_via_api_flow_with_http_info(opts = {})
976
+ if @api_client.config.debugging
977
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_login_via_api_flow ...'
978
+ end
979
+ # resource path
980
+ local_var_path = '/self-service/login/api'
981
+
982
+ # query parameters
983
+ query_params = opts[:query_params] || {}
984
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
985
+
986
+ # header parameters
987
+ header_params = opts[:header_params] || {}
988
+ # HTTP header 'Accept' (if needed)
989
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
990
+
991
+ # form parameters
992
+ form_params = opts[:form_params] || {}
993
+
994
+ # http body (model)
995
+ post_body = opts[:body]
996
+
997
+ # return_type
998
+ return_type = opts[:return_type] || 'LoginFlow'
999
+
1000
+ # auth_names
1001
+ auth_names = opts[:auth_names] || []
1002
+
1003
+ new_options = opts.merge(
1004
+ :header_params => header_params,
1005
+ :query_params => query_params,
1006
+ :form_params => form_params,
1007
+ :body => post_body,
1008
+ :auth_names => auth_names,
1009
+ :return_type => return_type
1010
+ )
1011
+
1012
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1013
+ if @api_client.config.debugging
1014
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_login_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1015
+ end
1016
+ return data, status_code, headers
1017
+ end
1018
+
1019
+ # Initialize Login Flow for browsers
1020
+ # This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. 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).
759
1021
  # @param [Hash] opts the optional parameters
760
1022
  # @return [nil]
761
- def initialize_self_service_browser_registration_flow(opts = {})
762
- initialize_self_service_browser_registration_flow_with_http_info(opts)
1023
+ def initialize_self_service_login_via_browser_flow(opts = {})
1024
+ initialize_self_service_login_via_browser_flow_with_http_info(opts)
763
1025
  nil
764
1026
  end
765
1027
 
766
- # Initialize browser-based registration user flow
767
- # This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to &#x60;urls.registration_ui&#x60; with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60;. &gt; 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).
1028
+ # Initialize Login Flow for browsers
1029
+ # This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.login.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60; unless the query parameter &#x60;?refresh&#x3D;true&#x60; was set. 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).
768
1030
  # @param [Hash] opts the optional parameters
769
1031
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
770
- def initialize_self_service_browser_registration_flow_with_http_info(opts = {})
1032
+ def initialize_self_service_login_via_browser_flow_with_http_info(opts = {})
771
1033
  if @api_client.config.debugging
772
- @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_registration_flow ...'
1034
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_login_via_browser_flow ...'
773
1035
  end
774
1036
  # resource path
775
- local_var_path = '/self-service/browser/flows/registration'
1037
+ local_var_path = '/self-service/login/browser'
776
1038
 
777
1039
  # query parameters
778
1040
  query_params = opts[:query_params] || {}
@@ -805,36 +1067,86 @@ module OryHydraClient
805
1067
 
806
1068
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
807
1069
  if @api_client.config.debugging
808
- @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1070
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_login_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
809
1071
  end
810
1072
  return data, status_code, headers
811
1073
  end
812
1074
 
813
- # Initialize browser-based verification flow
814
- # This endpoint initializes a browser-based verification flow. Once initialized, the browser will be redirected to `urls.settings_ui` with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
815
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
1075
+ # Initialize Recovery Flow for API Clients
1076
+ # This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1077
+ # @param [Hash] opts the optional parameters
1078
+ # @return [RecoveryFlow]
1079
+ def initialize_self_service_recovery_via_api_flow(opts = {})
1080
+ data, _status_code, _headers = initialize_self_service_recovery_via_api_flow_with_http_info(opts)
1081
+ data
1082
+ end
1083
+
1084
+ # Initialize Recovery Flow for API Clients
1085
+ # This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call &#x60;/self-service/recovery/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1086
+ # @param [Hash] opts the optional parameters
1087
+ # @return [Array<(RecoveryFlow, Integer, Hash)>] RecoveryFlow data, response status code and response headers
1088
+ def initialize_self_service_recovery_via_api_flow_with_http_info(opts = {})
1089
+ if @api_client.config.debugging
1090
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_recovery_via_api_flow ...'
1091
+ end
1092
+ # resource path
1093
+ local_var_path = '/self-service/recovery/api'
1094
+
1095
+ # query parameters
1096
+ query_params = opts[:query_params] || {}
1097
+
1098
+ # header parameters
1099
+ header_params = opts[:header_params] || {}
1100
+ # HTTP header 'Accept' (if needed)
1101
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1102
+
1103
+ # form parameters
1104
+ form_params = opts[:form_params] || {}
1105
+
1106
+ # http body (model)
1107
+ post_body = opts[:body]
1108
+
1109
+ # return_type
1110
+ return_type = opts[:return_type] || 'RecoveryFlow'
1111
+
1112
+ # auth_names
1113
+ auth_names = opts[:auth_names] || []
1114
+
1115
+ new_options = opts.merge(
1116
+ :header_params => header_params,
1117
+ :query_params => query_params,
1118
+ :form_params => form_params,
1119
+ :body => post_body,
1120
+ :auth_names => auth_names,
1121
+ :return_type => return_type
1122
+ )
1123
+
1124
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1125
+ if @api_client.config.debugging
1126
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_recovery_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1127
+ end
1128
+ return data, status_code, headers
1129
+ end
1130
+
1131
+ # Initialize Recovery Flow for Browser Clients
1132
+ # This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
816
1133
  # @param [Hash] opts the optional parameters
817
1134
  # @return [nil]
818
- def initialize_self_service_browser_verification_flow(via, opts = {})
819
- initialize_self_service_browser_verification_flow_with_http_info(via, opts)
1135
+ def initialize_self_service_recovery_via_browser_flow(opts = {})
1136
+ initialize_self_service_recovery_via_browser_flow_with_http_info(opts)
820
1137
  nil
821
1138
  end
822
1139
 
823
- # Initialize browser-based verification flow
824
- # This endpoint initializes a browser-based verification flow. Once initialized, the browser will be redirected to &#x60;urls.settings_ui&#x60; with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. &gt; This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
825
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
1140
+ # Initialize Recovery Flow for Browser Clients
1141
+ # This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.recovery.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
826
1142
  # @param [Hash] opts the optional parameters
827
1143
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
828
- def initialize_self_service_browser_verification_flow_with_http_info(via, opts = {})
1144
+ def initialize_self_service_recovery_via_browser_flow_with_http_info(opts = {})
829
1145
  if @api_client.config.debugging
830
- @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_verification_flow ...'
831
- end
832
- # verify the required parameter 'via' is set
833
- if @api_client.config.client_side_validation && via.nil?
834
- fail ArgumentError, "Missing the required parameter 'via' when calling PublicApi.initialize_self_service_browser_verification_flow"
1146
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_recovery_via_browser_flow ...'
835
1147
  end
836
1148
  # resource path
837
- local_var_path = '/self-service/browser/flows/verification/init/{via}'.sub('{' + 'via' + '}', CGI.escape(via.to_s))
1149
+ local_var_path = '/self-service/recovery/browser'
838
1150
 
839
1151
  # query parameters
840
1152
  query_params = opts[:query_params] || {}
@@ -867,30 +1179,86 @@ module OryHydraClient
867
1179
 
868
1180
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
869
1181
  if @api_client.config.debugging
870
- @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1182
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_recovery_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1183
+ end
1184
+ return data, status_code, headers
1185
+ end
1186
+
1187
+ # Initialize Registration Flow for API clients
1188
+ # This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: 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).
1189
+ # @param [Hash] opts the optional parameters
1190
+ # @return [RegistrationFlow]
1191
+ def initialize_self_service_registration_via_api_flow(opts = {})
1192
+ data, _status_code, _headers = initialize_self_service_registration_via_api_flow_with_http_info(opts)
1193
+ data
1194
+ end
1195
+
1196
+ # Initialize Registration Flow for API clients
1197
+ # This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter &#x60;?refresh&#x3D;true&#x60; is set. To fetch an existing registration flow call &#x60;/self-service/registration/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: 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).
1198
+ # @param [Hash] opts the optional parameters
1199
+ # @return [Array<(RegistrationFlow, Integer, Hash)>] RegistrationFlow data, response status code and response headers
1200
+ def initialize_self_service_registration_via_api_flow_with_http_info(opts = {})
1201
+ if @api_client.config.debugging
1202
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_registration_via_api_flow ...'
1203
+ end
1204
+ # resource path
1205
+ local_var_path = '/self-service/registration/api'
1206
+
1207
+ # query parameters
1208
+ query_params = opts[:query_params] || {}
1209
+
1210
+ # header parameters
1211
+ header_params = opts[:header_params] || {}
1212
+ # HTTP header 'Accept' (if needed)
1213
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1214
+
1215
+ # form parameters
1216
+ form_params = opts[:form_params] || {}
1217
+
1218
+ # http body (model)
1219
+ post_body = opts[:body]
1220
+
1221
+ # return_type
1222
+ return_type = opts[:return_type] || 'RegistrationFlow'
1223
+
1224
+ # auth_names
1225
+ auth_names = opts[:auth_names] || []
1226
+
1227
+ new_options = opts.merge(
1228
+ :header_params => header_params,
1229
+ :query_params => query_params,
1230
+ :form_params => form_params,
1231
+ :body => post_body,
1232
+ :auth_names => auth_names,
1233
+ :return_type => return_type
1234
+ )
1235
+
1236
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1237
+ if @api_client.config.debugging
1238
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_registration_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
871
1239
  end
872
1240
  return data, status_code, headers
873
1241
  end
874
1242
 
875
- # Initialize browser-based settings flow
876
- # This endpoint initializes a browser-based settings flow. Once initialized, the browser will be redirected to `urls.settings_ui` with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
1243
+ # Initialize Registration Flow for browsers
1244
+ # This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. :::note 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).
877
1245
  # @param [Hash] opts the optional parameters
878
1246
  # @return [nil]
879
- def initialize_self_service_settings_flow(opts = {})
880
- initialize_self_service_settings_flow_with_http_info(opts)
1247
+ def initialize_self_service_registration_via_browser_flow(opts = {})
1248
+ initialize_self_service_registration_via_browser_flow_with_http_info(opts)
881
1249
  nil
882
1250
  end
883
1251
 
884
- # Initialize browser-based settings flow
885
- # This endpoint initializes a browser-based settings flow. Once initialized, the browser will be redirected to &#x60;urls.settings_ui&#x60; with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. &gt; This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
1252
+ # Initialize Registration Flow for browsers
1253
+ # This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.registration.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60; unless the query parameter &#x60;?refresh&#x3D;true&#x60; was set. :::note 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).
886
1254
  # @param [Hash] opts the optional parameters
887
1255
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
888
- def initialize_self_service_settings_flow_with_http_info(opts = {})
1256
+ def initialize_self_service_registration_via_browser_flow_with_http_info(opts = {})
889
1257
  if @api_client.config.debugging
890
- @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_settings_flow ...'
1258
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_registration_via_browser_flow ...'
891
1259
  end
892
1260
  # resource path
893
- local_var_path = '/self-service/browser/flows/settings'
1261
+ local_var_path = '/self-service/registration/browser'
894
1262
 
895
1263
  # query parameters
896
1264
  query_params = opts[:query_params] || {}
@@ -923,42 +1291,198 @@ module OryHydraClient
923
1291
 
924
1292
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
925
1293
  if @api_client.config.debugging
926
- @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1294
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_registration_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
927
1295
  end
928
1296
  return data, status_code, headers
929
1297
  end
930
1298
 
931
- # Complete the browser-based verification flows
932
- # This endpoint completes a browser-based verification flow. > 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 Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
933
- # @param code [String]
934
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
1299
+ # Initialize Settings Flow for API Clients
1300
+ # This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid ORY Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
1301
+ # @param [Hash] opts the optional parameters
1302
+ # @return [SettingsFlow]
1303
+ def initialize_self_service_settings_via_api_flow(opts = {})
1304
+ data, _status_code, _headers = initialize_self_service_settings_via_api_flow_with_http_info(opts)
1305
+ data
1306
+ end
1307
+
1308
+ # Initialize Settings Flow for API Clients
1309
+ # This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid ORY Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call &#x60;/self-service/settings/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
1310
+ # @param [Hash] opts the optional parameters
1311
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
1312
+ def initialize_self_service_settings_via_api_flow_with_http_info(opts = {})
1313
+ if @api_client.config.debugging
1314
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_settings_via_api_flow ...'
1315
+ end
1316
+ # resource path
1317
+ local_var_path = '/self-service/settings/api'
1318
+
1319
+ # query parameters
1320
+ query_params = opts[:query_params] || {}
1321
+
1322
+ # header parameters
1323
+ header_params = opts[:header_params] || {}
1324
+ # HTTP header 'Accept' (if needed)
1325
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1326
+
1327
+ # form parameters
1328
+ form_params = opts[:form_params] || {}
1329
+
1330
+ # http body (model)
1331
+ post_body = opts[:body]
1332
+
1333
+ # return_type
1334
+ return_type = opts[:return_type] || 'SettingsFlow'
1335
+
1336
+ # auth_names
1337
+ auth_names = opts[:auth_names] || ['sessionToken']
1338
+
1339
+ new_options = opts.merge(
1340
+ :header_params => header_params,
1341
+ :query_params => query_params,
1342
+ :form_params => form_params,
1343
+ :body => post_body,
1344
+ :auth_names => auth_names,
1345
+ :return_type => return_type
1346
+ )
1347
+
1348
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1349
+ if @api_client.config.debugging
1350
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_settings_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1351
+ end
1352
+ return data, status_code, headers
1353
+ end
1354
+
1355
+ # Initialize Settings Flow for Browsers
1356
+ # This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid ORY Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
935
1357
  # @param [Hash] opts the optional parameters
936
1358
  # @return [nil]
937
- def self_service_browser_verify(code, via, opts = {})
938
- self_service_browser_verify_with_http_info(code, via, opts)
1359
+ def initialize_self_service_settings_via_browser_flow(opts = {})
1360
+ initialize_self_service_settings_via_browser_flow_with_http_info(opts)
939
1361
  nil
940
1362
  end
941
1363
 
942
- # Complete the browser-based verification flows
943
- # This endpoint completes a browser-based verification flow. &gt; 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 Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
944
- # @param code [String]
945
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
1364
+ # Initialize Settings Flow for Browsers
1365
+ # This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.settings.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If no valid ORY Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
946
1366
  # @param [Hash] opts the optional parameters
947
1367
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
948
- def self_service_browser_verify_with_http_info(code, via, opts = {})
1368
+ def initialize_self_service_settings_via_browser_flow_with_http_info(opts = {})
949
1369
  if @api_client.config.debugging
950
- @api_client.config.logger.debug 'Calling API: PublicApi.self_service_browser_verify ...'
1370
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_settings_via_browser_flow ...'
951
1371
  end
952
- # verify the required parameter 'code' is set
953
- if @api_client.config.client_side_validation && code.nil?
954
- fail ArgumentError, "Missing the required parameter 'code' when calling PublicApi.self_service_browser_verify"
1372
+ # resource path
1373
+ local_var_path = '/self-service/settings/browser/flows'
1374
+
1375
+ # query parameters
1376
+ query_params = opts[:query_params] || {}
1377
+
1378
+ # header parameters
1379
+ header_params = opts[:header_params] || {}
1380
+ # HTTP header 'Accept' (if needed)
1381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1382
+
1383
+ # form parameters
1384
+ form_params = opts[:form_params] || {}
1385
+
1386
+ # http body (model)
1387
+ post_body = opts[:body]
1388
+
1389
+ # return_type
1390
+ return_type = opts[:return_type]
1391
+
1392
+ # auth_names
1393
+ auth_names = opts[:auth_names] || ['sessionToken']
1394
+
1395
+ new_options = opts.merge(
1396
+ :header_params => header_params,
1397
+ :query_params => query_params,
1398
+ :form_params => form_params,
1399
+ :body => post_body,
1400
+ :auth_names => auth_names,
1401
+ :return_type => return_type
1402
+ )
1403
+
1404
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1405
+ if @api_client.config.debugging
1406
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_settings_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
955
1407
  end
956
- # verify the required parameter 'via' is set
957
- if @api_client.config.client_side_validation && via.nil?
958
- fail ArgumentError, "Missing the required parameter 'via' when calling PublicApi.self_service_browser_verify"
1408
+ return data, status_code, headers
1409
+ end
1410
+
1411
+ # Initialize Verification Flow for API Clients
1412
+ # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1413
+ # @param [Hash] opts the optional parameters
1414
+ # @return [VerificationFlow]
1415
+ def initialize_self_service_verification_via_api_flow(opts = {})
1416
+ data, _status_code, _headers = initialize_self_service_verification_via_api_flow_with_http_info(opts)
1417
+ data
1418
+ end
1419
+
1420
+ # Initialize Verification Flow for API Clients
1421
+ # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call &#x60;/self-service/verification/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1422
+ # @param [Hash] opts the optional parameters
1423
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
1424
+ def initialize_self_service_verification_via_api_flow_with_http_info(opts = {})
1425
+ if @api_client.config.debugging
1426
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_verification_via_api_flow ...'
959
1427
  end
960
1428
  # resource path
961
- local_var_path = '/self-service/browser/flows/verification/{via}/confirm/{code}'.sub('{' + 'code' + '}', CGI.escape(code.to_s)).sub('{' + 'via' + '}', CGI.escape(via.to_s))
1429
+ local_var_path = '/self-service/verification/api'
1430
+
1431
+ # query parameters
1432
+ query_params = opts[:query_params] || {}
1433
+
1434
+ # header parameters
1435
+ header_params = opts[:header_params] || {}
1436
+ # HTTP header 'Accept' (if needed)
1437
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1438
+
1439
+ # form parameters
1440
+ form_params = opts[:form_params] || {}
1441
+
1442
+ # http body (model)
1443
+ post_body = opts[:body]
1444
+
1445
+ # return_type
1446
+ return_type = opts[:return_type] || 'VerificationFlow'
1447
+
1448
+ # auth_names
1449
+ auth_names = opts[:auth_names] || []
1450
+
1451
+ new_options = opts.merge(
1452
+ :header_params => header_params,
1453
+ :query_params => query_params,
1454
+ :form_params => form_params,
1455
+ :body => post_body,
1456
+ :auth_names => auth_names,
1457
+ :return_type => return_type
1458
+ )
1459
+
1460
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1461
+ if @api_client.config.debugging
1462
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_verification_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1463
+ end
1464
+ return data, status_code, headers
1465
+ end
1466
+
1467
+ # Initialize Verification Flow for Browser Clients
1468
+ # This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1469
+ # @param [Hash] opts the optional parameters
1470
+ # @return [nil]
1471
+ def initialize_self_service_verification_via_browser_flow(opts = {})
1472
+ initialize_self_service_verification_via_browser_flow_with_http_info(opts)
1473
+ nil
1474
+ end
1475
+
1476
+ # Initialize Verification Flow for Browser Clients
1477
+ # This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.verification.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1478
+ # @param [Hash] opts the optional parameters
1479
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1480
+ def initialize_self_service_verification_via_browser_flow_with_http_info(opts = {})
1481
+ if @api_client.config.debugging
1482
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_verification_via_browser_flow ...'
1483
+ end
1484
+ # resource path
1485
+ local_var_path = '/self-service/verification/browser'
962
1486
 
963
1487
  # query parameters
964
1488
  query_params = opts[:query_params] || {}
@@ -991,23 +1515,91 @@ module OryHydraClient
991
1515
 
992
1516
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
993
1517
  if @api_client.config.debugging
994
- @api_client.config.logger.debug "API called: PublicApi#self_service_browser_verify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1518
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_verification_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1519
+ end
1520
+ return data, status_code, headers
1521
+ end
1522
+
1523
+ # Revoke and Invalidate a Session
1524
+ # Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Self-Service Logout Flow instead.
1525
+ # @param body [RevokeSession]
1526
+ # @param [Hash] opts the optional parameters
1527
+ # @return [nil]
1528
+ def revoke_session(body, opts = {})
1529
+ revoke_session_with_http_info(body, opts)
1530
+ nil
1531
+ end
1532
+
1533
+ # Revoke and Invalidate a Session
1534
+ # Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Self-Service Logout Flow instead.
1535
+ # @param body [RevokeSession]
1536
+ # @param [Hash] opts the optional parameters
1537
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1538
+ def revoke_session_with_http_info(body, opts = {})
1539
+ if @api_client.config.debugging
1540
+ @api_client.config.logger.debug 'Calling API: PublicApi.revoke_session ...'
1541
+ end
1542
+ # verify the required parameter 'body' is set
1543
+ if @api_client.config.client_side_validation && body.nil?
1544
+ fail ArgumentError, "Missing the required parameter 'body' when calling PublicApi.revoke_session"
1545
+ end
1546
+ # resource path
1547
+ local_var_path = '/sessions'
1548
+
1549
+ # query parameters
1550
+ query_params = opts[:query_params] || {}
1551
+
1552
+ # header parameters
1553
+ header_params = opts[:header_params] || {}
1554
+ # HTTP header 'Accept' (if needed)
1555
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1556
+ # HTTP header 'Content-Type'
1557
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1558
+
1559
+ # form parameters
1560
+ form_params = opts[:form_params] || {}
1561
+
1562
+ # http body (model)
1563
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
1564
+
1565
+ # return_type
1566
+ return_type = opts[:return_type]
1567
+
1568
+ # auth_names
1569
+ auth_names = opts[:auth_names] || []
1570
+
1571
+ new_options = opts.merge(
1572
+ :header_params => header_params,
1573
+ :query_params => query_params,
1574
+ :form_params => form_params,
1575
+ :body => post_body,
1576
+ :auth_names => auth_names,
1577
+ :return_type => return_type
1578
+ )
1579
+
1580
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1581
+ if @api_client.config.debugging
1582
+ @api_client.config.logger.debug "API called: PublicApi#revoke_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
995
1583
  end
996
1584
  return data, status_code, headers
997
1585
  end
998
1586
 
999
- # Check who the current HTTP session belongs to
1000
- # Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object or 401 if the credentials are invalid or no credentials were sent. This endpoint is useful for reverse proxies and API Gateways.
1587
+ # Check Who the Current HTTP Session Belongs To
1588
+ # Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response. This endpoint is useful for reverse proxies and API Gateways.
1001
1589
  # @param [Hash] opts the optional parameters
1590
+ # @option opts [String] :cookie
1591
+ # @option opts [String] :authorization in: authorization
1002
1592
  # @return [Session]
1003
1593
  def whoami(opts = {})
1004
1594
  data, _status_code, _headers = whoami_with_http_info(opts)
1005
1595
  data
1006
1596
  end
1007
1597
 
1008
- # Check who the current HTTP session belongs to
1009
- # Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object or 401 if the credentials are invalid or no credentials were sent. This endpoint is useful for reverse proxies and API Gateways.
1598
+ # Check Who the Current HTTP Session Belongs To
1599
+ # Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the &#39;X-Kratos-Authenticated-Identity-Id&#39; header in the response. This endpoint is useful for reverse proxies and API Gateways.
1010
1600
  # @param [Hash] opts the optional parameters
1601
+ # @option opts [String] :cookie
1602
+ # @option opts [String] :authorization in: authorization
1011
1603
  # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
1012
1604
  def whoami_with_http_info(opts = {})
1013
1605
  if @api_client.config.debugging
@@ -1018,11 +1610,13 @@ module OryHydraClient
1018
1610
 
1019
1611
  # query parameters
1020
1612
  query_params = opts[:query_params] || {}
1613
+ query_params[:'Authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
1021
1614
 
1022
1615
  # header parameters
1023
1616
  header_params = opts[:header_params] || {}
1024
1617
  # HTTP header 'Accept' (if needed)
1025
1618
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1619
+ header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
1026
1620
 
1027
1621
  # form parameters
1028
1622
  form_params = opts[:form_params] || {}
@@ -1034,7 +1628,7 @@ module OryHydraClient
1034
1628
  return_type = opts[:return_type] || 'Session'
1035
1629
 
1036
1630
  # auth_names
1037
- auth_names = opts[:auth_names] || []
1631
+ auth_names = opts[:auth_names] || ['sessionToken']
1038
1632
 
1039
1633
  new_options = opts.merge(
1040
1634
  :header_params => header_params,