ory-kratos-client 0.2.1.alpha1 → 0.5.2.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +84 -52
  4. data/docs/AdminApi.md +244 -86
  5. data/docs/CommonApi.md +54 -6
  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 +4 -4
  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/ProviderCredentialsConfig.md +19 -0
  25. data/docs/PublicApi.md +726 -151
  26. data/docs/RecoveryAddress.md +21 -0
  27. data/docs/RecoveryFlow.md +33 -0
  28. data/docs/RecoveryFlowMethod.md +19 -0
  29. data/docs/RecoveryFlowMethodConfig.md +23 -0
  30. data/docs/RecoveryLink.md +19 -0
  31. data/docs/RecoveryRequest.md +31 -0
  32. data/docs/RecoveryRequestMethod.md +19 -0
  33. data/docs/RegistrationFlow.md +31 -0
  34. data/docs/RegistrationFlowMethod.md +19 -0
  35. data/docs/RegistrationFlowMethodConfig.md +25 -0
  36. data/docs/RegistrationRequest.md +3 -1
  37. data/docs/RegistrationRequestMethodConfig.md +2 -2
  38. data/docs/RegistrationViaApiResponse.md +21 -0
  39. data/docs/RequestMethodConfig.md +2 -2
  40. data/docs/RevokeSession.md +17 -0
  41. data/docs/Session.md +6 -4
  42. data/docs/SettingsFlow.md +35 -0
  43. data/docs/SettingsFlowMethod.md +19 -0
  44. data/docs/SettingsFlowMethodConfig.md +23 -0
  45. data/docs/SettingsRequest.md +4 -2
  46. data/docs/SettingsViaApiResponse.md +19 -0
  47. data/docs/UpdateIdentity.md +19 -0
  48. data/docs/VerifiableAddress.md +3 -3
  49. data/docs/VerificationFlow.md +33 -0
  50. data/docs/VerificationFlowMethod.md +19 -0
  51. data/docs/VerificationFlowMethodConfig.md +23 -0
  52. data/docs/VerificationRequest.md +2 -0
  53. data/lib/ory-kratos-client.rb +31 -16
  54. data/lib/ory-kratos-client/api/admin_api.rb +321 -130
  55. data/lib/ory-kratos-client/api/common_api.rb +75 -12
  56. data/lib/ory-kratos-client/api/health_api.rb +2 -2
  57. data/lib/ory-kratos-client/api/public_api.rb +896 -246
  58. data/lib/ory-kratos-client/api/version_api.rb +2 -2
  59. data/lib/ory-kratos-client/api_client.rb +10 -7
  60. data/lib/ory-kratos-client/api_error.rb +2 -2
  61. data/lib/ory-kratos-client/configuration.rb +9 -2
  62. data/lib/ory-kratos-client/models/complete_self_service_browser_settings_strategy_profile_flow_payload.rb +2 -2
  63. data/lib/ory-kratos-client/models/complete_self_service_login_flow_with_password_method.rb +227 -0
  64. data/lib/ory-kratos-client/models/complete_self_service_recovery_flow_with_link_method.rb +217 -0
  65. data/lib/ory-kratos-client/models/complete_self_service_settings_flow_with_password_method.rb +222 -0
  66. data/lib/ory-kratos-client/models/complete_self_service_verification_flow_with_link_method.rb +217 -0
  67. data/lib/ory-kratos-client/models/create_identity.rb +227 -0
  68. data/lib/ory-kratos-client/models/create_recovery_link.rb +238 -0
  69. data/lib/ory-kratos-client/models/error_container.rb +13 -2
  70. data/lib/ory-kratos-client/models/form.rb +14 -15
  71. data/lib/ory-kratos-client/models/form_field.rb +11 -17
  72. data/lib/ory-kratos-client/models/generic_error.rb +2 -2
  73. data/lib/ory-kratos-client/models/generic_error_payload.rb +4 -6
  74. data/lib/ory-kratos-client/models/health_not_ready_status.rb +2 -2
  75. data/lib/ory-kratos-client/models/health_status.rb +2 -2
  76. data/lib/ory-kratos-client/models/identity.rb +53 -35
  77. data/lib/ory-kratos-client/models/login_flow.rb +315 -0
  78. data/lib/ory-kratos-client/models/login_flow_method.rb +226 -0
  79. data/lib/ory-kratos-client/models/login_flow_method_config.rb +267 -0
  80. data/lib/ory-kratos-client/models/login_request.rb +14 -3
  81. data/lib/ory-kratos-client/models/login_request_method.rb +2 -2
  82. data/lib/ory-kratos-client/models/login_request_method_config.rb +14 -15
  83. data/lib/ory-kratos-client/models/login_via_api_response.rb +227 -0
  84. data/lib/ory-kratos-client/models/message.rb +234 -0
  85. data/lib/ory-kratos-client/models/provider_credentials_config.rb +215 -0
  86. data/lib/ory-kratos-client/models/recovery_address.rb +239 -0
  87. data/lib/ory-kratos-client/models/recovery_flow.rb +319 -0
  88. data/lib/ory-kratos-client/models/recovery_flow_method.rb +226 -0
  89. data/lib/ory-kratos-client/models/recovery_flow_method_config.rb +255 -0
  90. data/lib/ory-kratos-client/models/recovery_link.rb +222 -0
  91. data/lib/ory-kratos-client/models/recovery_request.rb +309 -0
  92. data/lib/ory-kratos-client/models/recovery_request_method.rb +216 -0
  93. data/lib/ory-kratos-client/models/registration_flow.rb +304 -0
  94. data/lib/ory-kratos-client/models/registration_flow_method.rb +226 -0
  95. data/lib/ory-kratos-client/models/registration_flow_method_config.rb +267 -0
  96. data/lib/ory-kratos-client/models/registration_request.rb +14 -8
  97. data/lib/ory-kratos-client/models/registration_request_method.rb +2 -2
  98. data/lib/ory-kratos-client/models/registration_request_method_config.rb +14 -15
  99. data/lib/ory-kratos-client/models/registration_via_api_response.rb +236 -0
  100. data/lib/ory-kratos-client/models/request_method_config.rb +14 -15
  101. data/lib/ory-kratos-client/models/revoke_session.rb +212 -0
  102. data/lib/ory-kratos-client/models/session.rb +29 -20
  103. data/lib/ory-kratos-client/models/settings_flow.rb +333 -0
  104. data/lib/ory-kratos-client/models/settings_flow_method.rb +226 -0
  105. data/lib/ory-kratos-client/models/settings_flow_method_config.rb +255 -0
  106. data/lib/ory-kratos-client/models/settings_request.rb +24 -14
  107. data/lib/ory-kratos-client/models/settings_request_method.rb +2 -2
  108. data/lib/ory-kratos-client/models/settings_via_api_response.rb +226 -0
  109. data/lib/ory-kratos-client/models/update_identity.rb +222 -0
  110. data/lib/ory-kratos-client/models/verifiable_address.rb +17 -17
  111. data/lib/ory-kratos-client/models/verification_flow.rb +299 -0
  112. data/lib/ory-kratos-client/models/verification_flow_method.rb +226 -0
  113. data/lib/ory-kratos-client/models/verification_flow_method_config.rb +255 -0
  114. data/lib/ory-kratos-client/models/verification_request.rb +14 -3
  115. data/lib/ory-kratos-client/models/version.rb +2 -2
  116. data/lib/ory-kratos-client/version.rb +3 -3
  117. data/ory-kratos-client.gemspec +2 -2
  118. data/spec/models/complete_self_service_login_flow_with_password_method_spec.rb +53 -0
  119. data/spec/models/complete_self_service_recovery_flow_with_link_method_spec.rb +47 -0
  120. data/spec/models/complete_self_service_settings_flow_with_password_method_spec.rb +47 -0
  121. data/spec/models/complete_self_service_verification_flow_with_link_method_spec.rb +47 -0
  122. data/spec/models/create_identity_spec.rb +47 -0
  123. data/spec/models/create_recovery_link_spec.rb +47 -0
  124. data/spec/models/login_flow_method_config_spec.rb +65 -0
  125. data/spec/models/login_flow_method_spec.rb +47 -0
  126. data/spec/models/login_flow_spec.rb +89 -0
  127. data/spec/models/login_via_api_response_spec.rb +47 -0
  128. data/spec/models/message_spec.rb +59 -0
  129. data/spec/models/provider_credentials_config_spec.rb +47 -0
  130. data/spec/models/recovery_address_spec.rb +53 -0
  131. data/spec/models/recovery_flow_method_config_spec.rb +59 -0
  132. data/spec/models/recovery_flow_method_spec.rb +47 -0
  133. data/spec/models/recovery_flow_spec.rb +89 -0
  134. data/spec/models/recovery_link_spec.rb +47 -0
  135. data/spec/models/recovery_request_method_spec.rb +47 -0
  136. data/spec/models/recovery_request_spec.rb +83 -0
  137. data/spec/models/registration_flow_method_config_spec.rb +65 -0
  138. data/spec/models/registration_flow_method_spec.rb +47 -0
  139. data/spec/models/registration_flow_spec.rb +83 -0
  140. data/spec/models/registration_via_api_response_spec.rb +53 -0
  141. data/spec/models/revoke_session_spec.rb +41 -0
  142. data/spec/models/settings_flow_method_config_spec.rb +59 -0
  143. data/spec/models/settings_flow_method_spec.rb +47 -0
  144. data/spec/models/settings_flow_spec.rb +95 -0
  145. data/spec/models/settings_via_api_response_spec.rb +47 -0
  146. data/spec/models/update_identity_spec.rb +47 -0
  147. data/spec/models/verification_flow_method_config_spec.rb +59 -0
  148. data/spec/models/verification_flow_method_spec.rb +47 -0
  149. data/spec/models/verification_flow_spec.rb +89 -0
  150. metadata +150 -22
