ory-client 0.0.1.alpha17 → 0.0.1.alpha18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +138 -129
  3. data/docs/AdminCreateIdentityBody.md +2 -2
  4. data/docs/AdminCreateSelfServiceRecoveryLinkBody.md +2 -2
  5. data/docs/AdminUpdateIdentityBody.md +2 -2
  6. data/docs/AuthenticateOKBody.md +2 -2
  7. data/docs/AuthenticatorAssuranceLevel.md +15 -0
  8. data/docs/ContainerChangeResponseItem.md +2 -2
  9. data/docs/ContainerCreateCreatedBody.md +2 -2
  10. data/docs/ContainerTopOKBody.md +2 -2
  11. data/docs/ContainerUpdateOKBody.md +2 -2
  12. data/docs/ContainerWaitOKBody.md +2 -2
  13. data/docs/ContainerWaitOKBodyError.md +2 -2
  14. data/docs/ErrorResponse.md +2 -2
  15. data/docs/GenericError.md +2 -2
  16. data/docs/GraphDriverData.md +2 -2
  17. data/docs/HealthNotReadyStatus.md +2 -2
  18. data/docs/HealthStatus.md +2 -2
  19. data/docs/IdResponse.md +2 -2
  20. data/docs/Identity.md +2 -2
  21. data/docs/IdentityCredentials.md +3 -3
  22. data/docs/IdentityCredentialsType.md +15 -0
  23. data/docs/IdentityState.md +2 -2
  24. data/docs/ImageDeleteResponseItem.md +2 -2
  25. data/docs/ImageSummary.md +2 -2
  26. data/docs/InlineResponse200.md +2 -2
  27. data/docs/InlineResponse2001.md +2 -2
  28. data/docs/InlineResponse503.md +2 -2
  29. data/docs/JsonError.md +2 -2
  30. data/docs/Meta.md +2 -2
  31. data/docs/MetadataApi.md +13 -13
  32. data/docs/Plugin.md +2 -2
  33. data/docs/PluginConfig.md +2 -2
  34. data/docs/PluginConfigArgs.md +2 -2
  35. data/docs/PluginConfigInterface.md +2 -2
  36. data/docs/PluginConfigLinux.md +2 -2
  37. data/docs/PluginConfigNetwork.md +2 -2
  38. data/docs/PluginConfigRootfs.md +2 -2
  39. data/docs/PluginConfigUser.md +2 -2
  40. data/docs/PluginDevice.md +2 -2
  41. data/docs/PluginEnv.md +2 -2
  42. data/docs/PluginInterfaceType.md +2 -2
  43. data/docs/PluginMount.md +2 -2
  44. data/docs/PluginSettings.md +2 -2
  45. data/docs/Port.md +2 -2
  46. data/docs/RecoveryAddress.md +2 -2
  47. data/docs/SelfServiceError.md +2 -2
  48. data/docs/SelfServiceLoginFlow.md +6 -4
  49. data/docs/SelfServiceLogoutUrl.md +2 -2
  50. data/docs/SelfServiceRecoveryFlow.md +2 -2
  51. data/docs/SelfServiceRecoveryFlowState.md +2 -2
  52. data/docs/SelfServiceRecoveryLink.md +2 -2
  53. data/docs/SelfServiceRegistrationFlow.md +3 -3
  54. data/docs/SelfServiceSettingsFlow.md +2 -2
  55. data/docs/SelfServiceSettingsFlowState.md +2 -2
  56. data/docs/SelfServiceVerificationFlow.md +2 -2
  57. data/docs/SelfServiceVerificationFlowState.md +2 -2
  58. data/docs/ServiceUpdateResponse.md +2 -2
  59. data/docs/Session.md +9 -5
  60. data/docs/SessionAuthenticationMethod.md +20 -0
  61. data/docs/SessionDevice.md +18 -0
  62. data/docs/SettingsProfileFormConfig.md +2 -2
  63. data/docs/SubmitSelfServiceLoginFlowBody.md +14 -9
  64. data/docs/SubmitSelfServiceLoginFlowWithLookupSecretMethodBody.md +22 -0
  65. data/docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md +2 -2
  66. data/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md +2 -2
  67. data/docs/SubmitSelfServiceLoginFlowWithTotpMethodBody.md +22 -0
  68. data/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md +22 -0
  69. data/docs/SubmitSelfServiceLogoutFlowWithoutBrowserBody.md +2 -2
  70. data/docs/SubmitSelfServiceRecoveryFlowBody.md +6 -6
  71. data/docs/SubmitSelfServiceRecoveryFlowWithLinkMethodBody.md +2 -2
  72. data/docs/SubmitSelfServiceRegistrationFlowBody.md +6 -6
  73. data/docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md +2 -2
  74. data/docs/SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.md +2 -2
  75. data/docs/SubmitSelfServiceSettingsFlowBody.md +14 -9
  76. data/docs/SubmitSelfServiceSettingsFlowWithLookupMethodBody.md +26 -0
  77. data/docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md +2 -2
  78. data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethodBody.md +2 -2
  79. data/docs/SubmitSelfServiceSettingsFlowWithProfileMethodBody.md +2 -2
  80. data/docs/SubmitSelfServiceSettingsFlowWithTotpMethodBody.md +24 -0
  81. data/docs/SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody.md +26 -0
  82. data/docs/SubmitSelfServiceVerificationFlowBody.md +6 -6
  83. data/docs/SubmitSelfServiceVerificationFlowWithLinkMethodBody.md +2 -2
  84. data/docs/SuccessfulSelfServiceLoginWithoutBrowser.md +2 -2
  85. data/docs/SuccessfulSelfServiceRegistrationWithoutBrowser.md +2 -2
  86. data/docs/UiContainer.md +2 -2
  87. data/docs/UiNode.md +2 -2
  88. data/docs/UiNodeAnchorAttributes.md +4 -2
  89. data/docs/UiNodeAttributes.md +4 -4
  90. data/docs/UiNodeImageAttributes.md +9 -3
  91. data/docs/UiNodeInputAttributes.md +4 -2
  92. data/docs/UiNodeTextAttributes.md +4 -2
  93. data/docs/UiText.md +2 -2
  94. data/docs/V0alpha2Api.md +2194 -0
  95. data/docs/VerifiableIdentityAddress.md +2 -2
  96. data/docs/Version.md +2 -2
  97. data/docs/Volume.md +2 -2
  98. data/docs/VolumeUsageData.md +2 -2
  99. data/lib/ory-client/api/metadata_api.rb +3 -3
  100. data/lib/ory-client/api/v0alpha2_api.rb +2069 -0
  101. data/lib/ory-client/api_client.rb +4 -4
  102. data/lib/ory-client/api_error.rb +3 -3
  103. data/lib/ory-client/configuration.rb +3 -3
  104. data/lib/ory-client/models/admin_create_identity_body.rb +6 -6
  105. data/lib/ory-client/models/admin_create_self_service_recovery_link_body.rb +6 -6
  106. data/lib/ory-client/models/admin_update_identity_body.rb +6 -6
  107. data/lib/ory-client/models/authenticate_ok_body.rb +6 -6
  108. data/lib/ory-client/models/authenticator_assurance_level.rb +39 -0
  109. data/lib/ory-client/models/container_change_response_item.rb +6 -6
  110. data/lib/ory-client/models/container_create_created_body.rb +6 -6
  111. data/lib/ory-client/models/container_top_ok_body.rb +6 -6
  112. data/lib/ory-client/models/container_update_ok_body.rb +6 -6
  113. data/lib/ory-client/models/container_wait_ok_body.rb +6 -6
  114. data/lib/ory-client/models/container_wait_ok_body_error.rb +6 -6
  115. data/lib/ory-client/models/error_response.rb +6 -6
  116. data/lib/ory-client/models/generic_error.rb +6 -6
  117. data/lib/ory-client/models/graph_driver_data.rb +6 -6
  118. data/lib/ory-client/models/health_not_ready_status.rb +6 -6
  119. data/lib/ory-client/models/health_status.rb +6 -6
  120. data/lib/ory-client/models/id_response.rb +6 -6
  121. data/lib/ory-client/models/identity.rb +6 -6
  122. data/lib/ory-client/models/identity_credentials.rb +7 -8
  123. data/lib/ory-client/models/identity_credentials_type.rb +38 -0
  124. data/lib/ory-client/models/identity_state.rb +3 -3
  125. data/lib/ory-client/models/image_delete_response_item.rb +6 -6
  126. data/lib/ory-client/models/image_summary.rb +6 -6
  127. data/lib/ory-client/models/inline_response200.rb +6 -6
  128. data/lib/ory-client/models/inline_response2001.rb +6 -6
  129. data/lib/ory-client/models/inline_response503.rb +6 -6
  130. data/lib/ory-client/models/json_error.rb +6 -6
  131. data/lib/ory-client/models/meta.rb +6 -6
  132. data/lib/ory-client/models/plugin.rb +6 -6
  133. data/lib/ory-client/models/plugin_config.rb +6 -6
  134. data/lib/ory-client/models/plugin_config_args.rb +6 -6
  135. data/lib/ory-client/models/plugin_config_interface.rb +6 -6
  136. data/lib/ory-client/models/plugin_config_linux.rb +6 -6
  137. data/lib/ory-client/models/plugin_config_network.rb +6 -6
  138. data/lib/ory-client/models/plugin_config_rootfs.rb +6 -6
  139. data/lib/ory-client/models/plugin_config_user.rb +6 -6
  140. data/lib/ory-client/models/plugin_device.rb +6 -6
  141. data/lib/ory-client/models/plugin_env.rb +6 -6
  142. data/lib/ory-client/models/plugin_interface_type.rb +6 -6
  143. data/lib/ory-client/models/plugin_mount.rb +6 -6
  144. data/lib/ory-client/models/plugin_settings.rb +6 -6
  145. data/lib/ory-client/models/port.rb +6 -6
  146. data/lib/ory-client/models/recovery_address.rb +6 -6
  147. data/lib/ory-client/models/self_service_error.rb +6 -6
  148. data/lib/ory-client/models/self_service_login_flow.rb +18 -10
  149. data/lib/ory-client/models/self_service_logout_url.rb +6 -6
  150. data/lib/ory-client/models/self_service_recovery_flow.rb +6 -6
  151. data/lib/ory-client/models/self_service_recovery_flow_state.rb +3 -3
  152. data/lib/ory-client/models/self_service_recovery_link.rb +6 -6
  153. data/lib/ory-client/models/self_service_registration_flow.rb +7 -8
  154. data/lib/ory-client/models/self_service_settings_flow.rb +6 -6
  155. data/lib/ory-client/models/self_service_settings_flow_state.rb +3 -3
  156. data/lib/ory-client/models/self_service_verification_flow.rb +6 -6
  157. data/lib/ory-client/models/self_service_verification_flow_state.rb +3 -3
  158. data/lib/ory-client/models/service_update_response.rb +6 -6
  159. data/lib/ory-client/models/session.rb +31 -10
  160. data/lib/ory-client/models/session_authentication_method.rb +263 -0
  161. data/lib/ory-client/models/session_device.rb +219 -0
  162. data/lib/ory-client/models/settings_profile_form_config.rb +6 -6
  163. data/lib/ory-client/models/submit_self_service_login_flow_body.rb +9 -6
  164. data/lib/ory-client/models/submit_self_service_login_flow_with_lookup_secret_method_body.rb +249 -0
  165. data/lib/ory-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +6 -6
  166. data/lib/ory-client/models/submit_self_service_login_flow_with_password_method_body.rb +8 -8
  167. data/lib/ory-client/models/submit_self_service_login_flow_with_totp_method_body.rb +249 -0
  168. data/lib/ory-client/models/submit_self_service_login_flow_with_web_authn_method_body.rb +244 -0
  169. data/lib/ory-client/models/submit_self_service_logout_flow_without_browser_body.rb +6 -6
  170. data/lib/ory-client/models/submit_self_service_recovery_flow_body.rb +4 -4
  171. data/lib/ory-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +6 -6
  172. data/lib/ory-client/models/submit_self_service_registration_flow_body.rb +4 -4
  173. data/lib/ory-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +6 -6
  174. data/lib/ory-client/models/submit_self_service_registration_flow_with_password_method_body.rb +6 -6
  175. data/lib/ory-client/models/submit_self_service_settings_flow_body.rb +9 -6
  176. data/lib/ory-client/models/submit_self_service_settings_flow_with_lookup_method_body.rb +264 -0
  177. data/lib/ory-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +6 -6
  178. data/lib/ory-client/models/submit_self_service_settings_flow_with_password_method_body.rb +8 -8
  179. data/lib/ory-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +6 -6
  180. data/lib/ory-client/models/submit_self_service_settings_flow_with_totp_method_body.rb +254 -0
  181. data/lib/ory-client/models/submit_self_service_settings_flow_with_web_authn_method_body.rb +264 -0
  182. data/lib/ory-client/models/submit_self_service_verification_flow_body.rb +4 -4
  183. data/lib/ory-client/models/submit_self_service_verification_flow_with_link_method_body.rb +6 -6
  184. data/lib/ory-client/models/successful_self_service_login_without_browser.rb +6 -6
  185. data/lib/ory-client/models/successful_self_service_registration_without_browser.rb +6 -6
  186. data/lib/ory-client/models/ui_container.rb +6 -6
  187. data/lib/ory-client/models/ui_node.rb +6 -6
  188. data/lib/ory-client/models/ui_node_anchor_attributes.rb +22 -7
  189. data/lib/ory-client/models/ui_node_attributes.rb +4 -4
  190. data/lib/ory-client/models/ui_node_image_attributes.rb +45 -10
  191. data/lib/ory-client/models/ui_node_input_attributes.rb +17 -7
  192. data/lib/ory-client/models/ui_node_text_attributes.rb +22 -7
  193. data/lib/ory-client/models/ui_text.rb +6 -6
  194. data/lib/ory-client/models/verifiable_identity_address.rb +6 -6
  195. data/lib/ory-client/models/version.rb +6 -6
  196. data/lib/ory-client/models/volume.rb +6 -6
  197. data/lib/ory-client/models/volume_usage_data.rb +6 -6
  198. data/lib/ory-client/version.rb +4 -4
  199. data/lib/ory-client.rb +15 -6
  200. data/ory-client.gemspec +3 -3
  201. data/spec/api/v0alpha2_api_spec.rb +434 -0
  202. data/spec/api_client_spec.rb +31 -31
  203. data/spec/configuration_spec.rb +5 -5
  204. data/spec/models/authenticator_assurance_level_spec.rb +28 -0
  205. data/spec/models/identity_credentials_type_spec.rb +28 -0
  206. data/spec/models/session_authentication_method_spec.rb +44 -0
  207. data/spec/models/session_device_spec.rb +34 -0
  208. data/spec/models/submit_self_service_login_flow_with_lookup_secret_method_body_spec.rb +46 -0
  209. data/spec/models/submit_self_service_login_flow_with_totp_method_body_spec.rb +46 -0
  210. data/spec/models/submit_self_service_login_flow_with_web_authn_method_body_spec.rb +46 -0
  211. data/spec/models/submit_self_service_settings_flow_with_lookup_method_body_spec.rb +58 -0
  212. data/spec/models/submit_self_service_settings_flow_with_totp_method_body_spec.rb +52 -0
  213. data/spec/models/submit_self_service_settings_flow_with_web_authn_method_body_spec.rb +58 -0
  214. data/spec/spec_helper.rb +2 -2
  215. metadata +46 -2