@@ -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
@@ -206,8 +269,8 @@ module OryHydraClient
206
269
  end
207
270
 
208
271
  # Get the request context of browser-based settings flows
209
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
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;).
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).
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 = {})
@@ -216,8 +279,8 @@ module OryHydraClient
216
279
  end
217
280
 
218
281
  # Get the request context of browser-based settings flows
219
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
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;).
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).
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.2-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.2-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,25 +19,25 @@ 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 password strategy
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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
22
+ # Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
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]
26
- def complete_self_service_browser_settings_password_strategy_flow(opts = {})
27
- complete_self_service_browser_settings_password_strategy_flow_with_http_info(opts)
26
+ def complete_self_service_browser_settings_oidc_settings_flow(opts = {})
27
+ complete_self_service_browser_settings_oidc_settings_flow_with_http_info(opts)
28
28
  nil
29
29
  end
30
30
 
31
- # Complete the browser-based settings flow for the password strategy
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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
31
+ # Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
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
35
- def complete_self_service_browser_settings_password_strategy_flow_with_http_info(opts = {})
35
+ def complete_self_service_browser_settings_oidc_settings_flow_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_settings_password_strategy_flow ...'
37
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_settings_oidc_settings_flow ...'
38
38
  end
39
39
  # resource path
40
- local_var_path = '/self-service/browser/flows/settings/strategies/password'
40
+ local_var_path = '/self-service/browser/flows/registration/strategies/oidc/settings/connections'
41
41
 
42
42
  # query parameters
43
43
  query_params = opts[:query_params] || {}
@@ -70,46 +70,171 @@ module OryHydraClient
70
70
 
71
71
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
72
72
  if @api_client.config.debugging
73
- @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}"
73
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_browser_settings_oidc_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
74
  end
75
75
  return data, status_code, headers
76
76
  end
77
77
 
78
- # Complete the browser-based settings flow for profile data
79
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
80
- # @param request [String] Request is the request ID.
81
- # @param body [CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload]
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
82
81
  # @param [Hash] opts the optional parameters
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
87
+ end
88
+
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
92
+ # @param [Hash] opts the optional parameters
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 = {})
96
+ if @api_client.config.debugging
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"
102
+ end
103
+ # resource path
104
+ local_var_path = '/self-service/login/methods/password'
105
+
106
+ # query parameters
107
+ query_params = opts[:query_params] || {}
108
+ query_params[:'flow'] = flow
109
+
110
+ # header parameters
111
+ header_params = opts[:header_params] || {}
112
+ # HTTP header 'Accept' (if needed)
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'])
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
122
+
123
+ # return_type
124
+ return_type = opts[:return_type] || 'LoginViaApiResponse'
125
+
126
+ # auth_names
127
+ auth_names = opts[:auth_names] || []
128
+
129
+ new_options = opts.merge(
130
+ :header_params => header_params,
131
+ :query_params => query_params,
132
+ :form_params => form_params,
133
+ :body => post_body,
134
+ :auth_names => auth_names,
135
+ :return_type => return_type
136
+ )
137
+
138
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
139
+ if @api_client.config.debugging
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}"
141
+ end
142
+ return data, status_code, headers
143
+ end
144
+
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).
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
83
151
  # @return [nil]
84
- def complete_self_service_browser_settings_profile_strategy_flow(request, body, opts = {})
85
- 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)
86
154
  nil
87
155
  end
88
156
 
89
- # Complete the browser-based settings flow for profile data
90
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
91
- # @param request [String] Request is the request ID.
92
- # @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).
93
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
94
163
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
95
- 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 = {})
96
165
  if @api_client.config.debugging
97
- @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 ...'
98
167
  end
99
- # verify the required parameter 'request' is set
100
- if @api_client.config.client_side_validation && request.nil?
101
- 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}"
102
207
  end
103
- # verify the required parameter 'body' is set
104
- if @api_client.config.client_side_validation && body.nil?
105
- 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 ...'
106
231
  end
107
232
  # resource path
108
- local_var_path = '/self-service/browser/flows/settings/strategies/profile'
233
+ local_var_path = '/self-service/registration/methods/password'
109
234
 
110
235
  # query parameters
111
236
  query_params = opts[:query_params] || {}
112
- query_params[:'request'] = request
237
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
113
238
 
114
239
  # header parameters
115
240
  header_params = opts[:header_params] || {}
@@ -122,10 +247,10 @@ module OryHydraClient
122
247
  form_params = opts[:form_params] || {}
123
248
 
124
249
  # http body (model)
125
- post_body = opts[:body] || @api_client.object_to_http_body(body)
250
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'payload'])
126
251
 
127
252
  # return_type
128
- return_type = opts[:return_type]
253
+ return_type = opts[:return_type] || 'RegistrationViaApiResponse'
129
254
 
130
255
  # auth_names
131
256
  auth_names = opts[:auth_names] || []
@@ -141,57 +266,180 @@ module OryHydraClient
141
266
 
142
267
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
143
268
  if @api_client.config.debugging
144
- @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}"
145
396
  end
146
397
  return data, status_code, headers
147
398
  end
148
399
 
149
- # Complete the browser-based verification flows
150
- # 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).
151
- # @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;).
152
- # @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).
153
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
154
406
  # @return [nil]
155
- def complete_self_service_browser_verification_flow(request, via, opts = {})
156
- 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)
157
409
  nil
158
410
  end
159
411
 
160
- # Complete the browser-based verification flows
161
- # 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).
162
- # @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;).
163
- # @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).
164
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
165
418
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
166
- 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 = {})
167
420
  if @api_client.config.debugging
168
- @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_verification_flow ...'
169
- end
170
- # verify the required parameter 'request' is set
171
- if @api_client.config.client_side_validation && request.nil?
172
- fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.complete_self_service_browser_verification_flow"
173
- end
174
- # verify the required parameter 'via' is set
175
- if @api_client.config.client_side_validation && via.nil?
176
- 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 ...'
177
422
  end
178
423
  # resource path
179
- 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'
180
425
 
181
426
  # query parameters