@@ -1,4 +1,4 @@
1
- # OryHydraClient::VerifiableIdentityAddress
1
+ # OryClient::VerifiableIdentityAddress
2
2
 
3
3
  ## Properties
4
4
 
@@ -18,7 +18,7 @@
18
18
  ```ruby
19
19
  require 'ory-client'
20
20
 
21
- instance = OryHydraClient::VerifiableIdentityAddress.new(
21
+ instance = OryClient::VerifiableIdentityAddress.new(
22
22
  created_at: 2014-01-01T23:28:56.782Z,
23
23
  id: null,
24
24
  status: null,
data/docs/Version.md CHANGED
@@ -1,4 +1,4 @@
1
- # OryHydraClient::Version
1
+ # OryClient::Version
2
2
 
3
3
  ## Properties
4
4
 
@@ -11,7 +11,7 @@
11
11
  ```ruby
12
12
  require 'ory-client'
13
13
 
14
- instance = OryHydraClient::Version.new(
14
+ instance = OryClient::Version.new(
15
15
  version: null
16
16
  )
17
17
  ```
data/docs/Volume.md CHANGED
@@ -1,4 +1,4 @@
1
- # OryHydraClient::Volume
1
+ # OryClient::Volume
2
2
 
3
3
  ## Properties
4
4
 
@@ -19,7 +19,7 @@
19
19
  ```ruby
20
20
  require 'ory-client'
21
21
 
22
- instance = OryHydraClient::Volume.new(
22
+ instance = OryClient::Volume.new(
23
23
  created_at: null,
24
24
  driver: null,
25
25
  labels: null,
@@ -1,4 +1,4 @@
1
- # OryHydraClient::VolumeUsageData
1
+ # OryClient::VolumeUsageData
2
2
 
3
3
  ## Properties
4
4
 
@@ -12,7 +12,7 @@
12
12
  ```ruby
13
13
  require 'ory-client'
14
14
 
15
- instance = OryHydraClient::VolumeUsageData.new(
15
+ instance = OryClient::VolumeUsageData.new(
16
16
  ref_count: null,
17
17
  size: null
18
18
  )
@@ -3,16 +3,16 @@
3
3
 
4
4
  #Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
5
5
 
6
- The version of the OpenAPI document: v0.0.1-alpha.17
6
+ The version of the OpenAPI document: v0.0.1-alpha.18
7
7
  Contact: support@ory.sh
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.1.1
9
+ OpenAPI Generator version: 5.2.1
10
10
 
11
11
  =end
12
12
 
13
13
  require 'cgi'
14
14
 
15
- module OryHydraClient
15
+ module OryClient
16
16
  class MetadataApi
17
17
  attr_accessor :api_client
18
18
 
@@ -0,0 +1,2069 @@
1
+ =begin
2
+ #Ory APIs
3
+
4
+ #Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
5
+
6
+ The version of the OpenAPI document: v0.0.1-alpha.18
7
+ Contact: support@ory.sh
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module OryClient
16
+ class V0alpha2Api
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an Identity
23
+ # This endpoint creates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [AdminCreateIdentityBody] :admin_create_identity_body
26
+ # @return [Identity]
27
+ def admin_create_identity(opts = {})
28
+ data, _status_code, _headers = admin_create_identity_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # Create an Identity
33
+ # This endpoint creates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [AdminCreateIdentityBody] :admin_create_identity_body
36
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
37
+ def admin_create_identity_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_identity ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/api/kratos/admin/identities'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ # HTTP header 'Content-Type'
52
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_create_identity_body'])
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type] || 'Identity'
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"V0alpha2Api.admin_create_identity",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_create_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Create a Recovery Link
84
+ # This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [AdminCreateSelfServiceRecoveryLinkBody] :admin_create_self_service_recovery_link_body
87
+ # @return [SelfServiceRecoveryLink]
88
+ def admin_create_self_service_recovery_link(opts = {})
89
+ data, _status_code, _headers = admin_create_self_service_recovery_link_with_http_info(opts)
90
+ data
91
+ end
92
+
93
+ # Create a Recovery Link
94
+ # This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [AdminCreateSelfServiceRecoveryLinkBody] :admin_create_self_service_recovery_link_body
97
+ # @return [Array<(SelfServiceRecoveryLink, Integer, Hash)>] SelfServiceRecoveryLink data, response status code and response headers
98
+ def admin_create_self_service_recovery_link_with_http_info(opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_self_service_recovery_link ...'
101
+ end
102
+ # resource path
103
+ local_var_path = '/api/kratos/admin/recovery/link'
104
+
105
+ # query parameters
106
+ query_params = opts[:query_params] || {}
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
112
+ # HTTP header 'Content-Type'
113
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
114
+
115
+ # form parameters
116
+ form_params = opts[:form_params] || {}
117
+
118
+ # http body (model)
119
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_create_self_service_recovery_link_body'])
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type] || 'SelfServiceRecoveryLink'
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"V0alpha2Api.admin_create_self_service_recovery_link",
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_create_self_service_recovery_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Delete an Identity
145
+ # Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
146
+ # @param id [String] ID is the identity&#39;s ID.
147
+ # @param [Hash] opts the optional parameters
148
+ # @return [nil]
149
+ def admin_delete_identity(id, opts = {})
150
+ admin_delete_identity_with_http_info(id, opts)
151
+ nil
152
+ end
153
+
154
+ # Delete an Identity
155
+ # Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
156
+ # @param id [String] ID is the identity&#39;s ID.
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
159
+ def admin_delete_identity_with_http_info(id, opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_identity ...'
162
+ end
163
+ # verify the required parameter 'id' is set
164
+ if @api_client.config.client_side_validation && id.nil?
165
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_identity"
166
+ end
167
+ # resource path
168
+ local_var_path = '/api/kratos/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
169
+
170
+ # query parameters
171
+ query_params = opts[:query_params] || {}
172
+
173
+ # header parameters
174
+ header_params = opts[:header_params] || {}
175
+ # HTTP header 'Accept' (if needed)
176
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
177
+
178
+ # form parameters
179
+ form_params = opts[:form_params] || {}
180
+
181
+ # http body (model)
182
+ post_body = opts[:debug_body]
183
+
184
+ # return_type
185
+ return_type = opts[:debug_return_type]
186
+
187
+ # auth_names
188
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
189
+
190
+ new_options = opts.merge(
191
+ :operation => :"V0alpha2Api.admin_delete_identity",
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => return_type
198
+ )
199
+
200
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
203
+ end
204
+ return data, status_code, headers
205
+ end
206
+
207
+ # Get an Identity
208
+ # Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
209
+ # @param id [String] ID must be set to the ID of identity you want to get
210
+ # @param [Hash] opts the optional parameters
211
+ # @return [Identity]
212
+ def admin_get_identity(id, opts = {})
213
+ data, _status_code, _headers = admin_get_identity_with_http_info(id, opts)
214
+ data
215
+ end
216
+
217
+ # Get an Identity
218
+ # Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
219
+ # @param id [String] ID must be set to the ID of identity you want to get
220
+ # @param [Hash] opts the optional parameters
221
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
222
+ def admin_get_identity_with_http_info(id, opts = {})
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_identity ...'
225
+ end
226
+ # verify the required parameter 'id' is set
227
+ if @api_client.config.client_side_validation && id.nil?
228
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_identity"
229
+ end
230
+ # resource path
231
+ local_var_path = '/api/kratos/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
232
+
233
+ # query parameters
234
+ query_params = opts[:query_params] || {}
235
+
236
+ # header parameters
237
+ header_params = opts[:header_params] || {}
238
+ # HTTP header 'Accept' (if needed)
239
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
240
+
241
+ # form parameters
242
+ form_params = opts[:form_params] || {}
243
+
244
+ # http body (model)
245
+ post_body = opts[:debug_body]
246
+
247
+ # return_type
248
+ return_type = opts[:debug_return_type] || 'Identity'
249
+
250
+ # auth_names
251
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
252
+
253
+ new_options = opts.merge(
254
+ :operation => :"V0alpha2Api.admin_get_identity",
255
+ :header_params => header_params,
256
+ :query_params => query_params,
257
+ :form_params => form_params,
258
+ :body => post_body,
259
+ :auth_names => auth_names,
260
+ :return_type => return_type
261
+ )
262
+
263
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ end
267
+ return data, status_code, headers
268
+ end
269
+
270
+ # List Identities
271
+ # Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
272
+ # @param [Hash] opts the optional parameters
273
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 100)
274
+ # @option opts [Integer] :page Pagination Page (default to 0)
275
+ # @return [Array<Identity>]
276
+ def admin_list_identities(opts = {})
277
+ data, _status_code, _headers = admin_list_identities_with_http_info(opts)
278
+ data
279
+ end
280
+
281
+ # List Identities
282
+ # Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
283
+ # @param [Hash] opts the optional parameters
284
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page.
285
+ # @option opts [Integer] :page Pagination Page
286
+ # @return [Array<(Array<Identity>, Integer, Hash)>] Array<Identity> data, response status code and response headers
287
+ def admin_list_identities_with_http_info(opts = {})
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_identities ...'
290
+ end
291
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 500
292
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identities, must be smaller than or equal to 500.'
293
+ end
294
+
295
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
296
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identities, must be greater than or equal to 1.'
297
+ end
298
+
299
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
300
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling V0alpha2Api.admin_list_identities, must be greater than or equal to 0.'
301
+ end
302
+
303
+ # resource path
304
+ local_var_path = '/api/kratos/admin/identities'
305
+
306
+ # query parameters
307
+ query_params = opts[:query_params] || {}
308
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
309
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
310
+
311
+ # header parameters
312
+ header_params = opts[:header_params] || {}
313
+ # HTTP header 'Accept' (if needed)
314
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
315
+
316
+ # form parameters
317
+ form_params = opts[:form_params] || {}
318
+
319
+ # http body (model)
320
+ post_body = opts[:debug_body]
321
+
322
+ # return_type
323
+ return_type = opts[:debug_return_type] || 'Array<Identity>'
324
+
325
+ # auth_names
326
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
327
+
328
+ new_options = opts.merge(
329
+ :operation => :"V0alpha2Api.admin_list_identities",
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => return_type
336
+ )
337
+
338
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
+ end
342
+ return data, status_code, headers
343
+ end
344
+
345
+ # Update an Identity
346
+ # This endpoint updates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
347
+ # @param id [String] ID must be set to the ID of identity you want to update
348
+ # @param [Hash] opts the optional parameters
349
+ # @option opts [AdminUpdateIdentityBody] :admin_update_identity_body
350
+ # @return [Identity]
351
+ def admin_update_identity(id, opts = {})
352
+ data, _status_code, _headers = admin_update_identity_with_http_info(id, opts)
353
+ data
354
+ end
355
+
356
+ # Update an Identity
357
+ # This endpoint updates an identity. It is NOT possible to set an identity&#39;s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
358
+ # @param id [String] ID must be set to the ID of identity you want to update
359
+ # @param [Hash] opts the optional parameters
360
+ # @option opts [AdminUpdateIdentityBody] :admin_update_identity_body
361
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
362
+ def admin_update_identity_with_http_info(id, opts = {})
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_identity ...'
365
+ end
366
+ # verify the required parameter 'id' is set
367
+ if @api_client.config.client_side_validation && id.nil?
368
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_update_identity"
369
+ end
370
+ # resource path
371
+ local_var_path = '/api/kratos/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
372
+
373
+ # query parameters
374
+ query_params = opts[:query_params] || {}
375
+
376
+ # header parameters
377
+ header_params = opts[:header_params] || {}
378
+ # HTTP header 'Accept' (if needed)
379
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
380
+ # HTTP header 'Content-Type'
381
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
382
+
383
+ # form parameters
384
+ form_params = opts[:form_params] || {}
385
+
386
+ # http body (model)
387
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_update_identity_body'])
388
+
389
+ # return_type
390
+ return_type = opts[:debug_return_type] || 'Identity'
391
+
392
+ # auth_names
393
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
394
+
395
+ new_options = opts.merge(
396
+ :operation => :"V0alpha2Api.admin_update_identity",
397
+ :header_params => header_params,
398
+ :query_params => query_params,
399
+ :form_params => form_params,
400
+ :body => post_body,
401
+ :auth_names => auth_names,
402
+ :return_type => return_type
403
+ )
404
+
405
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
406
+ if @api_client.config.debugging
407
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
408
+ end
409
+ return data, status_code, headers
410
+ end
411
+
412
+ # Create a Logout URL for Browsers
413
+ # This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
414
+ # @param [Hash] opts the optional parameters
415
+ # @option opts [String] :cookie HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
416
+ # @return [SelfServiceLogoutUrl]
417
+ def create_self_service_logout_flow_url_for_browsers(opts = {})
418
+ data, _status_code, _headers = create_self_service_logout_flow_url_for_browsers_with_http_info(opts)
419
+ data
420
+ end
421
+
422
+ # Create a Logout URL for Browsers
423
+ # This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the &#x60;/self-service/logout/api&#x60; URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
424
+ # @param [Hash] opts the optional parameters
425
+ # @option opts [String] :cookie HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
426
+ # @return [Array<(SelfServiceLogoutUrl, Integer, Hash)>] SelfServiceLogoutUrl data, response status code and response headers
427
+ def create_self_service_logout_flow_url_for_browsers_with_http_info(opts = {})
428
+ if @api_client.config.debugging
429
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_self_service_logout_flow_url_for_browsers ...'
430
+ end
431
+ # resource path
432
+ local_var_path = '/api/kratos/public/self-service/logout/browser'
433
+
434
+ # query parameters
435
+ query_params = opts[:query_params] || {}
436
+
437
+ # header parameters
438
+ header_params = opts[:header_params] || {}
439
+ # HTTP header 'Accept' (if needed)
440
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
441
+ header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
442
+
443
+ # form parameters
444
+ form_params = opts[:form_params] || {}
445
+
446
+ # http body (model)
447
+ post_body = opts[:debug_body]
448
+
449
+ # return_type
450
+ return_type = opts[:debug_return_type] || 'SelfServiceLogoutUrl'
451
+
452
+ # auth_names
453
+ auth_names = opts[:debug_auth_names] || []
454
+
455
+ new_options = opts.merge(
456
+ :operation => :"V0alpha2Api.create_self_service_logout_flow_url_for_browsers",
457
+ :header_params => header_params,
458
+ :query_params => query_params,
459
+ :form_params => form_params,
460
+ :body => post_body,
461
+ :auth_names => auth_names,
462
+ :return_type => return_type
463
+ )
464
+
465
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
466
+ if @api_client.config.debugging
467
+ @api_client.config.logger.debug "API called: V0alpha2Api#create_self_service_logout_flow_url_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
468
+ end
469
+ return data, status_code, headers
470
+ end
471
+
472
+ # Get a JSON Schema
473
+ # @param id [String] ID must be set to the ID of schema you want to get
474
+ # @param [Hash] opts the optional parameters
475
+ # @return [Object]
476
+ def get_json_schema(id, opts = {})
477
+ data, _status_code, _headers = get_json_schema_with_http_info(id, opts)
478
+ data
479
+ end
480
+
481
+ # Get a JSON Schema
482
+ # @param id [String] ID must be set to the ID of schema you want to get
483
+ # @param [Hash] opts the optional parameters
484
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
485
+ def get_json_schema_with_http_info(id, opts = {})
486
+ if @api_client.config.debugging
487
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_json_schema ...'
488
+ end
489
+ # verify the required parameter 'id' is set
490
+ if @api_client.config.client_side_validation && id.nil?
491
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_json_schema"
492
+ end
493
+ # resource path
494
+ local_var_path = '/api/kratos/public/schemas/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
495
+
496
+ # query parameters
497
+ query_params = opts[:query_params] || {}
498
+
499
+ # header parameters
500
+ header_params = opts[:header_params] || {}
501
+ # HTTP header 'Accept' (if needed)
502
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
503
+
504
+ # form parameters
505
+ form_params = opts[:form_params] || {}
506
+
507
+ # http body (model)
508
+ post_body = opts[:debug_body]
509
+
510
+ # return_type
511
+ return_type = opts[:debug_return_type] || 'Object'
512
+
513
+ # auth_names
514
+ auth_names = opts[:debug_auth_names] || []
515
+
516
+ new_options = opts.merge(
517
+ :operation => :"V0alpha2Api.get_json_schema",
518
+ :header_params => header_params,
519
+ :query_params => query_params,
520
+ :form_params => form_params,
521
+ :body => post_body,
522
+ :auth_names => auth_names,
523
+ :return_type => return_type
524
+ )
525
+
526
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
527
+ if @api_client.config.debugging
528
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_json_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
529
+ end
530
+ return data, status_code, headers
531
+ end
532
+
533
+ # Get Self-Service Errors
534
+ # 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: `?id=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).
535
+ # @param id [String] Error is the error&#39;s ID
536
+ # @param [Hash] opts the optional parameters
537
+ # @return [SelfServiceError]
538
+ def get_self_service_error(id, opts = {})
539
+ data, _status_code, _headers = get_self_service_error_with_http_info(id, opts)
540
+ data
541
+ end
542
+
543
+ # Get Self-Service Errors
544
+ # 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;?id&#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).
545
+ # @param id [String] Error is the error&#39;s ID
546
+ # @param [Hash] opts the optional parameters
547
+ # @return [Array<(SelfServiceError, Integer, Hash)>] SelfServiceError data, response status code and response headers
548
+ def get_self_service_error_with_http_info(id, opts = {})
549
+ if @api_client.config.debugging
550
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_error ...'
551
+ end
552
+ # verify the required parameter 'id' is set
553
+ if @api_client.config.client_side_validation && id.nil?
554
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_error"
555
+ end
556
+ # resource path
557
+ local_var_path = '/api/kratos/public/self-service/errors'
558
+
559
+ # query parameters
560
+ query_params = opts[:query_params] || {}
561
+ query_params[:'id'] = id
562
+
563
+ # header parameters
564
+ header_params = opts[:header_params] || {}
565
+ # HTTP header 'Accept' (if needed)
566
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
567
+
568
+ # form parameters
569
+ form_params = opts[:form_params] || {}
570
+
571
+ # http body (model)
572
+ post_body = opts[:debug_body]
573
+
574
+ # return_type
575
+ return_type = opts[:debug_return_type] || 'SelfServiceError'
576
+
577
+ # auth_names
578
+ auth_names = opts[:debug_auth_names] || []
579
+
580
+ new_options = opts.merge(
581
+ :operation => :"V0alpha2Api.get_self_service_error",
582
+ :header_params => header_params,
583
+ :query_params => query_params,
584
+ :form_params => form_params,
585
+ :body => post_body,
586
+ :auth_names => auth_names,
587
+ :return_type => return_type
588
+ )
589
+
590
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
591
+ if @api_client.config.debugging
592
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
593
+ end
594
+ return data, status_code, headers
595
+ end
596
+
597
+ # Get Login Flow
598
+ # This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getSelfServiceLoginFlow(req.header('cookie'), req.query['flow']) res.render('login', flow) }) ``` 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).
599
+ # @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;).
600
+ # @param [Hash] opts the optional parameters
601
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
602
+ # @return [SelfServiceLoginFlow]
603
+ def get_self_service_login_flow(id, opts = {})
604
+ data, _status_code, _headers = get_self_service_login_flow_with_http_info(id, opts)
605
+ data
606
+ end
607
+
608
+ # Get Login Flow
609
+ # This endpoint returns a login flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/login&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceLoginFlow(req.header(&#39;cookie&#39;), req.query[&#39;flow&#39;]) res.render(&#39;login&#39;, flow) }) &#x60;&#x60;&#x60; 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).
610
+ # @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;).
611
+ # @param [Hash] opts the optional parameters
612
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
613
+ # @return [Array<(SelfServiceLoginFlow, Integer, Hash)>] SelfServiceLoginFlow data, response status code and response headers
614
+ def get_self_service_login_flow_with_http_info(id, opts = {})
615
+ if @api_client.config.debugging
616
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_login_flow ...'
617
+ end
618
+ # verify the required parameter 'id' is set
619
+ if @api_client.config.client_side_validation && id.nil?
620
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_login_flow"
621
+ end
622
+ # resource path
623
+ local_var_path = '/api/kratos/public/self-service/login/flows'
624
+
625
+ # query parameters
626
+ query_params = opts[:query_params] || {}
627
+ query_params[:'id'] = id
628
+
629
+ # header parameters
630
+ header_params = opts[:header_params] || {}
631
+ # HTTP header 'Accept' (if needed)
632
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
633
+ header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
634
+
635
+ # form parameters
636
+ form_params = opts[:form_params] || {}
637
+
638
+ # http body (model)
639
+ post_body = opts[:debug_body]
640
+
641
+ # return_type
642
+ return_type = opts[:debug_return_type] || 'SelfServiceLoginFlow'
643
+
644
+ # auth_names
645
+ auth_names = opts[:debug_auth_names] || []
646
+
647
+ new_options = opts.merge(
648
+ :operation => :"V0alpha2Api.get_self_service_login_flow",
649
+ :header_params => header_params,
650
+ :query_params => query_params,
651
+ :form_params => form_params,
652
+ :body => post_body,
653
+ :auth_names => auth_names,
654
+ :return_type => return_type
655
+ )
656
+
657
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
658
+ if @api_client.config.debugging
659
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
660
+ end
661
+ return data, status_code, headers
662
+ end
663
+
664
+ # Get Recovery Flow
665
+ # This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceRecoveryFlow(req.header('Cookie'), req.query['flow']) res.render('recovery', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
666
+ # @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;).
667
+ # @param [Hash] opts the optional parameters
668
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
669
+ # @return [SelfServiceRecoveryFlow]
670
+ def get_self_service_recovery_flow(id, opts = {})
671
+ data, _status_code, _headers = get_self_service_recovery_flow_with_http_info(id, opts)
672
+ data
673
+ end
674
+
675
+ # Get Recovery Flow
676
+ # This endpoint returns a recovery flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/recovery&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceRecoveryFlow(req.header(&#39;Cookie&#39;), req.query[&#39;flow&#39;]) res.render(&#39;recovery&#39;, flow) }) &#x60;&#x60;&#x60; More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
677
+ # @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;).
678
+ # @param [Hash] opts the optional parameters
679
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
680
+ # @return [Array<(SelfServiceRecoveryFlow, Integer, Hash)>] SelfServiceRecoveryFlow data, response status code and response headers
681
+ def get_self_service_recovery_flow_with_http_info(id, opts = {})
682
+ if @api_client.config.debugging
683
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_recovery_flow ...'
684
+ end
685
+ # verify the required parameter 'id' is set
686
+ if @api_client.config.client_side_validation && id.nil?
687
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_recovery_flow"
688
+ end
689
+ # resource path
690
+ local_var_path = '/api/kratos/public/self-service/recovery/flows'
691
+
692
+ # query parameters
693
+ query_params = opts[:query_params] || {}
694
+ query_params[:'id'] = id
695
+
696
+ # header parameters
697
+ header_params = opts[:header_params] || {}
698
+ # HTTP header 'Accept' (if needed)
699
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
700
+ header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
701
+
702
+ # form parameters
703
+ form_params = opts[:form_params] || {}
704
+
705
+ # http body (model)
706
+ post_body = opts[:debug_body]
707
+
708
+ # return_type
709
+ return_type = opts[:debug_return_type] || 'SelfServiceRecoveryFlow'
710
+
711
+ # auth_names
712
+ auth_names = opts[:debug_auth_names] || []
713
+
714
+ new_options = opts.merge(
715
+ :operation => :"V0alpha2Api.get_self_service_recovery_flow",
716
+ :header_params => header_params,
717
+ :query_params => query_params,
718
+ :form_params => form_params,
719
+ :body => post_body,
720
+ :auth_names => auth_names,
721
+ :return_type => return_type
722
+ )
723
+
724
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
725
+ if @api_client.config.debugging
726
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
727
+ end
728
+ return data, status_code, headers
729
+ end
730
+
731
+ # Get Registration Flow
732
+ # This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getSelfServiceRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) ``` 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).
733
+ # @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;).
734
+ # @param [Hash] opts the optional parameters
735
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
736
+ # @return [SelfServiceRegistrationFlow]
737
+ def get_self_service_registration_flow(id, opts = {})
738
+ data, _status_code, _headers = get_self_service_registration_flow_with_http_info(id, opts)
739
+ data
740
+ end
741
+
742
+ # Get Registration Flow
743
+ # This endpoint returns a registration flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/registration&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceRegistrationFlow(req.header(&#39;cookie&#39;), req.query[&#39;flow&#39;]) res.render(&#39;registration&#39;, flow) }) &#x60;&#x60;&#x60; 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).
744
+ # @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;).
745
+ # @param [Hash] opts the optional parameters
746
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
747
+ # @return [Array<(SelfServiceRegistrationFlow, Integer, Hash)>] SelfServiceRegistrationFlow data, response status code and response headers
748
+ def get_self_service_registration_flow_with_http_info(id, opts = {})
749
+ if @api_client.config.debugging
750
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_registration_flow ...'
751
+ end
752
+ # verify the required parameter 'id' is set
753
+ if @api_client.config.client_side_validation && id.nil?
754
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_registration_flow"
755
+ end
756
+ # resource path
757
+ local_var_path = '/api/kratos/public/self-service/registration/flows'
758
+
759
+ # query parameters
760
+ query_params = opts[:query_params] || {}
761
+ query_params[:'id'] = id
762
+
763
+ # header parameters
764
+ header_params = opts[:header_params] || {}
765
+ # HTTP header 'Accept' (if needed)
766
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
767
+ header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
768
+
769
+ # form parameters
770
+ form_params = opts[:form_params] || {}
771
+
772
+ # http body (model)
773
+ post_body = opts[:debug_body]
774
+
775
+ # return_type
776
+ return_type = opts[:debug_return_type] || 'SelfServiceRegistrationFlow'
777
+
778
+ # auth_names
779
+ auth_names = opts[:debug_auth_names] || []
780
+
781
+ new_options = opts.merge(
782
+ :operation => :"V0alpha2Api.get_self_service_registration_flow",
783
+ :header_params => header_params,
784
+ :query_params => query_params,
785
+ :form_params => form_params,
786
+ :body => post_body,
787
+ :auth_names => auth_names,
788
+ :return_type => return_type
789
+ )
790
+
791
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
792
+ if @api_client.config.debugging
793
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
794
+ end
795
+ return data, status_code, headers
796
+ end
797
+
798
+ # Get Settings Flow
799
+ # 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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. 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).
800
+ # @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;).
801
+ # @param [Hash] opts the optional parameters
802
+ # @option opts [String] :x_session_token The Session Token When using the SDK in an app without a browser, please include the session token here.
803
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. You only need to do this for browser- based flows.
804
+ # @return [SelfServiceSettingsFlow]
805
+ def get_self_service_settings_flow(id, opts = {})
806
+ data, _status_code, _headers = get_self_service_settings_flow_with_http_info(id, opts)
807
+ data
808
+ end
809
+
810
+ # Get Settings Flow
811
+ # 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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. 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).
812
+ # @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;).
813
+ # @param [Hash] opts the optional parameters
814
+ # @option opts [String] :x_session_token The Session Token When using the SDK in an app without a browser, please include the session token here.
815
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. You only need to do this for browser- based flows.
816
+ # @return [Array<(SelfServiceSettingsFlow, Integer, Hash)>] SelfServiceSettingsFlow data, response status code and response headers
817
+ def get_self_service_settings_flow_with_http_info(id, opts = {})
818
+ if @api_client.config.debugging
819
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_settings_flow ...'
820
+ end
821
+ # verify the required parameter 'id' is set
822
+ if @api_client.config.client_side_validation && id.nil?
823
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_settings_flow"
824
+ end
825
+ # resource path
826
+ local_var_path = '/api/kratos/public/self-service/settings/flows'
827
+
828
+ # query parameters
829
+ query_params = opts[:query_params] || {}
830
+ query_params[:'id'] = id
831
+
832
+ # header parameters
833
+ header_params = opts[:header_params] || {}
834
+ # HTTP header 'Accept' (if needed)
835
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
836
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
837
+ header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
838
+
839
+ # form parameters
840
+ form_params = opts[:form_params] || {}
841
+
842
+ # http body (model)
843
+ post_body = opts[:debug_body]
844
+
845
+ # return_type
846
+ return_type = opts[:debug_return_type] || 'SelfServiceSettingsFlow'
847
+
848
+ # auth_names
849
+ auth_names = opts[:debug_auth_names] || []
850
+
851
+ new_options = opts.merge(
852
+ :operation => :"V0alpha2Api.get_self_service_settings_flow",
853
+ :header_params => header_params,
854
+ :query_params => query_params,
855
+ :form_params => form_params,
856
+ :body => post_body,
857
+ :auth_names => auth_names,
858
+ :return_type => return_type
859
+ )
860
+
861
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
862
+ if @api_client.config.debugging
863
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
864
+ end
865
+ return data, status_code, headers
866
+ end
867
+
868
+ # Get Verification Flow
869
+ # This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceVerificationFlow(req.header('cookie'), req.query['flow']) res.render('verification', flow) }) 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).
870
+ # @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;).
871
+ # @param [Hash] opts the optional parameters
872
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
873
+ # @return [SelfServiceVerificationFlow]
874
+ def get_self_service_verification_flow(id, opts = {})
875
+ data, _status_code, _headers = get_self_service_verification_flow_with_http_info(id, opts)
876
+ data
877
+ end
878
+
879
+ # Get Verification Flow
880
+ # This endpoint returns a verification flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/recovery&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceVerificationFlow(req.header(&#39;cookie&#39;), req.query[&#39;flow&#39;]) res.render(&#39;verification&#39;, flow) }) 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).
881
+ # @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;).
882
+ # @param [Hash] opts the optional parameters
883
+ # @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
884
+ # @return [Array<(SelfServiceVerificationFlow, Integer, Hash)>] SelfServiceVerificationFlow data, response status code and response headers
885
+ def get_self_service_verification_flow_with_http_info(id, opts = {})
886
+ if @api_client.config.debugging
887
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_verification_flow ...'
888
+ end
889
+ # verify the required parameter 'id' is set
890
+ if @api_client.config.client_side_validation && id.nil?
891
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_verification_flow"
892
+ end
893
+ # resource path
894
+ local_var_path = '/api/kratos/public/self-service/verification/flows'
895
+
896
+ # query parameters
897
+ query_params = opts[:query_params] || {}
898
+ query_params[:'id'] = id
899
+
900
+ # header parameters
901
+ header_params = opts[:header_params] || {}
902
+ # HTTP header 'Accept' (if needed)
903
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
904
+ header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
905
+
906
+ # form parameters
907
+ form_params = opts[:form_params] || {}
908
+
909
+ # http body (model)
910
+ post_body = opts[:debug_body]
911
+
912
+ # return_type
913
+ return_type = opts[:debug_return_type] || 'SelfServiceVerificationFlow'
914
+
915
+ # auth_names
916
+ auth_names = opts[:debug_auth_names] || []
917
+
918
+ new_options = opts.merge(
919
+ :operation => :"V0alpha2Api.get_self_service_verification_flow",
920
+ :header_params => header_params,
921
+ :query_params => query_params,
922
+ :form_params => form_params,
923
+ :body => post_body,
924
+ :auth_names => auth_names,
925
+ :return_type => return_type
926
+ )
927
+
928
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
929
+ if @api_client.config.debugging
930
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
931
+ end
932
+ return data, status_code, headers
933
+ end
934
+
935
+ # Initialize Login Flow for Browsers
936
+ # This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it 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. If this endpoint is called via an AJAX request, the response contains the login flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. 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).
937
+ # @param [Hash] opts the optional parameters
938
+ # @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.
939
+ # @option opts [String] :aal Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \&quot;upgrade\&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
940
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
941
+ # @return [SelfServiceLoginFlow]
942
+ def initialize_self_service_login_flow_for_browsers(opts = {})
943
+ data, _status_code, _headers = initialize_self_service_login_flow_for_browsers_with_http_info(opts)
944
+ data
945
+ end
946
+
947
+ # Initialize Login Flow for Browsers
948
+ # This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it 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. If this endpoint is called via an AJAX request, the response contains the login flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. 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).
949
+ # @param [Hash] opts the optional parameters
950
+ # @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.
951
+ # @option opts [String] :aal Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \&quot;upgrade\&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
952
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
953
+ # @return [Array<(SelfServiceLoginFlow, Integer, Hash)>] SelfServiceLoginFlow data, response status code and response headers
954
+ def initialize_self_service_login_flow_for_browsers_with_http_info(opts = {})
955
+ if @api_client.config.debugging
956
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_login_flow_for_browsers ...'
957
+ end
958
+ # resource path
959
+ local_var_path = '/api/kratos/public/self-service/login/browser'
960
+
961
+ # query parameters
962
+ query_params = opts[:query_params] || {}
963
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
964
+ query_params[:'aal'] = opts[:'aal'] if !opts[:'aal'].nil?
965
+
966
+ # header parameters
967
+ header_params = opts[:header_params] || {}
968
+ # HTTP header 'Accept' (if needed)
969
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
970
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
971
+
972
+ # form parameters
973
+ form_params = opts[:form_params] || {}
974
+
975
+ # http body (model)
976
+ post_body = opts[:debug_body]
977
+
978
+ # return_type
979
+ return_type = opts[:debug_return_type] || 'SelfServiceLoginFlow'
980
+
981
+ # auth_names
982
+ auth_names = opts[:debug_auth_names] || []
983
+
984
+ new_options = opts.merge(
985
+ :operation => :"V0alpha2Api.initialize_self_service_login_flow_for_browsers",
986
+ :header_params => header_params,
987
+ :query_params => query_params,
988
+ :form_params => form_params,
989
+ :body => post_body,
990
+ :auth_names => auth_names,
991
+ :return_type => return_type
992
+ )
993
+
994
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
995
+ if @api_client.config.debugging
996
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_login_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
997
+ end
998
+ return data, status_code, headers
999
+ end
1000
+
1001
+ # Initialize Login Flow for APIs, Services, Apps, ...
1002
+ # This endpoint initiates a login flow for API clients that do not use a browser, 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>`. 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).
1003
+ # @param [Hash] opts the optional parameters
1004
+ # @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.
1005
+ # @option opts [String] :aal Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \&quot;upgrade\&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
1006
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1007
+ # @return [SelfServiceLoginFlow]
1008
+ def initialize_self_service_login_flow_without_browser(opts = {})
1009
+ data, _status_code, _headers = initialize_self_service_login_flow_without_browser_with_http_info(opts)
1010
+ data
1011
+ end
1012
+
1013
+ # Initialize Login Flow for APIs, Services, Apps, ...
1014
+ # This endpoint initiates a login flow for API clients that do not use a browser, 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;. 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).
1015
+ # @param [Hash] opts the optional parameters
1016
+ # @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.
1017
+ # @option opts [String] :aal Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \&quot;upgrade\&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ ... you would set this to \&quot;aal2\&quot;.
1018
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1019
+ # @return [Array<(SelfServiceLoginFlow, Integer, Hash)>] SelfServiceLoginFlow data, response status code and response headers
1020
+ def initialize_self_service_login_flow_without_browser_with_http_info(opts = {})
1021
+ if @api_client.config.debugging
1022
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_login_flow_without_browser ...'
1023
+ end
1024
+ # resource path
1025
+ local_var_path = '/api/kratos/public/self-service/login/api'
1026
+
1027
+ # query parameters
1028
+ query_params = opts[:query_params] || {}
1029
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
1030
+ query_params[:'aal'] = opts[:'aal'] if !opts[:'aal'].nil?
1031
+
1032
+ # header parameters
1033
+ header_params = opts[:header_params] || {}
1034
+ # HTTP header 'Accept' (if needed)
1035
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1036
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
1037
+
1038
+ # form parameters
1039
+ form_params = opts[:form_params] || {}
1040
+
1041
+ # http body (model)
1042
+ post_body = opts[:debug_body]
1043
+
1044
+ # return_type
1045
+ return_type = opts[:debug_return_type] || 'SelfServiceLoginFlow'
1046
+
1047
+ # auth_names
1048
+ auth_names = opts[:debug_auth_names] || []
1049
+
1050
+ new_options = opts.merge(
1051
+ :operation => :"V0alpha2Api.initialize_self_service_login_flow_without_browser",
1052
+ :header_params => header_params,
1053
+ :query_params => query_params,
1054
+ :form_params => form_params,
1055
+ :body => post_body,
1056
+ :auth_names => auth_names,
1057
+ :return_type => return_type
1058
+ )
1059
+
1060
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1061
+ if @api_client.config.debugging
1062
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_login_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1063
+ end
1064
+ return data, status_code, headers
1065
+ end
1066
+
1067
+ # Initialize Recovery Flow for Browsers
1068
+ # 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. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1069
+ # @param [Hash] opts the optional parameters
1070
+ # @return [SelfServiceRecoveryFlow]
1071
+ def initialize_self_service_recovery_flow_for_browsers(opts = {})
1072
+ data, _status_code, _headers = initialize_self_service_recovery_flow_for_browsers_with_http_info(opts)
1073
+ data
1074
+ end
1075
+
1076
+ # Initialize Recovery Flow for Browsers
1077
+ # 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. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1078
+ # @param [Hash] opts the optional parameters
1079
+ # @return [Array<(SelfServiceRecoveryFlow, Integer, Hash)>] SelfServiceRecoveryFlow data, response status code and response headers
1080
+ def initialize_self_service_recovery_flow_for_browsers_with_http_info(opts = {})
1081
+ if @api_client.config.debugging
1082
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_recovery_flow_for_browsers ...'
1083
+ end
1084
+ # resource path
1085
+ local_var_path = '/api/kratos/public/self-service/recovery/browser'
1086
+
1087
+ # query parameters
1088
+ query_params = opts[:query_params] || {}
1089
+
1090
+ # header parameters
1091
+ header_params = opts[:header_params] || {}
1092
+ # HTTP header 'Accept' (if needed)
1093
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1094
+
1095
+ # form parameters
1096
+ form_params = opts[:form_params] || {}
1097
+
1098
+ # http body (model)
1099
+ post_body = opts[:debug_body]
1100
+
1101
+ # return_type
1102
+ return_type = opts[:debug_return_type] || 'SelfServiceRecoveryFlow'
1103
+
1104
+ # auth_names
1105
+ auth_names = opts[:debug_auth_names] || []
1106
+
1107
+ new_options = opts.merge(
1108
+ :operation => :"V0alpha2Api.initialize_self_service_recovery_flow_for_browsers",
1109
+ :header_params => header_params,
1110
+ :query_params => query_params,
1111
+ :form_params => form_params,
1112
+ :body => post_body,
1113
+ :auth_names => auth_names,
1114
+ :return_type => return_type
1115
+ )
1116
+
1117
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1118
+ if @api_client.config.debugging
1119
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_recovery_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1120
+ end
1121
+ return data, status_code, headers
1122
+ end
1123
+
1124
+ # Initialize Recovery Flow for APIs, Services, Apps, ...
1125
+ # 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>`. 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).
1126
+ # @param [Hash] opts the optional parameters
1127
+ # @return [SelfServiceRecoveryFlow]
1128
+ def initialize_self_service_recovery_flow_without_browser(opts = {})
1129
+ data, _status_code, _headers = initialize_self_service_recovery_flow_without_browser_with_http_info(opts)
1130
+ data
1131
+ end
1132
+
1133
+ # Initialize Recovery Flow for APIs, Services, Apps, ...
1134
+ # 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;. 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).
1135
+ # @param [Hash] opts the optional parameters
1136
+ # @return [Array<(SelfServiceRecoveryFlow, Integer, Hash)>] SelfServiceRecoveryFlow data, response status code and response headers
1137
+ def initialize_self_service_recovery_flow_without_browser_with_http_info(opts = {})
1138
+ if @api_client.config.debugging
1139
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_recovery_flow_without_browser ...'
1140
+ end
1141
+ # resource path
1142
+ local_var_path = '/api/kratos/public/self-service/recovery/api'
1143
+
1144
+ # query parameters
1145
+ query_params = opts[:query_params] || {}
1146
+
1147
+ # header parameters
1148
+ header_params = opts[:header_params] || {}
1149
+ # HTTP header 'Accept' (if needed)
1150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1151
+
1152
+ # form parameters
1153
+ form_params = opts[:form_params] || {}
1154
+
1155
+ # http body (model)
1156
+ post_body = opts[:debug_body]
1157
+
1158
+ # return_type
1159
+ return_type = opts[:debug_return_type] || 'SelfServiceRecoveryFlow'
1160
+
1161
+ # auth_names
1162
+ auth_names = opts[:debug_auth_names] || []
1163
+
1164
+ new_options = opts.merge(
1165
+ :operation => :"V0alpha2Api.initialize_self_service_recovery_flow_without_browser",
1166
+ :header_params => header_params,
1167
+ :query_params => query_params,
1168
+ :form_params => form_params,
1169
+ :body => post_body,
1170
+ :auth_names => auth_names,
1171
+ :return_type => return_type
1172
+ )
1173
+
1174
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1175
+ if @api_client.config.debugging
1176
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_recovery_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1177
+ end
1178
+ return data, status_code, headers
1179
+ end
1180
+
1181
+ # Initialize Registration Flow for Browsers
1182
+ # This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: If this endpoint is opened as a link in the browser, it 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`. If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. 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).
1183
+ # @param [Hash] opts the optional parameters
1184
+ # @return [SelfServiceRegistrationFlow]
1185
+ def initialize_self_service_registration_flow_for_browsers(opts = {})
1186
+ data, _status_code, _headers = initialize_self_service_registration_flow_for_browsers_with_http_info(opts)
1187
+ data
1188
+ end
1189
+
1190
+ # Initialize Registration Flow for Browsers
1191
+ # This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: If this endpoint is opened as a link in the browser, it 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;. If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. 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).
1192
+ # @param [Hash] opts the optional parameters
1193
+ # @return [Array<(SelfServiceRegistrationFlow, Integer, Hash)>] SelfServiceRegistrationFlow data, response status code and response headers
1194
+ def initialize_self_service_registration_flow_for_browsers_with_http_info(opts = {})
1195
+ if @api_client.config.debugging
1196
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_registration_flow_for_browsers ...'
1197
+ end
1198
+ # resource path
1199
+ local_var_path = '/api/kratos/public/self-service/registration/browser'
1200
+
1201
+ # query parameters
1202
+ query_params = opts[:query_params] || {}
1203
+
1204
+ # header parameters
1205
+ header_params = opts[:header_params] || {}
1206
+ # HTTP header 'Accept' (if needed)
1207
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1208
+
1209
+ # form parameters
1210
+ form_params = opts[:form_params] || {}
1211
+
1212
+ # http body (model)
1213
+ post_body = opts[:debug_body]
1214
+
1215
+ # return_type
1216
+ return_type = opts[:debug_return_type] || 'SelfServiceRegistrationFlow'
1217
+
1218
+ # auth_names
1219
+ auth_names = opts[:debug_auth_names] || []
1220
+
1221
+ new_options = opts.merge(
1222
+ :operation => :"V0alpha2Api.initialize_self_service_registration_flow_for_browsers",
1223
+ :header_params => header_params,
1224
+ :query_params => query_params,
1225
+ :form_params => form_params,
1226
+ :body => post_body,
1227
+ :auth_names => auth_names,
1228
+ :return_type => return_type
1229
+ )
1230
+
1231
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1232
+ if @api_client.config.debugging
1233
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_registration_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1234
+ end
1235
+ return data, status_code, headers
1236
+ end
1237
+
1238
+ # Initialize Registration Flow for APIs, Services, Apps, ...
1239
+ # 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>`. 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).
1240
+ # @param [Hash] opts the optional parameters
1241
+ # @return [SelfServiceRegistrationFlow]
1242
+ def initialize_self_service_registration_flow_without_browser(opts = {})
1243
+ data, _status_code, _headers = initialize_self_service_registration_flow_without_browser_with_http_info(opts)
1244
+ data
1245
+ end
1246
+
1247
+ # Initialize Registration Flow for APIs, Services, Apps, ...
1248
+ # 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;. 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).
1249
+ # @param [Hash] opts the optional parameters
1250
+ # @return [Array<(SelfServiceRegistrationFlow, Integer, Hash)>] SelfServiceRegistrationFlow data, response status code and response headers
1251
+ def initialize_self_service_registration_flow_without_browser_with_http_info(opts = {})
1252
+ if @api_client.config.debugging
1253
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_registration_flow_without_browser ...'
1254
+ end
1255
+ # resource path
1256
+ local_var_path = '/api/kratos/public/self-service/registration/api'
1257
+
1258
+ # query parameters
1259
+ query_params = opts[:query_params] || {}
1260
+
1261
+ # header parameters
1262
+ header_params = opts[:header_params] || {}
1263
+ # HTTP header 'Accept' (if needed)
1264
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1265
+
1266
+ # form parameters
1267
+ form_params = opts[:form_params] || {}
1268
+
1269
+ # http body (model)
1270
+ post_body = opts[:debug_body]
1271
+
1272
+ # return_type
1273
+ return_type = opts[:debug_return_type] || 'SelfServiceRegistrationFlow'
1274
+
1275
+ # auth_names
1276
+ auth_names = opts[:debug_auth_names] || []
1277
+
1278
+ new_options = opts.merge(
1279
+ :operation => :"V0alpha2Api.initialize_self_service_registration_flow_without_browser",
1280
+ :header_params => header_params,
1281
+ :query_params => query_params,
1282
+ :form_params => form_params,
1283
+ :body => post_body,
1284
+ :auth_names => auth_names,
1285
+ :return_type => return_type
1286
+ )
1287
+
1288
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1289
+ if @api_client.config.debugging
1290
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_registration_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1291
+ end
1292
+ return data, status_code, headers
1293
+ end
1294
+
1295
+ # Initialize Settings Flow for Browsers
1296
+ # 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. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 403 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
1297
+ # @param [Hash] opts the optional parameters
1298
+ # @option opts [String] :cookie The Session Cookie of the Identity performing the settings flow.
1299
+ # @return [SelfServiceSettingsFlow]
1300
+ def initialize_self_service_settings_flow_for_browsers(opts = {})
1301
+ data, _status_code, _headers = initialize_self_service_settings_flow_for_browsers_with_http_info(opts)
1302
+ data
1303
+ end
1304
+
1305
+ # Initialize Settings Flow for Browsers
1306
+ # 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. If this endpoint is opened as a link in the browser, it 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 user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 403 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
1307
+ # @param [Hash] opts the optional parameters
1308
+ # @option opts [String] :cookie The Session Cookie of the Identity performing the settings flow.
1309
+ # @return [Array<(SelfServiceSettingsFlow, Integer, Hash)>] SelfServiceSettingsFlow data, response status code and response headers
1310
+ def initialize_self_service_settings_flow_for_browsers_with_http_info(opts = {})
1311
+ if @api_client.config.debugging
1312
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_settings_flow_for_browsers ...'
1313
+ end
1314
+ # resource path
1315
+ local_var_path = '/api/kratos/public/self-service/settings/browser'
1316
+
1317
+ # query parameters
1318
+ query_params = opts[:query_params] || {}
1319
+
1320
+ # header parameters
1321
+ header_params = opts[:header_params] || {}
1322
+ # HTTP header 'Accept' (if needed)
1323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1324
+ header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
1325
+
1326
+ # form parameters
1327
+ form_params = opts[:form_params] || {}
1328
+
1329
+ # http body (model)
1330
+ post_body = opts[:debug_body]
1331
+
1332
+ # return_type
1333
+ return_type = opts[:debug_return_type] || 'SelfServiceSettingsFlow'
1334
+
1335
+ # auth_names
1336
+ auth_names = opts[:debug_auth_names] || []
1337
+
1338
+ new_options = opts.merge(
1339
+ :operation => :"V0alpha2Api.initialize_self_service_settings_flow_for_browsers",
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: V0alpha2Api#initialize_self_service_settings_flow_for_browsers\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 APIs, Services, Apps, ...
1356
+ # 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>`. 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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. 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).
1357
+ # @param [Hash] opts the optional parameters
1358
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1359
+ # @return [SelfServiceSettingsFlow]
1360
+ def initialize_self_service_settings_flow_without_browser(opts = {})
1361
+ data, _status_code, _headers = initialize_self_service_settings_flow_without_browser_with_http_info(opts)
1362
+ data
1363
+ end
1364
+
1365
+ # Initialize Settings Flow for APIs, Services, Apps, ...
1366
+ # 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;. 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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. 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).
1367
+ # @param [Hash] opts the optional parameters
1368
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1369
+ # @return [Array<(SelfServiceSettingsFlow, Integer, Hash)>] SelfServiceSettingsFlow data, response status code and response headers
1370
+ def initialize_self_service_settings_flow_without_browser_with_http_info(opts = {})
1371
+ if @api_client.config.debugging
1372
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_settings_flow_without_browser ...'
1373
+ end
1374
+ # resource path
1375
+ local_var_path = '/api/kratos/public/self-service/settings/api'
1376
+
1377
+ # query parameters
1378
+ query_params = opts[:query_params] || {}
1379
+
1380
+ # header parameters
1381
+ header_params = opts[:header_params] || {}
1382
+ # HTTP header 'Accept' (if needed)
1383
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1384
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
1385
+
1386
+ # form parameters
1387
+ form_params = opts[:form_params] || {}
1388
+
1389
+ # http body (model)
1390
+ post_body = opts[:debug_body]
1391
+
1392
+ # return_type
1393
+ return_type = opts[:debug_return_type] || 'SelfServiceSettingsFlow'
1394
+
1395
+ # auth_names
1396
+ auth_names = opts[:debug_auth_names] || []
1397
+
1398
+ new_options = opts.merge(
1399
+ :operation => :"V0alpha2Api.initialize_self_service_settings_flow_without_browser",
1400
+ :header_params => header_params,
1401
+ :query_params => query_params,
1402
+ :form_params => form_params,
1403
+ :body => post_body,
1404
+ :auth_names => auth_names,
1405
+ :return_type => return_type
1406
+ )
1407
+
1408
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1409
+ if @api_client.config.debugging
1410
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_settings_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1411
+ end
1412
+ return data, status_code, headers
1413
+ end
1414
+
1415
+ # Initialize Verification Flow for Browser Clients
1416
+ # 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=`. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. 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).
1417
+ # @param [Hash] opts the optional parameters
1418
+ # @return [SelfServiceVerificationFlow]
1419
+ def initialize_self_service_verification_flow_for_browsers(opts = {})
1420
+ data, _status_code, _headers = initialize_self_service_verification_flow_for_browsers_with_http_info(opts)
1421
+ data
1422
+ end
1423
+
1424
+ # Initialize Verification Flow for Browser Clients
1425
+ # 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;. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. 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).
1426
+ # @param [Hash] opts the optional parameters
1427
+ # @return [Array<(SelfServiceVerificationFlow, Integer, Hash)>] SelfServiceVerificationFlow data, response status code and response headers
1428
+ def initialize_self_service_verification_flow_for_browsers_with_http_info(opts = {})
1429
+ if @api_client.config.debugging
1430
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_verification_flow_for_browsers ...'
1431
+ end
1432
+ # resource path
1433
+ local_var_path = '/api/kratos/public/self-service/verification/browser'
1434
+
1435
+ # query parameters
1436
+ query_params = opts[:query_params] || {}
1437
+
1438
+ # header parameters
1439
+ header_params = opts[:header_params] || {}
1440
+ # HTTP header 'Accept' (if needed)
1441
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1442
+
1443
+ # form parameters
1444
+ form_params = opts[:form_params] || {}
1445
+
1446
+ # http body (model)
1447
+ post_body = opts[:debug_body]
1448
+
1449
+ # return_type
1450
+ return_type = opts[:debug_return_type] || 'SelfServiceVerificationFlow'
1451
+
1452
+ # auth_names
1453
+ auth_names = opts[:debug_auth_names] || []
1454
+
1455
+ new_options = opts.merge(
1456
+ :operation => :"V0alpha2Api.initialize_self_service_verification_flow_for_browsers",
1457
+ :header_params => header_params,
1458
+ :query_params => query_params,
1459
+ :form_params => form_params,
1460
+ :body => post_body,
1461
+ :auth_names => auth_names,
1462
+ :return_type => return_type
1463
+ )
1464
+
1465
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1466
+ if @api_client.config.debugging
1467
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_verification_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1468
+ end
1469
+ return data, status_code, headers
1470
+ end
1471
+
1472
+ # Initialize Verification Flow for APIs, Services, Apps, ...
1473
+ # 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>`. 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).
1474
+ # @param [Hash] opts the optional parameters
1475
+ # @return [SelfServiceVerificationFlow]
1476
+ def initialize_self_service_verification_flow_without_browser(opts = {})
1477
+ data, _status_code, _headers = initialize_self_service_verification_flow_without_browser_with_http_info(opts)
1478
+ data
1479
+ end
1480
+
1481
+ # Initialize Verification Flow for APIs, Services, Apps, ...
1482
+ # 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;. 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).
1483
+ # @param [Hash] opts the optional parameters
1484
+ # @return [Array<(SelfServiceVerificationFlow, Integer, Hash)>] SelfServiceVerificationFlow data, response status code and response headers
1485
+ def initialize_self_service_verification_flow_without_browser_with_http_info(opts = {})
1486
+ if @api_client.config.debugging
1487
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_verification_flow_without_browser ...'
1488
+ end
1489
+ # resource path
1490
+ local_var_path = '/api/kratos/public/self-service/verification/api'
1491
+
1492
+ # query parameters
1493
+ query_params = opts[:query_params] || {}
1494
+
1495
+ # header parameters
1496
+ header_params = opts[:header_params] || {}
1497
+ # HTTP header 'Accept' (if needed)
1498
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1499
+
1500
+ # form parameters
1501
+ form_params = opts[:form_params] || {}
1502
+
1503
+ # http body (model)
1504
+ post_body = opts[:debug_body]
1505
+
1506
+ # return_type
1507
+ return_type = opts[:debug_return_type] || 'SelfServiceVerificationFlow'
1508
+
1509
+ # auth_names
1510
+ auth_names = opts[:debug_auth_names] || []
1511
+
1512
+ new_options = opts.merge(
1513
+ :operation => :"V0alpha2Api.initialize_self_service_verification_flow_without_browser",
1514
+ :header_params => header_params,
1515
+ :query_params => query_params,
1516
+ :form_params => form_params,
1517
+ :body => post_body,
1518
+ :auth_names => auth_names,
1519
+ :return_type => return_type
1520
+ )
1521
+
1522
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1523
+ if @api_client.config.debugging
1524
+ @api_client.config.logger.debug "API called: V0alpha2Api#initialize_self_service_verification_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1525
+ end
1526
+ return data, status_code, headers
1527
+ end
1528
+
1529
+ # Submit a Login Flow
1530
+ # :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: Use this endpoint to complete a login flow. 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 a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond 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. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header 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. 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).
1531
+ # @param flow [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;).
1532
+ # @param [Hash] opts the optional parameters
1533
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1534
+ # @option opts [SubmitSelfServiceLoginFlowBody] :submit_self_service_login_flow_body
1535
+ # @return [SuccessfulSelfServiceLoginWithoutBrowser]
1536
+ def submit_self_service_login_flow(flow, opts = {})
1537
+ data, _status_code, _headers = submit_self_service_login_flow_with_http_info(flow, opts)
1538
+ data
1539
+ end
1540
+
1541
+ # Submit a Login Flow
1542
+ # :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: Use this endpoint to complete a login flow. 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 a Content-Type of &#x60;application/x-www-form-urlencoded&#x60; or &#x60;application/json&#x60; to be sent in the body and respond 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. Browser flows with an accept header of &#x60;application/json&#x60; will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a &#x60;Set-Cookie&#x60; header 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. 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).
1543
+ # @param flow [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;).
1544
+ # @param [Hash] opts the optional parameters
1545
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1546
+ # @option opts [SubmitSelfServiceLoginFlowBody] :submit_self_service_login_flow_body
1547
+ # @return [Array<(SuccessfulSelfServiceLoginWithoutBrowser, Integer, Hash)>] SuccessfulSelfServiceLoginWithoutBrowser data, response status code and response headers
1548
+ def submit_self_service_login_flow_with_http_info(flow, opts = {})
1549
+ if @api_client.config.debugging
1550
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_login_flow ...'
1551
+ end
1552
+ # verify the required parameter 'flow' is set
1553
+ if @api_client.config.client_side_validation && flow.nil?
1554
+ fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_login_flow"
1555
+ end
1556
+ # resource path
1557
+ local_var_path = '/api/kratos/public/self-service/login'
1558
+
1559
+ # query parameters
1560
+ query_params = opts[:query_params] || {}
1561
+ query_params[:'flow'] = flow
1562
+
1563
+ # header parameters
1564
+ header_params = opts[:header_params] || {}
1565
+ # HTTP header 'Accept' (if needed)
1566
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1567
+ # HTTP header 'Content-Type'
1568
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
1569
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
1570
+
1571
+ # form parameters
1572
+ form_params = opts[:form_params] || {}
1573
+
1574
+ # http body (model)
1575
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_login_flow_body'])
1576
+
1577
+ # return_type
1578
+ return_type = opts[:debug_return_type] || 'SuccessfulSelfServiceLoginWithoutBrowser'
1579
+
1580
+ # auth_names
1581
+ auth_names = opts[:debug_auth_names] || []
1582
+
1583
+ new_options = opts.merge(
1584
+ :operation => :"V0alpha2Api.submit_self_service_login_flow",
1585
+ :header_params => header_params,
1586
+ :query_params => query_params,
1587
+ :form_params => form_params,
1588
+ :body => post_body,
1589
+ :auth_names => auth_names,
1590
+ :return_type => return_type
1591
+ )
1592
+
1593
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1594
+ if @api_client.config.debugging
1595
+ @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1596
+ end
1597
+ return data, status_code, headers
1598
+ end
1599
+
1600
+ # Complete Self-Service Logout
1601
+ # This endpoint logs out an identity in a self-service manner. If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 302 Found) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
1602
+ # @param [Hash] opts the optional parameters
1603
+ # @option opts [String] :token A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/urls&#x60; to generate a URL for this endpoint.
1604
+ # @return [nil]
1605
+ def submit_self_service_logout_flow(opts = {})
1606
+ submit_self_service_logout_flow_with_http_info(opts)
1607
+ nil
1608
+ end
1609
+
1610
+ # Complete Self-Service Logout
1611
+ # This endpoint logs out an identity in a self-service manner. If the &#x60;Accept&#x60; HTTP header is not set to &#x60;application/json&#x60;, the browser will be redirected (HTTP 302 Found) to the &#x60;return_to&#x60; parameter of the initial request or fall back to &#x60;urls.default_return_to&#x60;. If the &#x60;Accept&#x60; HTTP header is set to &#x60;application/json&#x60;, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the &#x60;/self-service/logout/api&#x60; URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
1612
+ # @param [Hash] opts the optional parameters
1613
+ # @option opts [String] :token A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/urls&#x60; to generate a URL for this endpoint.
1614
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1615
+ def submit_self_service_logout_flow_with_http_info(opts = {})
1616
+ if @api_client.config.debugging
1617
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_logout_flow ...'
1618
+ end
1619
+ # resource path
1620
+ local_var_path = '/api/kratos/public/self-service/logout'
1621
+
1622
+ # query parameters
1623
+ query_params = opts[:query_params] || {}
1624
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
1625
+
1626
+ # header parameters
1627
+ header_params = opts[:header_params] || {}
1628
+ # HTTP header 'Accept' (if needed)
1629
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1630
+
1631
+ # form parameters
1632
+ form_params = opts[:form_params] || {}
1633
+
1634
+ # http body (model)
1635
+ post_body = opts[:debug_body]
1636
+
1637
+ # return_type
1638
+ return_type = opts[:debug_return_type]
1639
+
1640
+ # auth_names
1641
+ auth_names = opts[:debug_auth_names] || []
1642
+
1643
+ new_options = opts.merge(
1644
+ :operation => :"V0alpha2Api.submit_self_service_logout_flow",
1645
+ :header_params => header_params,
1646
+ :query_params => query_params,
1647
+ :form_params => form_params,
1648
+ :body => post_body,
1649
+ :auth_names => auth_names,
1650
+ :return_type => return_type
1651
+ )
1652
+
1653
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1654
+ if @api_client.config.debugging
1655
+ @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_logout_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1656
+ end
1657
+ return data, status_code, headers
1658
+ end
1659
+
1660
+ # Perform Logout for APIs, Services, Apps, ...
1661
+ # Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
1662
+ # @param submit_self_service_logout_flow_without_browser_body [SubmitSelfServiceLogoutFlowWithoutBrowserBody]
1663
+ # @param [Hash] opts the optional parameters
1664
+ # @return [nil]
1665
+ def submit_self_service_logout_flow_without_browser(submit_self_service_logout_flow_without_browser_body, opts = {})
1666
+ submit_self_service_logout_flow_without_browser_with_http_info(submit_self_service_logout_flow_without_browser_body, opts)
1667
+ nil
1668
+ end
1669
+
1670
+ # Perform Logout for APIs, Services, Apps, ...
1671
+ # Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
1672
+ # @param submit_self_service_logout_flow_without_browser_body [SubmitSelfServiceLogoutFlowWithoutBrowserBody]
1673
+ # @param [Hash] opts the optional parameters
1674
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1675
+ def submit_self_service_logout_flow_without_browser_with_http_info(submit_self_service_logout_flow_without_browser_body, opts = {})
1676
+ if @api_client.config.debugging
1677
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_logout_flow_without_browser ...'
1678
+ end
1679
+ # verify the required parameter 'submit_self_service_logout_flow_without_browser_body' is set
1680
+ if @api_client.config.client_side_validation && submit_self_service_logout_flow_without_browser_body.nil?
1681
+ fail ArgumentError, "Missing the required parameter 'submit_self_service_logout_flow_without_browser_body' when calling V0alpha2Api.submit_self_service_logout_flow_without_browser"
1682
+ end
1683
+ # resource path
1684
+ local_var_path = '/api/kratos/public/self-service/logout/api'
1685
+
1686
+ # query parameters
1687
+ query_params = opts[:query_params] || {}
1688
+
1689
+ # header parameters
1690
+ header_params = opts[:header_params] || {}
1691
+ # HTTP header 'Accept' (if needed)
1692
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1693
+ # HTTP header 'Content-Type'
1694
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1695
+
1696
+ # form parameters
1697
+ form_params = opts[:form_params] || {}
1698
+
1699
+ # http body (model)
1700
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(submit_self_service_logout_flow_without_browser_body)
1701
+
1702
+ # return_type
1703
+ return_type = opts[:debug_return_type]
1704
+
1705
+ # auth_names
1706
+ auth_names = opts[:debug_auth_names] || []
1707
+
1708
+ new_options = opts.merge(
1709
+ :operation => :"V0alpha2Api.submit_self_service_logout_flow_without_browser",
1710
+ :header_params => header_params,
1711
+ :query_params => query_params,
1712
+ :form_params => form_params,
1713
+ :body => post_body,
1714
+ :auth_names => auth_names,
1715
+ :return_type => return_type
1716
+ )
1717
+
1718
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1719
+ if @api_client.config.debugging
1720
+ @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_logout_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1721
+ end
1722
+ return data, status_code, headers
1723
+ end
1724
+
1725
+ # Complete Recovery Flow
1726
+ # Use this endpoint to complete a recovery flow. 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 and Browser clients with HTTP Header `Accept: application/json` 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 without HTTP Header `Accept` or with `Accept: text/*` 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` for the `link` 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).
1727
+ # @param flow [String] The Recovery Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
1728
+ # @param [Hash] opts the optional parameters
1729
+ # @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. This parameter is usually set in a link and not used by any direct API call.
1730
+ # @option opts [SubmitSelfServiceRecoveryFlowBody] :submit_self_service_recovery_flow_body
1731
+ # @return [SelfServiceRecoveryFlow]
1732
+ def submit_self_service_recovery_flow(flow, opts = {})
1733
+ data, _status_code, _headers = submit_self_service_recovery_flow_with_http_info(flow, opts)
1734
+ data
1735
+ end
1736
+
1737
+ # Complete Recovery Flow
1738
+ # Use this endpoint to complete a recovery flow. 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 and Browser clients with HTTP Header &#x60;Accept: application/json&#x60; 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 without HTTP Header &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; 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; for the &#x60;link&#x60; 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 &#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).
1739
+ # @param flow [String] The Recovery Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).
1740
+ # @param [Hash] opts the optional parameters
1741
+ # @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. This parameter is usually set in a link and not used by any direct API call.
1742
+ # @option opts [SubmitSelfServiceRecoveryFlowBody] :submit_self_service_recovery_flow_body
1743
+ # @return [Array<(SelfServiceRecoveryFlow, Integer, Hash)>] SelfServiceRecoveryFlow data, response status code and response headers
1744
+ def submit_self_service_recovery_flow_with_http_info(flow, opts = {})
1745
+ if @api_client.config.debugging
1746
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_recovery_flow ...'
1747
+ end
1748
+ # verify the required parameter 'flow' is set
1749
+ if @api_client.config.client_side_validation && flow.nil?
1750
+ fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_recovery_flow"
1751
+ end
1752
+ # resource path
1753
+ local_var_path = '/api/kratos/public/self-service/recovery'
1754
+
1755
+ # query parameters
1756
+ query_params = opts[:query_params] || {}
1757
+ query_params[:'flow'] = flow
1758
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
1759
+
1760
+ # header parameters
1761
+ header_params = opts[:header_params] || {}
1762
+ # HTTP header 'Accept' (if needed)
1763
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1764
+ # HTTP header 'Content-Type'
1765
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
1766
+
1767
+ # form parameters
1768
+ form_params = opts[:form_params] || {}
1769
+
1770
+ # http body (model)
1771
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_recovery_flow_body'])
1772
+
1773
+ # return_type
1774
+ return_type = opts[:debug_return_type] || 'SelfServiceRecoveryFlow'
1775
+
1776
+ # auth_names
1777
+ auth_names = opts[:debug_auth_names] || []
1778
+
1779
+ new_options = opts.merge(
1780
+ :operation => :"V0alpha2Api.submit_self_service_recovery_flow",
1781
+ :header_params => header_params,
1782
+ :query_params => query_params,
1783
+ :form_params => form_params,
1784
+ :body => post_body,
1785
+ :auth_names => auth_names,
1786
+ :return_type => return_type
1787
+ )
1788
+
1789
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1790
+ if @api_client.config.debugging
1791
+ @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1792
+ end
1793
+ return data, status_code, headers
1794
+ end
1795
+
1796
+ # Submit a Registration Flow
1797
+ # 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 a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond 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. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header 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. 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).
1798
+ # @param flow [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;).
1799
+ # @param [Hash] opts the optional parameters
1800
+ # @option opts [SubmitSelfServiceRegistrationFlowBody] :submit_self_service_registration_flow_body
1801
+ # @return [SuccessfulSelfServiceRegistrationWithoutBrowser]
1802
+ def submit_self_service_registration_flow(flow, opts = {})
1803
+ data, _status_code, _headers = submit_self_service_registration_flow_with_http_info(flow, opts)
1804
+ data
1805
+ end
1806
+
1807
+ # Submit a Registration Flow
1808
+ # 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 a Content-Type of &#x60;application/x-www-form-urlencoded&#x60; or &#x60;application/json&#x60; to be sent in the body and respond 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. Browser flows with an accept header of &#x60;application/json&#x60; will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a &#x60;Set-Cookie&#x60; header 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. 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).
1809
+ # @param flow [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;).
1810
+ # @param [Hash] opts the optional parameters
1811
+ # @option opts [SubmitSelfServiceRegistrationFlowBody] :submit_self_service_registration_flow_body
1812
+ # @return [Array<(SuccessfulSelfServiceRegistrationWithoutBrowser, Integer, Hash)>] SuccessfulSelfServiceRegistrationWithoutBrowser data, response status code and response headers
1813
+ def submit_self_service_registration_flow_with_http_info(flow, opts = {})
1814
+ if @api_client.config.debugging
1815
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_registration_flow ...'
1816
+ end
1817
+ # verify the required parameter 'flow' is set
1818
+ if @api_client.config.client_side_validation && flow.nil?
1819
+ fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_registration_flow"
1820
+ end
1821
+ # resource path
1822
+ local_var_path = '/api/kratos/public/self-service/registration'
1823
+
1824
+ # query parameters
1825
+ query_params = opts[:query_params] || {}
1826
+ query_params[:'flow'] = flow
1827
+
1828
+ # header parameters
1829
+ header_params = opts[:header_params] || {}
1830
+ # HTTP header 'Accept' (if needed)
1831
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1832
+ # HTTP header 'Content-Type'
1833
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
1834
+
1835
+ # form parameters
1836
+ form_params = opts[:form_params] || {}
1837
+
1838
+ # http body (model)
1839
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_registration_flow_body'])
1840
+
1841
+ # return_type
1842
+ return_type = opts[:debug_return_type] || 'SuccessfulSelfServiceRegistrationWithoutBrowser'
1843
+
1844
+ # auth_names
1845
+ auth_names = opts[:debug_auth_names] || []
1846
+
1847
+ new_options = opts.merge(
1848
+ :operation => :"V0alpha2Api.submit_self_service_registration_flow",
1849
+ :header_params => header_params,
1850
+ :query_params => query_params,
1851
+ :form_params => form_params,
1852
+ :body => post_body,
1853
+ :auth_names => auth_names,
1854
+ :return_type => return_type
1855
+ )
1856
+
1857
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1858
+ if @api_client.config.debugging
1859
+ @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1860
+ end
1861
+ return data, status_code, headers
1862
+ end
1863
+
1864
+ # Complete Settings Flow
1865
+ # 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 or the session's AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header `Accept` or with `Accept: text/*` respond 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 or the session's AAL is too low. Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
1866
+ # @param flow [String] 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;).
1867
+ # @param [Hash] opts the optional parameters
1868
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1869
+ # @option opts [SubmitSelfServiceSettingsFlowBody] :submit_self_service_settings_flow_body
1870
+ # @return [SelfServiceSettingsFlow]
1871
+ def submit_self_service_settings_flow(flow, opts = {})
1872
+ data, _status_code, _headers = submit_self_service_settings_flow_with_http_info(flow, opts)
1873
+ data
1874
+ end
1875
+
1876
+ # Complete Settings Flow
1877
+ # 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 or the session&#39;s AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; respond 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 or the session&#39;s AAL is too low. Browser flows with HTTP Header &#x60;Accept: application/json&#x60; respond with HTTP 200 and a application/json body with the signed in identity and a &#x60;Set-Cookie&#x60; header on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 403 when the page is accessed without a session cookie or the session&#39;s AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
1878
+ # @param flow [String] 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;).
1879
+ # @param [Hash] opts the optional parameters
1880
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1881
+ # @option opts [SubmitSelfServiceSettingsFlowBody] :submit_self_service_settings_flow_body
1882
+ # @return [Array<(SelfServiceSettingsFlow, Integer, Hash)>] SelfServiceSettingsFlow data, response status code and response headers
1883
+ def submit_self_service_settings_flow_with_http_info(flow, opts = {})
1884
+ if @api_client.config.debugging
1885
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_settings_flow ...'
1886
+ end
1887
+ # verify the required parameter 'flow' is set
1888
+ if @api_client.config.client_side_validation && flow.nil?
1889
+ fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_settings_flow"
1890
+ end
1891
+ # resource path
1892
+ local_var_path = '/api/kratos/public/self-service/settings'
1893
+
1894
+ # query parameters
1895
+ query_params = opts[:query_params] || {}
1896
+ query_params[:'flow'] = flow
1897
+
1898
+ # header parameters
1899
+ header_params = opts[:header_params] || {}
1900
+ # HTTP header 'Accept' (if needed)
1901
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1902
+ # HTTP header 'Content-Type'
1903
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
1904
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
1905
+
1906
+ # form parameters
1907
+ form_params = opts[:form_params] || {}
1908
+
1909
+ # http body (model)
1910
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_settings_flow_body'])
1911
+
1912
+ # return_type
1913
+ return_type = opts[:debug_return_type] || 'SelfServiceSettingsFlow'
1914
+
1915
+ # auth_names
1916
+ auth_names = opts[:debug_auth_names] || []
1917
+
1918
+ new_options = opts.merge(
1919
+ :operation => :"V0alpha2Api.submit_self_service_settings_flow",
1920
+ :header_params => header_params,
1921
+ :query_params => query_params,
1922
+ :form_params => form_params,
1923
+ :body => post_body,
1924
+ :auth_names => auth_names,
1925
+ :return_type => return_type
1926
+ )
1927
+
1928
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1929
+ if @api_client.config.debugging
1930
+ @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1931
+ end
1932
+ return data, status_code, headers
1933
+ end
1934
+
1935
+ # Complete Verification Flow
1936
+ # Use this endpoint to complete a verification flow. 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 and Browser clients with HTTP Header `Accept: application/json` 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 without HTTP Header `Accept` or with `Accept: text/*` 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` when using the `link` 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).
1937
+ # @param flow [String] The Verification Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
1938
+ # @param [Hash] opts the optional parameters
1939
+ # @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. This parameter is usually set in a link and not used by any direct API call.
1940
+ # @option opts [SubmitSelfServiceVerificationFlowBody] :submit_self_service_verification_flow_body
1941
+ # @return [SelfServiceVerificationFlow]
1942
+ def submit_self_service_verification_flow(flow, opts = {})
1943
+ data, _status_code, _headers = submit_self_service_verification_flow_with_http_info(flow, opts)
1944
+ data
1945
+ end
1946
+
1947
+ # Complete Verification Flow
1948
+ # Use this endpoint to complete a verification flow. 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 and Browser clients with HTTP Header &#x60;Accept: application/json&#x60; 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 without HTTP Header &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; 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; when using the &#x60;link&#x60; 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 &#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).
1949
+ # @param flow [String] The Verification Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).
1950
+ # @param [Hash] opts the optional parameters
1951
+ # @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. This parameter is usually set in a link and not used by any direct API call.
1952
+ # @option opts [SubmitSelfServiceVerificationFlowBody] :submit_self_service_verification_flow_body
1953
+ # @return [Array<(SelfServiceVerificationFlow, Integer, Hash)>] SelfServiceVerificationFlow data, response status code and response headers
1954
+ def submit_self_service_verification_flow_with_http_info(flow, opts = {})
1955
+ if @api_client.config.debugging
1956
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_verification_flow ...'
1957
+ end
1958
+ # verify the required parameter 'flow' is set
1959
+ if @api_client.config.client_side_validation && flow.nil?
1960
+ fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_verification_flow"
1961
+ end
1962
+ # resource path
1963
+ local_var_path = '/api/kratos/public/self-service/verification'
1964
+
1965
+ # query parameters
1966
+ query_params = opts[:query_params] || {}
1967
+ query_params[:'flow'] = flow
1968
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
1969
+
1970
+ # header parameters
1971
+ header_params = opts[:header_params] || {}
1972
+ # HTTP header 'Accept' (if needed)
1973
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1974
+ # HTTP header 'Content-Type'
1975
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
1976
+
1977
+ # form parameters
1978
+ form_params = opts[:form_params] || {}
1979
+
1980
+ # http body (model)
1981
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_verification_flow_body'])
1982
+
1983
+ # return_type
1984
+ return_type = opts[:debug_return_type] || 'SelfServiceVerificationFlow'
1985
+
1986
+ # auth_names
1987
+ auth_names = opts[:debug_auth_names] || []
1988
+
1989
+ new_options = opts.merge(
1990
+ :operation => :"V0alpha2Api.submit_self_service_verification_flow",
1991
+ :header_params => header_params,
1992
+ :query_params => query_params,
1993
+ :form_params => form_params,
1994
+ :body => post_body,
1995
+ :auth_names => auth_names,
1996
+ :return_type => return_type
1997
+ )
1998
+
1999
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2000
+ if @api_client.config.debugging
2001
+ @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2002
+ end
2003
+ return data, status_code, headers
2004
+ end
2005
+
2006
+ # Check Who the Current HTTP Session Belongs To
2007
+ # 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. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: ```js pseudo-code example router.get('/protected-endpoint', async function (req, res) { const session = await client.toSession(undefined, req.header('cookie')) console.log(session) }) ``` When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\") console.log(session) ``` Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. This endpoint is useful for: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header! This endpoint authenticates users by checking if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code.
2008
+ # @param [Hash] opts the optional parameters
2009
+ # @option opts [String] :x_session_token Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
2010
+ # @option opts [String] :cookie Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.
2011
+ # @return [Session]
2012
+ def to_session(opts = {})
2013
+ data, _status_code, _headers = to_session_with_http_info(opts)
2014
+ data
2015
+ end
2016
+
2017
+ # Check Who the Current HTTP Session Belongs To
2018
+ # 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. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/protected-endpoint&#39;, async function (req, res) { const session &#x3D; await client.toSession(undefined, req.header(&#39;cookie&#39;)) console.log(session) }) &#x60;&#x60;&#x60; When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: &#x60;&#x60;&#x60;js pseudo-code example ... const session &#x3D; await client.toSession(\&quot;the-session-token\&quot;) console.log(session) &#x60;&#x60;&#x60; Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. This endpoint is useful for: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the &#x60;X-Session-Token&#x60; header! This endpoint authenticates users by checking if the &#x60;Cookie&#x60; HTTP header was set containing an Ory Kratos Session Cookie; if the &#x60;Authorization: bearer &lt;ory-session-token&gt;&#x60; HTTP header was set with a valid Ory Kratos Session Token; if the &#x60;X-Session-Token&#x60; HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code.
2019
+ # @param [Hash] opts the optional parameters
2020
+ # @option opts [String] :x_session_token Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
2021
+ # @option opts [String] :cookie Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.
2022
+ # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
2023
+ def to_session_with_http_info(opts = {})
2024
+ if @api_client.config.debugging
2025
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.to_session ...'
2026
+ end
2027
+ # resource path
2028
+ local_var_path = '/api/kratos/public/sessions/whoami'
2029
+
2030
+ # query parameters
2031
+ query_params = opts[:query_params] || {}
2032
+
2033
+ # header parameters
2034
+ header_params = opts[:header_params] || {}
2035
+ # HTTP header 'Accept' (if needed)
2036
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2037
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
2038
+ header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
2039
+
2040
+ # form parameters
2041
+ form_params = opts[:form_params] || {}
2042
+
2043
+ # http body (model)
2044
+ post_body = opts[:debug_body]
2045
+
2046
+ # return_type
2047
+ return_type = opts[:debug_return_type] || 'Session'
2048
+
2049
+ # auth_names
2050
+ auth_names = opts[:debug_auth_names] || []
2051
+
2052
+ new_options = opts.merge(
2053
+ :operation => :"V0alpha2Api.to_session",
2054
+ :header_params => header_params,
2055
+ :query_params => query_params,
2056
+ :form_params => form_params,
2057
+ :body => post_body,
2058
+ :auth_names => auth_names,
2059
+ :return_type => return_type
2060
+ )
2061
+
2062
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2063
+ if @api_client.config.debugging
2064
+ @api_client.config.logger.debug "API called: V0alpha2Api#to_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2065
+ end
2066
+ return data, status_code, headers
2067
+ end
2068
+ end
2069
+ end