182
427
  query_params = opts[:query_params] || {}
183
- query_params[:'request'] = request
428
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
429
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
184
430
 
185
431
  # header parameters
186
432
  header_params = opts[:header_params] || {}
187
433
  # HTTP header 'Accept' (if needed)
188
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'])
189
437
 
190
438
  # form parameters
191
439
  form_params = opts[:form_params] || {}
192
440
 
193
441
  # http body (model)
194
- post_body = opts[:body]
442
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
195
443
 
196
444
  # return_type
197
445
  return_type = opts[:return_type]
@@ -210,12 +458,12 @@ module OryHydraClient
210
458
 
211
459
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
212
460
  if @api_client.config.debugging
213
- @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}"
214
462
  end
215
463
  return data, status_code, headers
216
464
  end
217
465
 
218
- # Get a traits schema definition
466
+ # Get a Traits Schema Definition
219
467
  # @param id [String] ID must be set to the ID of schema you want to get
220
468
  # @param [Hash] opts the optional parameters
221
469
  # @return [Object]
@@ -224,7 +472,7 @@ module OryHydraClient
224
472
  data
225
473
  end
226
474
 
227
- # Get a traits schema definition
475
+ # Get a Traits Schema Definition
228
476
  # @param id [String] ID must be set to the ID of schema you want to get
229
477
  # @param [Hash] opts the optional parameters
230
478
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
@@ -275,35 +523,35 @@ module OryHydraClient
275
523
  return data, status_code, headers
276
524
  end
277
525
 
278
- # Get the request context of browser-based login user flows
279
- # 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).
280
- # @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
281
529
  # @param [Hash] opts the optional parameters
282
- # @return [LoginRequest]
283
- def get_self_service_browser_login_request(request, opts = {})
284
- 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)
285
533
  data
286
534
  end
287
535
 
288
- # Get the request context of browser-based login user flows
289
- # 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).
290
- # @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
291
539
  # @param [Hash] opts the optional parameters
292
- # @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers
293
- 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 = {})
294
542
  if @api_client.config.debugging
295
- @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 ...'
296
544
  end
297
- # verify the required parameter 'request' is set
298
- if @api_client.config.client_side_validation && request.nil?
299
- 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"
300
548
  end
301
549
  # resource path
302
- local_var_path = '/self-service/browser/flows/requests/login'
550
+ local_var_path = '/self-service/errors'
303
551
 
304
552
  # query parameters
305
553
  query_params = opts[:query_params] || {}
306
- query_params[:'request'] = request
554
+ query_params[:'error'] = error
307
555
 
308
556
  # header parameters
309
557
  header_params = opts[:header_params] || {}
@@ -317,7 +565,7 @@ module OryHydraClient
317
565
  post_body = opts[:body]
318
566
 
319
567
  # return_type
320
- return_type = opts[:return_type] || 'LoginRequest'
568
+ return_type = opts[:return_type] || 'ErrorContainer'
321
569
 
322
570
  # auth_names
323
571
  auth_names = opts[:auth_names] || []
@@ -333,40 +581,40 @@ module OryHydraClient
333
581
 
334
582
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
335
583
  if @api_client.config.debugging
336
- @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}"
337
585
  end
338
586
  return data, status_code, headers
339
587
  end
340
588
 
341
- # Get the request context of browser-based registration user flows
342
- # 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).
343
- # @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;).
344
592
  # @param [Hash] opts the optional parameters
345
- # @return [RegistrationRequest]
346
- def get_self_service_browser_registration_request(request, opts = {})
347
- 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)
348
596
  data
349
597
  end
350
598
 
351
- # Get the request context of browser-based registration user flows
352
- # 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).
353
- # @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;).
354
602
  # @param [Hash] opts the optional parameters
355
- # @return [Array<(RegistrationRequest, Integer, Hash)>] RegistrationRequest data, response status code and response headers
356
- 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 = {})
357
605
  if @api_client.config.debugging
358
- @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 ...'
359
607
  end
360
- # verify the required parameter 'request' is set
361
- if @api_client.config.client_side_validation && request.nil?
362
- 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"
363
611
  end
364
612
  # resource path
365
- local_var_path = '/self-service/browser/flows/requests/registration'
613
+ local_var_path = '/self-service/login/flows'
366
614
 
367
615
  # query parameters
368
616
  query_params = opts[:query_params] || {}
369
- query_params[:'request'] = request
617
+ query_params[:'id'] = id
370
618
 
371
619
  # header parameters
372
620
  header_params = opts[:header_params] || {}
@@ -380,7 +628,7 @@ module OryHydraClient
380
628
  post_body = opts[:body]
381
629
 
382
630
  # return_type
383
- return_type = opts[:return_type] || 'RegistrationRequest'
631
+ return_type = opts[:return_type] || 'LoginFlow'
384
632
 
385
633
  # auth_names
386
634
  auth_names = opts[:auth_names] || []
@@ -396,40 +644,40 @@ module OryHydraClient
396
644
 
397
645
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
398
646
  if @api_client.config.debugging
399
- @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}"
400
648
  end
401
649
  return data, status_code, headers
402
650
  end
403
651
 
404
- # Get the request context of browser-based settings flows
405
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
406
- # @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;).
407
655
  # @param [Hash] opts the optional parameters
408
- # @return [SettingsRequest]
409
- def get_self_service_browser_settings_request(request, opts = {})
410
- 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)
411
659
  data
412
660
  end
413
661
 
414
- # Get the request context of browser-based settings flows
415
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
416
- # @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;).
417
665
  # @param [Hash] opts the optional parameters
418
- # @return [Array<(SettingsRequest, Integer, Hash)>] SettingsRequest data, response status code and response headers
419
- 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 = {})
420
668
  if @api_client.config.debugging
421
- @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 ...'
422
670
  end
423
- # verify the required parameter 'request' is set
424
- if @api_client.config.client_side_validation && request.nil?
425
- 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"
426
674
  end
427
675
  # resource path
428
- local_var_path = '/self-service/browser/flows/requests/settings'
676
+ local_var_path = '/self-service/recovery/flows'
429
677
 
430
678
  # query parameters
431
679
  query_params = opts[:query_params] || {}
432
- query_params[:'request'] = request
680
+ query_params[:'id'] = id
433
681
 
434
682
  # header parameters
435
683
  header_params = opts[:header_params] || {}
@@ -443,7 +691,7 @@ module OryHydraClient
443
691
  post_body = opts[:body]
444
692
 
445
693
  # return_type
446
- return_type = opts[:return_type] || 'SettingsRequest'
694
+ return_type = opts[:return_type] || 'RecoveryFlow'
447
695
 
448
696
  # auth_names
449
697
  auth_names = opts[:auth_names] || []
@@ -459,36 +707,40 @@ module OryHydraClient
459
707
 
460
708
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
461
709
  if @api_client.config.debugging
462
- @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}"
463
711
  end
464
712
  return data, status_code, headers
465
713
  end
466
714
 
467
- # Get user-facing self-service errors
468
- # 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;).
469
718
  # @param [Hash] opts the optional parameters
470
- # @option opts [String] :error
471
- # @return [ErrorContainer]
472
- def get_self_service_error(opts = {})
473
- 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)
474
722
  data
475
723
  end
476
724
 
477
- # Get user-facing self-service errors
478
- # 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;).
479
728
  # @param [Hash] opts the optional parameters
480
- # @option opts [String] :error
481
- # @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
482
- 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 = {})
483
731
  if @api_client.config.debugging
484
- @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"
485
737
  end
486
738
  # resource path
487
- local_var_path = '/self-service/errors'
739
+ local_var_path = '/self-service/registration/flows'
488
740
 
489
741
  # query parameters
490
742
  query_params = opts[:query_params] || {}
491
- query_params[:'error'] = opts[:'error'] if !opts[:'error'].nil?
743
+ query_params[:'id'] = id
492
744
 
493
745
  # header parameters
494
746
  header_params = opts[:header_params] || {}
@@ -502,7 +754,7 @@ module OryHydraClient
502
754
  post_body = opts[:body]
503
755
 
504
756
  # return_type
505
- return_type = opts[:return_type] || 'ErrorContainer'
757
+ return_type = opts[:return_type] || 'RegistrationFlow'
506
758
 
507
759
  # auth_names
508
760
  auth_names = opts[:auth_names] || []
@@ -518,40 +770,40 @@ module OryHydraClient
518
770
 
519
771
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
520
772
  if @api_client.config.debugging
521
- @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}"
522
774
  end
523
775
  return data, status_code, headers
524
776
  end
525
777
 
526
- # Get the request context of browser-based verification flows
527
- # 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).
528
- # @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;).
529
781
  # @param [Hash] opts the optional parameters
530
- # @return [VerificationRequest]
531
- def get_self_service_verification_request(request, opts = {})
532
- 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)
533
785
  data
534
786
  end
535
787
 
536
- # Get the request context of browser-based verification flows
537
- # 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).
538
- # @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;).
539
791
  # @param [Hash] opts the optional parameters
540
- # @return [Array<(VerificationRequest, Integer, Hash)>] VerificationRequest data, response status code and response headers
541
- 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 = {})
542
794
  if @api_client.config.debugging
543
- @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 ...'
544
796
  end
545
- # verify the required parameter 'request' is set
546
- if @api_client.config.client_side_validation && request.nil?
547
- 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"
548
800
  end
549
801
  # resource path
550
- local_var_path = '/self-service/browser/flows/requests/verification'
802
+ local_var_path = '/self-service/settings/flows'
551
803
 
552
804
  # query parameters
553
805
  query_params = opts[:query_params] || {}
554
- query_params[:'request'] = request
806
+ query_params[:'id'] = id
555
807
 
556
808
  # header parameters
557
809
  header_params = opts[:header_params] || {}
@@ -565,10 +817,10 @@ module OryHydraClient
565
817
  post_body = opts[:body]
566
818
 
567
819
  # return_type
568
- return_type = opts[:return_type] || 'VerificationRequest'
820
+ return_type = opts[:return_type] || 'SettingsFlow'
569
821
 
570
822
  # auth_names
571
- auth_names = opts[:auth_names] || []
823
+ auth_names = opts[:auth_names] || ['sessionToken']
572
824
 
573
825
  new_options = opts.merge(
574
826
  :header_params => header_params,
@@ -581,33 +833,40 @@ module OryHydraClient
581
833
 
582
834
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
583
835
  if @api_client.config.debugging
584
- @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}"
585
837
  end
586
838
  return data, status_code, headers
587
839
  end
588
840
 
589
- # Initialize browser-based login user flow
590
- # 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;).
591
844
  # @param [Hash] opts the optional parameters
592
- # @return [nil]
593
- def initialize_self_service_browser_login_flow(opts = {})
594
- initialize_self_service_browser_login_flow_with_http_info(opts)
595
- 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
596
849
  end
597
850
 
598
- # Initialize browser-based login user flow
599
- # 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;).
600
854
  # @param [Hash] opts the optional parameters
601
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
602
- 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 = {})
603
857
  if @api_client.config.debugging
604
- @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"
605
863
  end
606
864
  # resource path
607
- local_var_path = '/self-service/browser/flows/login'
865
+ local_var_path = '/self-service/verification/flows'
608
866
 
609
867
  # query parameters
610
868
  query_params = opts[:query_params] || {}
869
+ query_params[:'id'] = id
611
870
 
612
871
  # header parameters
613
872
  header_params = opts[:header_params] || {}
@@ -621,7 +880,7 @@ module OryHydraClient
621
880
  post_body = opts[:body]
622
881
 
623
882
  # return_type
624
- return_type = opts[:return_type]
883
+ return_type = opts[:return_type] || 'VerificationFlow'
625
884
 
626
885
  # auth_names
627
886
  auth_names = opts[:auth_names] || []
@@ -637,7 +896,7 @@ module OryHydraClient
637
896
 
638
897
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
639
898
  if @api_client.config.debugging
640
- @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}"
641
900
  end
642
901
  return data, status_code, headers
643
902
  end
@@ -698,28 +957,31 @@ module OryHydraClient
698
957
  return data, status_code, headers
699
958
  end
700
959
 
701
- # Initialize browser-based registration user flow
702
- # 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).
703
962
  # @param [Hash] opts the optional parameters
704
- # @return [nil]
705
- def initialize_self_service_browser_registration_flow(opts = {})
706
- initialize_self_service_browser_registration_flow_with_http_info(opts)
707
- nil
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
708
968
  end
709
969
 
710
- # Initialize browser-based registration user flow
711
- # 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).
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).
712
972
  # @param [Hash] opts the optional parameters
713
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
714
- def initialize_self_service_browser_registration_flow_with_http_info(opts = {})
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 = {})
715
976
  if @api_client.config.debugging
716
- @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_registration_flow ...'
977
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_login_via_api_flow ...'
717
978
  end
718
979
  # resource path
719
- local_var_path = '/self-service/browser/flows/registration'
980
+ local_var_path = '/self-service/login/api'
720
981
 
721
982
  # query parameters
722
983
  query_params = opts[:query_params] || {}
984
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
723
985
 
724
986
  # header parameters
725
987
  header_params = opts[:header_params] || {}
@@ -733,7 +995,7 @@ module OryHydraClient
733
995
  post_body = opts[:body]
734
996
 
735
997
  # return_type
736
- return_type = opts[:return_type]
998
+ return_type = opts[:return_type] || 'LoginFlow'
737
999
 
738
1000
  # auth_names
739
1001
  auth_names = opts[:auth_names] || []
@@ -749,36 +1011,30 @@ module OryHydraClient
749
1011
 
750
1012
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
751
1013
  if @api_client.config.debugging
752
- @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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}"
753
1015
  end
754
1016
  return data, status_code, headers
755
1017
  end
756
1018
 
757
- # Initialize browser-based verification flow
758
- # 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).
759
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
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).
760
1021
  # @param [Hash] opts the optional parameters
761
1022
  # @return [nil]
762
- def initialize_self_service_browser_verification_flow(via, opts = {})
763
- initialize_self_service_browser_verification_flow_with_http_info(via, opts)
1023
+ def initialize_self_service_login_via_browser_flow(opts = {})
1024
+ initialize_self_service_login_via_browser_flow_with_http_info(opts)
764
1025
  nil
765
1026
  end
766
1027
 
767
- # Initialize browser-based verification flow
768
- # 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).
769
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
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).
770
1030
  # @param [Hash] opts the optional parameters
771
1031
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
772
- def initialize_self_service_browser_verification_flow_with_http_info(via, opts = {})
1032
+ def initialize_self_service_login_via_browser_flow_with_http_info(opts = {})
773
1033
  if @api_client.config.debugging
774
- @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_verification_flow ...'
775
- end
776
- # verify the required parameter 'via' is set
777
- if @api_client.config.client_side_validation && via.nil?
778
- fail ArgumentError, "Missing the required parameter 'via' when calling PublicApi.initialize_self_service_browser_verification_flow"
1034
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_login_via_browser_flow ...'
779
1035
  end
780
1036
  # resource path
781
- local_var_path = '/self-service/browser/flows/verification/init/{via}'.sub('{' + 'via' + '}', CGI.escape(via.to_s))
1037
+ local_var_path = '/self-service/login/browser'
782
1038
 
783
1039
  # query parameters
784
1040
  query_params = opts[:query_params] || {}
@@ -811,30 +1067,30 @@ module OryHydraClient
811
1067
 
812
1068
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
813
1069
  if @api_client.config.debugging
814
- @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_verification_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}"
815
1071
  end
816
1072
  return data, status_code, headers
817
1073
  end
818
1074
 
819
- # Initialize browser-based settings flow
820
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
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).
821
1077
  # @param [Hash] opts the optional parameters
822
- # @return [nil]
823
- def initialize_self_service_settings_flow(opts = {})
824
- initialize_self_service_settings_flow_with_http_info(opts)
825
- nil
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
826
1082
  end
827
1083
 
828
- # Initialize browser-based settings flow
829
- # 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](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
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).
830
1086
  # @param [Hash] opts the optional parameters
831
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
832
- def initialize_self_service_settings_flow_with_http_info(opts = {})
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 = {})
833
1089
  if @api_client.config.debugging
834
- @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_settings_flow ...'
1090
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_recovery_via_api_flow ...'
835
1091
  end
836
1092
  # resource path
837
- local_var_path = '/self-service/browser/flows/settings'
1093
+ local_var_path = '/self-service/recovery/api'
838
1094
 
839
1095
  # query parameters
840
1096
  query_params = opts[:query_params] || {}
@@ -851,7 +1107,7 @@ module OryHydraClient
851
1107
  post_body = opts[:body]
852
1108
 
853
1109
  # return_type
854
- return_type = opts[:return_type]
1110
+ return_type = opts[:return_type] || 'RecoveryFlow'
855
1111
 
856
1112
  # auth_names
857
1113
  auth_names = opts[:auth_names] || []
@@ -867,42 +1123,30 @@ module OryHydraClient
867
1123
 
868
1124
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
869
1125
  if @api_client.config.debugging
870
- @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
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}"
871
1127
  end
872
1128
  return data, status_code, headers
873
1129
  end
874
1130
 
875
- # Complete the browser-based verification flows
876
- # 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).
877
- # @param code [String]
878
- # @param via [String] What to verify Currently only \&quot;email\&quot; is supported.
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).
879
1133
  # @param [Hash] opts the optional parameters
880
1134
  # @return [nil]
881
- def self_service_browser_verify(code, via, opts = {})
882
- self_service_browser_verify_with_http_info(code, via, opts)
1135
+ def initialize_self_service_recovery_via_browser_flow(opts = {})
1136
+ initialize_self_service_recovery_via_browser_flow_with_http_info(opts)
883
1137
  nil
884
1138
  end
885
1139
 
886
- # Complete the browser-based verification flows
887
- # 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).
888
- # @param code [String]
889
- # @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).
890
1142
  # @param [Hash] opts the optional parameters
891
1143
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
892
- def self_service_browser_verify_with_http_info(code, via, opts = {})
1144
+ def initialize_self_service_recovery_via_browser_flow_with_http_info(opts = {})
893
1145
  if @api_client.config.debugging
894
- @api_client.config.logger.debug 'Calling API: PublicApi.self_service_browser_verify ...'
895
- end
896
- # verify the required parameter 'code' is set
897
- if @api_client.config.client_side_validation && code.nil?
898
- fail ArgumentError, "Missing the required parameter 'code' when calling PublicApi.self_service_browser_verify"
899
- end
900
- # verify the required parameter 'via' is set
901
- if @api_client.config.client_side_validation && via.nil?
902
- fail ArgumentError, "Missing the required parameter 'via' when calling PublicApi.self_service_browser_verify"
1146
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_recovery_via_browser_flow ...'
903
1147
  end
904
1148
  # resource path
905
- 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))
1149
+ local_var_path = '/self-service/recovery/browser'
906
1150
 
907
1151
  # query parameters
908
1152
  query_params = opts[:query_params] || {}
@@ -935,30 +1179,30 @@ module OryHydraClient
935
1179
 
936
1180
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
937
1181
  if @api_client.config.debugging
938
- @api_client.config.logger.debug "API called: PublicApi#self_service_browser_verify\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}"
939
1183
  end
940
1184
  return data, status_code, headers
941
1185
  end
942
1186
 
943
- # Check who the current HTTP session belongs to
944
- # 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.
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).
945
1189
  # @param [Hash] opts the optional parameters
946
- # @return [Session]
947
- def whoami(opts = {})
948
- data, _status_code, _headers = whoami_with_http_info(opts)
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)
949
1193
  data
950
1194
  end
951
1195
 
952
- # Check who the current HTTP session belongs to
953
- # 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.
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).
954
1198
  # @param [Hash] opts the optional parameters
955
- # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
956
- def whoami_with_http_info(opts = {})
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 = {})
957
1201
  if @api_client.config.debugging
958
- @api_client.config.logger.debug 'Calling API: PublicApi.whoami ...'
1202
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_registration_via_api_flow ...'
959
1203
  end
960
1204
  # resource path
961
- local_var_path = '/sessions/whoami'
1205
+ local_var_path = '/self-service/registration/api'
962
1206
 
963
1207
  # query parameters
964
1208
  query_params = opts[:query_params] || {}
@@ -975,7 +1219,7 @@ module OryHydraClient
975
1219
  post_body = opts[:body]
976
1220
 
977
1221
  # return_type
978
- return_type = opts[:return_type] || 'Session'
1222
+ return_type = opts[:return_type] || 'RegistrationFlow'
979
1223
 
980
1224
  # auth_names
981
1225
  auth_names = opts[:auth_names] || []
@@ -989,6 +1233,412 @@ module OryHydraClient
989
1233
  :return_type => return_type
990
1234
  )
991
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}"
1239
+ end
1240
+ return data, status_code, headers
1241
+ end
1242
+
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).
1245
+ # @param [Hash] opts the optional parameters
1246
+ # @return [nil]
1247
+ def initialize_self_service_registration_via_browser_flow(opts = {})
1248
+ initialize_self_service_registration_via_browser_flow_with_http_info(opts)
1249
+ nil
1250
+ end
1251
+
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).
1254
+ # @param [Hash] opts the optional parameters
1255
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1256
+ def initialize_self_service_registration_via_browser_flow_with_http_info(opts = {})
1257
+ if @api_client.config.debugging
1258
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_registration_via_browser_flow ...'
1259
+ end
1260
+ # resource path
1261
+ local_var_path = '/self-service/registration/browser'
1262
+
1263
+ # query parameters
1264
+ query_params = opts[:query_params] || {}
1265
+
1266
+ # header parameters
1267
+ header_params = opts[:header_params] || {}
1268
+ # HTTP header 'Accept' (if needed)
1269
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1270
+
1271
+ # form parameters
1272
+ form_params = opts[:form_params] || {}
1273
+
1274
+ # http body (model)
1275
+ post_body = opts[:body]
1276
+
1277
+ # return_type
1278
+ return_type = opts[:return_type]
1279
+
1280
+ # auth_names
1281
+ auth_names = opts[:auth_names] || []
1282
+
1283
+ new_options = opts.merge(
1284
+ :header_params => header_params,
1285
+ :query_params => query_params,
1286
+ :form_params => form_params,
1287
+ :body => post_body,
1288
+ :auth_names => auth_names,
1289
+ :return_type => return_type
1290
+ )
1291
+
1292
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1293
+ if @api_client.config.debugging
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}"
1295
+ end
1296
+ return data, status_code, headers
1297
+ end
1298
+
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).
1357
+ # @param [Hash] opts the optional parameters
1358
+ # @return [nil]
1359
+ def initialize_self_service_settings_via_browser_flow(opts = {})
1360
+ initialize_self_service_settings_via_browser_flow_with_http_info(opts)
1361
+ nil
1362
+ end
1363
+
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).
1366
+ # @param [Hash] opts the optional parameters
1367
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1368
+ def initialize_self_service_settings_via_browser_flow_with_http_info(opts = {})
1369
+ if @api_client.config.debugging
1370
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_settings_via_browser_flow ...'
1371
+ end
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}"
1407
+ end
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 ...'
1427
+ end
1428
+ # resource path
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'
1486
+
1487
+ # query parameters
1488
+ query_params = opts[:query_params] || {}
1489
+
1490
+ # header parameters
1491
+ header_params = opts[:header_params] || {}
1492
+ # HTTP header 'Accept' (if needed)
1493
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1494
+
1495
+ # form parameters
1496
+ form_params = opts[:form_params] || {}
1497
+
1498
+ # http body (model)
1499
+ post_body = opts[:body]
1500
+
1501
+ # return_type
1502
+ return_type = opts[:return_type]
1503
+
1504
+ # auth_names
1505
+ auth_names = opts[:auth_names] || []
1506
+
1507
+ new_options = opts.merge(
1508
+ :header_params => header_params,
1509
+ :query_params => query_params,
1510
+ :form_params => form_params,
1511
+ :body => post_body,
1512
+ :auth_names => auth_names,
1513
+ :return_type => return_type
1514
+ )
1515
+
1516
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1517
+ if @api_client.config.debugging
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}"
1583
+ end
1584
+ return data, status_code, headers
1585
+ end
1586
+
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.
1589
+ # @param [Hash] opts the optional parameters
1590
+ # @option opts [String] :cookie
1591
+ # @option opts [String] :authorization in: authorization
1592
+ # @return [Session]
1593
+ def whoami(opts = {})
1594
+ data, _status_code, _headers = whoami_with_http_info(opts)
1595
+ data
1596
+ end
1597
+
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.
1600
+ # @param [Hash] opts the optional parameters
1601
+ # @option opts [String] :cookie
1602
+ # @option opts [String] :authorization in: authorization
1603
+ # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
1604
+ def whoami_with_http_info(opts = {})
1605
+ if @api_client.config.debugging
1606
+ @api_client.config.logger.debug 'Calling API: PublicApi.whoami ...'
1607
+ end
1608
+ # resource path
1609
+ local_var_path = '/sessions/whoami'
1610
+
1611
+ # query parameters
1612
+ query_params = opts[:query_params] || {}
1613
+ query_params[:'Authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
1614
+
1615
+ # header parameters
1616
+ header_params = opts[:header_params] || {}
1617
+ # HTTP header 'Accept' (if needed)
1618
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1619
+ header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
1620
+
1621
+ # form parameters
1622
+ form_params = opts[:form_params] || {}
1623
+
1624
+ # http body (model)
1625
+ post_body = opts[:body]
1626
+
1627
+ # return_type
1628
+ return_type = opts[:return_type] || 'Session'
1629
+
1630
+ # auth_names
1631
+ auth_names = opts[:auth_names] || ['sessionToken']
1632
+
1633
+ new_options = opts.merge(
1634
+ :header_params => header_params,
1635
+ :query_params => query_params,
1636
+ :form_params => form_params,
1637
+ :body => post_body,
1638
+ :auth_names => auth_names,
1639
+ :return_type => return_type
1640
+ )
1641
+
992
1642
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
993
1643
  if @api_client.config.debugging
994
1644
  @api_client.config.logger.debug "API called: PublicApi#whoami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"