ory-client-client 0.0.1.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +231 -0
  4. data/Rakefile +10 -0
  5. data/docs/AuthenticateOKBody.md +20 -0
  6. data/docs/ContainerChangeResponseItem.md +20 -0
  7. data/docs/ContainerCreateCreatedBody.md +20 -0
  8. data/docs/ContainerTopOKBody.md +20 -0
  9. data/docs/ContainerUpdateOKBody.md +18 -0
  10. data/docs/ContainerWaitOKBody.md +20 -0
  11. data/docs/ContainerWaitOKBodyError.md +18 -0
  12. data/docs/CreateIdentity.md +20 -0
  13. data/docs/CreateRecoveryLink.md +20 -0
  14. data/docs/DefaultApi.md +2902 -0
  15. data/docs/ErrorContainer.md +20 -0
  16. data/docs/ErrorResponse.md +18 -0
  17. data/docs/GenericError.md +30 -0
  18. data/docs/GraphDriverData.md +20 -0
  19. data/docs/HealthNotReadyStatus.md +18 -0
  20. data/docs/HealthStatus.md +18 -0
  21. data/docs/IdResponse.md +18 -0
  22. data/docs/Identity.md +28 -0
  23. data/docs/IdentityCredentials.md +22 -0
  24. data/docs/ImageDeleteResponseItem.md +20 -0
  25. data/docs/ImageSummary.md +36 -0
  26. data/docs/InlineResponse200.md +18 -0
  27. data/docs/InlineResponse2001.md +18 -0
  28. data/docs/InlineResponse503.md +18 -0
  29. data/docs/JsonError.md +18 -0
  30. data/docs/LoginFlow.md +32 -0
  31. data/docs/LoginViaApiResponse.md +20 -0
  32. data/docs/Meta.md +18 -0
  33. data/docs/Plugin.md +28 -0
  34. data/docs/PluginConfig.md +48 -0
  35. data/docs/PluginConfigArgs.md +24 -0
  36. data/docs/PluginConfigInterface.md +20 -0
  37. data/docs/PluginConfigLinux.md +22 -0
  38. data/docs/PluginConfigNetwork.md +18 -0
  39. data/docs/PluginConfigRootfs.md +20 -0
  40. data/docs/PluginConfigUser.md +20 -0
  41. data/docs/PluginDevice.md +24 -0
  42. data/docs/PluginEnv.md +24 -0
  43. data/docs/PluginInterfaceType.md +22 -0
  44. data/docs/PluginMount.md +30 -0
  45. data/docs/PluginSettings.md +24 -0
  46. data/docs/Port.md +24 -0
  47. data/docs/RecoveryAddress.md +22 -0
  48. data/docs/RecoveryFlow.md +32 -0
  49. data/docs/RecoveryLink.md +20 -0
  50. data/docs/RegistrationFlow.md +30 -0
  51. data/docs/RegistrationViaApiResponse.md +22 -0
  52. data/docs/RevokeSession.md +18 -0
  53. data/docs/ServiceUpdateResponse.md +18 -0
  54. data/docs/Session.md +28 -0
  55. data/docs/SettingsFlow.md +34 -0
  56. data/docs/SettingsProfileFormConfig.md +24 -0
  57. data/docs/SettingsViaApiResponse.md +20 -0
  58. data/docs/SubmitSelfServiceBrowserSettingsOIDCFlowPayload.md +22 -0
  59. data/docs/SubmitSelfServiceLoginFlow.md +47 -0
  60. data/docs/SubmitSelfServiceLoginFlowWithPasswordMethod.md +24 -0
  61. data/docs/SubmitSelfServiceRecoveryFlowWithLinkMethod.md +20 -0
  62. data/docs/SubmitSelfServiceRegistrationFlow.md +47 -0
  63. data/docs/SubmitSelfServiceRegistrationFlowWithPasswordMethod.md +24 -0
  64. data/docs/SubmitSelfServiceSettingsFlow.md +49 -0
  65. data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethod.md +22 -0
  66. data/docs/SubmitSelfServiceSettingsFlowWithProfileMethod.md +22 -0
  67. data/docs/SubmitSelfServiceVerificationFlowWithLinkMethod.md +20 -0
  68. data/docs/UiContainer.md +24 -0
  69. data/docs/UiNode.md +26 -0
  70. data/docs/UiNodeAnchorAttributes.md +20 -0
  71. data/docs/UiNodeAttributes.md +53 -0
  72. data/docs/UiNodeImageAttributes.md +18 -0
  73. data/docs/UiNodeInputAttributes.md +30 -0
  74. data/docs/UiNodeInputAttributesValue.md +51 -0
  75. data/docs/UiNodeTextAttributes.md +18 -0
  76. data/docs/UiText.md +24 -0
  77. data/docs/UpdateIdentity.md +20 -0
  78. data/docs/VerifiableIdentityAddress.md +32 -0
  79. data/docs/VerificationFlow.md +32 -0
  80. data/docs/Version.md +18 -0
  81. data/docs/Volume.md +34 -0
  82. data/docs/VolumeUsageData.md +20 -0
  83. data/lib/ory-client-client.rb +117 -0
  84. data/lib/ory-client-client/api/default_api.rb +2690 -0
  85. data/lib/ory-client-client/api_client.rb +390 -0
  86. data/lib/ory-client-client/api_error.rb +57 -0
  87. data/lib/ory-client-client/configuration.rb +297 -0
  88. data/lib/ory-client-client/models/authenticate_ok_body.rb +240 -0
  89. data/lib/ory-client-client/models/container_change_response_item.rb +240 -0
  90. data/lib/ory-client-client/models/container_create_created_body.rb +242 -0
  91. data/lib/ory-client-client/models/container_top_ok_body.rb +244 -0
  92. data/lib/ory-client-client/models/container_update_ok_body.rb +227 -0
  93. data/lib/ory-client-client/models/container_wait_ok_body.rb +239 -0
  94. data/lib/ory-client-client/models/container_wait_ok_body_error.rb +220 -0
  95. data/lib/ory-client-client/models/create_identity.rb +239 -0
  96. data/lib/ory-client-client/models/create_recovery_link.rb +250 -0
  97. data/lib/ory-client-client/models/error_container.rb +240 -0
  98. data/lib/ory-client-client/models/error_response.rb +224 -0
  99. data/lib/ory-client-client/models/generic_error.rb +286 -0
  100. data/lib/ory-client-client/models/graph_driver_data.rb +241 -0
  101. data/lib/ory-client-client/models/health_not_ready_status.rb +221 -0
  102. data/lib/ory-client-client/models/health_status.rb +219 -0
  103. data/lib/ory-client-client/models/id_response.rb +225 -0
  104. data/lib/ory-client-client/models/identity.rb +289 -0
  105. data/lib/ory-client-client/models/identity_credentials.rb +241 -0
  106. data/lib/ory-client-client/models/image_delete_response_item.rb +230 -0
  107. data/lib/ory-client-client/models/image_summary.rb +366 -0
  108. data/lib/ory-client-client/models/inline_response200.rb +224 -0
  109. data/lib/ory-client-client/models/inline_response2001.rb +224 -0
  110. data/lib/ory-client-client/models/inline_response503.rb +226 -0
  111. data/lib/ory-client-client/models/json_error.rb +224 -0
  112. data/lib/ory-client-client/models/login_flow.rb +318 -0
  113. data/lib/ory-client-client/models/login_via_api_response.rb +239 -0
  114. data/lib/ory-client-client/models/meta.rb +219 -0
  115. data/lib/ory-client-client/models/plugin.rb +288 -0
  116. data/lib/ory-client-client/models/plugin_config.rb +434 -0
  117. data/lib/ory-client-client/models/plugin_config_args.rb +274 -0
  118. data/lib/ory-client-client/models/plugin_config_interface.rb +242 -0
  119. data/lib/ory-client-client/models/plugin_config_linux.rb +259 -0
  120. data/lib/ory-client-client/models/plugin_config_network.rb +225 -0
  121. data/lib/ory-client-client/models/plugin_config_rootfs.rb +232 -0
  122. data/lib/ory-client-client/models/plugin_config_user.rb +230 -0
  123. data/lib/ory-client-client/models/plugin_device.rb +272 -0
  124. data/lib/ory-client-client/models/plugin_env.rb +272 -0
  125. data/lib/ory-client-client/models/plugin_interface_type.rb +255 -0
  126. data/lib/ory-client-client/models/plugin_mount.rb +319 -0
  127. data/lib/ory-client-client/models/plugin_settings.rb +277 -0
  128. data/lib/ory-client-client/models/port.rb +260 -0
  129. data/lib/ory-client-client/models/recovery_address.rb +251 -0
  130. data/lib/ory-client-client/models/recovery_flow.rb +317 -0
  131. data/lib/ory-client-client/models/recovery_link.rb +234 -0
  132. data/lib/ory-client-client/models/registration_flow.rb +302 -0
  133. data/lib/ory-client-client/models/registration_via_api_response.rb +248 -0
  134. data/lib/ory-client-client/models/revoke_session.rb +224 -0
  135. data/lib/ory-client-client/models/service_update_response.rb +222 -0
  136. data/lib/ory-client-client/models/session.rb +288 -0
  137. data/lib/ory-client-client/models/settings_flow.rb +331 -0
  138. data/lib/ory-client-client/models/settings_profile_form_config.rb +266 -0
  139. data/lib/ory-client-client/models/settings_via_api_response.rb +238 -0
  140. data/lib/ory-client-client/models/submit_self_service_browser_settings_oidc_flow_payload.rb +239 -0
  141. data/lib/ory-client-client/models/submit_self_service_login_flow.rb +104 -0
  142. data/lib/ory-client-client/models/submit_self_service_login_flow_with_password_method.rb +249 -0
  143. data/lib/ory-client-client/models/submit_self_service_recovery_flow_with_link_method.rb +229 -0
  144. data/lib/ory-client-client/models/submit_self_service_registration_flow.rb +104 -0
  145. data/lib/ory-client-client/models/submit_self_service_registration_flow_with_password_method.rb +276 -0
  146. data/lib/ory-client-client/models/submit_self_service_settings_flow.rb +105 -0
  147. data/lib/ory-client-client/models/submit_self_service_settings_flow_with_password_method.rb +244 -0
  148. data/lib/ory-client-client/models/submit_self_service_settings_flow_with_profile_method.rb +245 -0
  149. data/lib/ory-client-client/models/submit_self_service_verification_flow_with_link_method.rb +230 -0
  150. data/lib/ory-client-client/models/ui_container.rb +267 -0
  151. data/lib/ory-client-client/models/ui_node.rb +282 -0
  152. data/lib/ory-client-client/models/ui_node_anchor_attributes.rb +238 -0
  153. data/lib/ory-client-client/models/ui_node_attributes.rb +107 -0
  154. data/lib/ory-client-client/models/ui_node_image_attributes.rb +224 -0
  155. data/lib/ory-client-client/models/ui_node_input_attributes.rb +292 -0
  156. data/lib/ory-client-client/models/ui_node_input_attributes_value.rb +106 -0
  157. data/lib/ory-client-client/models/ui_node_text_attributes.rb +223 -0
  158. data/lib/ory-client-client/models/ui_text.rb +262 -0
  159. data/lib/ory-client-client/models/update_identity.rb +234 -0
  160. data/lib/ory-client-client/models/verifiable_identity_address.rb +313 -0
  161. data/lib/ory-client-client/models/verification_flow.rb +307 -0
  162. data/lib/ory-client-client/models/version.rb +219 -0
  163. data/lib/ory-client-client/models/volume.rb +335 -0
  164. data/lib/ory-client-client/models/volume_usage_data.rb +240 -0
  165. data/lib/ory-client-client/version.rb +15 -0
  166. data/ory-client-client.gemspec +38 -0
  167. data/spec/api/default_api_spec.rb +544 -0
  168. data/spec/api_client_spec.rb +226 -0
  169. data/spec/configuration_spec.rb +42 -0
  170. data/spec/models/authenticate_ok_body_spec.rb +40 -0
  171. data/spec/models/container_change_response_item_spec.rb +40 -0
  172. data/spec/models/container_create_created_body_spec.rb +40 -0
  173. data/spec/models/container_top_ok_body_spec.rb +40 -0
  174. data/spec/models/container_update_ok_body_spec.rb +34 -0
  175. data/spec/models/container_wait_ok_body_error_spec.rb +34 -0
  176. data/spec/models/container_wait_ok_body_spec.rb +40 -0
  177. data/spec/models/create_identity_spec.rb +40 -0
  178. data/spec/models/create_recovery_link_spec.rb +40 -0
  179. data/spec/models/error_container_spec.rb +40 -0
  180. data/spec/models/error_response_spec.rb +34 -0
  181. data/spec/models/generic_error_spec.rb +70 -0
  182. data/spec/models/graph_driver_data_spec.rb +40 -0
  183. data/spec/models/health_not_ready_status_spec.rb +34 -0
  184. data/spec/models/health_status_spec.rb +34 -0
  185. data/spec/models/id_response_spec.rb +34 -0
  186. data/spec/models/identity_credentials_spec.rb +46 -0
  187. data/spec/models/identity_spec.rb +64 -0
  188. data/spec/models/image_delete_response_item_spec.rb +40 -0
  189. data/spec/models/image_summary_spec.rb +88 -0
  190. data/spec/models/inline_response2001_spec.rb +34 -0
  191. data/spec/models/inline_response200_spec.rb +34 -0
  192. data/spec/models/inline_response503_spec.rb +34 -0
  193. data/spec/models/json_error_spec.rb +34 -0
  194. data/spec/models/login_flow_spec.rb +76 -0
  195. data/spec/models/login_via_api_response_spec.rb +40 -0
  196. data/spec/models/meta_spec.rb +34 -0
  197. data/spec/models/plugin_config_args_spec.rb +52 -0
  198. data/spec/models/plugin_config_interface_spec.rb +40 -0
  199. data/spec/models/plugin_config_linux_spec.rb +46 -0
  200. data/spec/models/plugin_config_network_spec.rb +34 -0
  201. data/spec/models/plugin_config_rootfs_spec.rb +40 -0
  202. data/spec/models/plugin_config_spec.rb +124 -0
  203. data/spec/models/plugin_config_user_spec.rb +40 -0
  204. data/spec/models/plugin_device_spec.rb +52 -0
  205. data/spec/models/plugin_env_spec.rb +52 -0
  206. data/spec/models/plugin_interface_type_spec.rb +46 -0
  207. data/spec/models/plugin_mount_spec.rb +70 -0
  208. data/spec/models/plugin_settings_spec.rb +52 -0
  209. data/spec/models/plugin_spec.rb +64 -0
  210. data/spec/models/port_spec.rb +52 -0
  211. data/spec/models/recovery_address_spec.rb +46 -0
  212. data/spec/models/recovery_flow_spec.rb +76 -0
  213. data/spec/models/recovery_link_spec.rb +40 -0
  214. data/spec/models/registration_flow_spec.rb +70 -0
  215. data/spec/models/registration_via_api_response_spec.rb +46 -0
  216. data/spec/models/revoke_session_spec.rb +34 -0
  217. data/spec/models/service_update_response_spec.rb +34 -0
  218. data/spec/models/session_spec.rb +64 -0
  219. data/spec/models/settings_flow_spec.rb +82 -0
  220. data/spec/models/settings_profile_form_config_spec.rb +52 -0
  221. data/spec/models/settings_via_api_response_spec.rb +40 -0
  222. data/spec/models/submit_self_service_browser_settings_oidc_flow_payload_spec.rb +46 -0
  223. data/spec/models/submit_self_service_login_flow_spec.rb +31 -0
  224. data/spec/models/submit_self_service_login_flow_with_password_method_spec.rb +52 -0
  225. data/spec/models/submit_self_service_recovery_flow_with_link_method_spec.rb +40 -0
  226. data/spec/models/submit_self_service_registration_flow_spec.rb +31 -0
  227. data/spec/models/submit_self_service_registration_flow_with_password_method_spec.rb +52 -0
  228. data/spec/models/submit_self_service_settings_flow_spec.rb +31 -0
  229. data/spec/models/submit_self_service_settings_flow_with_password_method_spec.rb +46 -0
  230. data/spec/models/submit_self_service_settings_flow_with_profile_method_spec.rb +46 -0
  231. data/spec/models/submit_self_service_verification_flow_with_link_method_spec.rb +40 -0
  232. data/spec/models/ui_container_spec.rb +52 -0
  233. data/spec/models/ui_node_anchor_attributes_spec.rb +40 -0
  234. data/spec/models/ui_node_attributes_spec.rb +31 -0
  235. data/spec/models/ui_node_image_attributes_spec.rb +34 -0
  236. data/spec/models/ui_node_input_attributes_spec.rb +70 -0
  237. data/spec/models/ui_node_input_attributes_value_spec.rb +31 -0
  238. data/spec/models/ui_node_spec.rb +58 -0
  239. data/spec/models/ui_node_text_attributes_spec.rb +34 -0
  240. data/spec/models/ui_text_spec.rb +52 -0
  241. data/spec/models/update_identity_spec.rb +40 -0
  242. data/spec/models/verifiable_identity_address_spec.rb +76 -0
  243. data/spec/models/verification_flow_spec.rb +76 -0
  244. data/spec/models/version_spec.rb +34 -0
  245. data/spec/models/volume_spec.rb +82 -0
  246. data/spec/models/volume_usage_data_spec.rb +40 -0
  247. data/spec/spec_helper.rb +111 -0
  248. metadata +413 -0
@@ -0,0 +1,20 @@
1
+ # OryHydraClient::VolumeUsageData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ref_count** | **Integer** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | |
8
+ | **size** | **Integer** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ory-client-client'
14
+
15
+ instance = OryHydraClient::VolumeUsageData.new(
16
+ ref_count: null,
17
+ size: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,117 @@
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.1
7
+ Contact: support@ory.sh
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'ory-client-client/api_client'
15
+ require 'ory-client-client/api_error'
16
+ require 'ory-client-client/version'
17
+ require 'ory-client-client/configuration'
18
+
19
+ # Models
20
+ require 'ory-client-client/models/authenticate_ok_body'
21
+ require 'ory-client-client/models/container_change_response_item'
22
+ require 'ory-client-client/models/container_create_created_body'
23
+ require 'ory-client-client/models/container_top_ok_body'
24
+ require 'ory-client-client/models/container_update_ok_body'
25
+ require 'ory-client-client/models/container_wait_ok_body'
26
+ require 'ory-client-client/models/container_wait_ok_body_error'
27
+ require 'ory-client-client/models/create_identity'
28
+ require 'ory-client-client/models/create_recovery_link'
29
+ require 'ory-client-client/models/error_container'
30
+ require 'ory-client-client/models/error_response'
31
+ require 'ory-client-client/models/generic_error'
32
+ require 'ory-client-client/models/graph_driver_data'
33
+ require 'ory-client-client/models/health_not_ready_status'
34
+ require 'ory-client-client/models/health_status'
35
+ require 'ory-client-client/models/id_response'
36
+ require 'ory-client-client/models/identity'
37
+ require 'ory-client-client/models/identity_credentials'
38
+ require 'ory-client-client/models/image_delete_response_item'
39
+ require 'ory-client-client/models/image_summary'
40
+ require 'ory-client-client/models/inline_response200'
41
+ require 'ory-client-client/models/inline_response2001'
42
+ require 'ory-client-client/models/inline_response503'
43
+ require 'ory-client-client/models/json_error'
44
+ require 'ory-client-client/models/login_flow'
45
+ require 'ory-client-client/models/login_via_api_response'
46
+ require 'ory-client-client/models/meta'
47
+ require 'ory-client-client/models/plugin'
48
+ require 'ory-client-client/models/plugin_config'
49
+ require 'ory-client-client/models/plugin_config_args'
50
+ require 'ory-client-client/models/plugin_config_interface'
51
+ require 'ory-client-client/models/plugin_config_linux'
52
+ require 'ory-client-client/models/plugin_config_network'
53
+ require 'ory-client-client/models/plugin_config_rootfs'
54
+ require 'ory-client-client/models/plugin_config_user'
55
+ require 'ory-client-client/models/plugin_device'
56
+ require 'ory-client-client/models/plugin_env'
57
+ require 'ory-client-client/models/plugin_interface_type'
58
+ require 'ory-client-client/models/plugin_mount'
59
+ require 'ory-client-client/models/plugin_settings'
60
+ require 'ory-client-client/models/port'
61
+ require 'ory-client-client/models/recovery_address'
62
+ require 'ory-client-client/models/recovery_flow'
63
+ require 'ory-client-client/models/recovery_link'
64
+ require 'ory-client-client/models/registration_flow'
65
+ require 'ory-client-client/models/registration_via_api_response'
66
+ require 'ory-client-client/models/revoke_session'
67
+ require 'ory-client-client/models/service_update_response'
68
+ require 'ory-client-client/models/session'
69
+ require 'ory-client-client/models/settings_flow'
70
+ require 'ory-client-client/models/settings_profile_form_config'
71
+ require 'ory-client-client/models/settings_via_api_response'
72
+ require 'ory-client-client/models/submit_self_service_browser_settings_oidc_flow_payload'
73
+ require 'ory-client-client/models/submit_self_service_login_flow'
74
+ require 'ory-client-client/models/submit_self_service_login_flow_with_password_method'
75
+ require 'ory-client-client/models/submit_self_service_recovery_flow_with_link_method'
76
+ require 'ory-client-client/models/submit_self_service_registration_flow'
77
+ require 'ory-client-client/models/submit_self_service_registration_flow_with_password_method'
78
+ require 'ory-client-client/models/submit_self_service_settings_flow'
79
+ require 'ory-client-client/models/submit_self_service_settings_flow_with_password_method'
80
+ require 'ory-client-client/models/submit_self_service_settings_flow_with_profile_method'
81
+ require 'ory-client-client/models/submit_self_service_verification_flow_with_link_method'
82
+ require 'ory-client-client/models/ui_container'
83
+ require 'ory-client-client/models/ui_node'
84
+ require 'ory-client-client/models/ui_node_anchor_attributes'
85
+ require 'ory-client-client/models/ui_node_attributes'
86
+ require 'ory-client-client/models/ui_node_image_attributes'
87
+ require 'ory-client-client/models/ui_node_input_attributes'
88
+ require 'ory-client-client/models/ui_node_input_attributes_value'
89
+ require 'ory-client-client/models/ui_node_text_attributes'
90
+ require 'ory-client-client/models/ui_text'
91
+ require 'ory-client-client/models/update_identity'
92
+ require 'ory-client-client/models/verifiable_identity_address'
93
+ require 'ory-client-client/models/verification_flow'
94
+ require 'ory-client-client/models/version'
95
+ require 'ory-client-client/models/volume'
96
+ require 'ory-client-client/models/volume_usage_data'
97
+
98
+ # APIs
99
+ require 'ory-client-client/api/default_api'
100
+
101
+ module OryHydraClient
102
+ class << self
103
+ # Customize default settings for the SDK using block.
104
+ # OryHydraClient.configure do |config|
105
+ # config.username = "xxx"
106
+ # config.password = "xxx"
107
+ # end
108
+ # If no block given, return the default Configuration object.
109
+ def configure
110
+ if block_given?
111
+ yield(Configuration.default)
112
+ else
113
+ Configuration.default
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,2690 @@
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.1
7
+ Contact: support@ory.sh
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module OryHydraClient
16
+ class DefaultApi
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 [CreateIdentity] :create_identity
26
+ # @return [Identity]
27
+ def create_identity_admin(opts = {})
28
+ data, _status_code, _headers = create_identity_admin_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&#39;s credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [Ory Kratos&#39; 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 [CreateIdentity] :create_identity
36
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
37
+ def create_identity_admin_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_identity_admin ...'
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[:'create_identity'])
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type] || 'Identity'
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['oryToken']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"DefaultApi.create_identity_admin",
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: DefaultApi#create_identity_admin\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 [CreateRecoveryLink] :create_recovery_link
87
+ # @return [RecoveryLink]
88
+ def create_recovery_link_admin(opts = {})
89
+ data, _status_code, _headers = create_recovery_link_admin_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 [CreateRecoveryLink] :create_recovery_link
97
+ # @return [Array<(RecoveryLink, Integer, Hash)>] RecoveryLink data, response status code and response headers
98
+ def create_recovery_link_admin_with_http_info(opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_recovery_link_admin ...'
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[:'create_recovery_link'])
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type] || 'RecoveryLink'
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['oryToken']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"DefaultApi.create_recovery_link_admin",
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: DefaultApi#create_recovery_link_admin\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 delete_identity_admin(id, opts = {})
150
+ delete_identity_admin_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 delete_identity_admin_with_http_info(id, opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug 'Calling API: DefaultApi.delete_identity_admin ...'
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 DefaultApi.delete_identity_admin"
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] || ['oryToken']
189
+
190
+ new_options = opts.merge(
191
+ :operation => :"DefaultApi.delete_identity_admin",
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: DefaultApi#delete_identity_admin\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 get_identity_admin(id, opts = {})
213
+ data, _status_code, _headers = get_identity_admin_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 get_identity_admin_with_http_info(id, opts = {})
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_identity_admin ...'
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 DefaultApi.get_identity_admin"
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] || ['oryToken']
252
+
253
+ new_options = opts.merge(
254
+ :operation => :"DefaultApi.get_identity_admin",
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: DefaultApi#get_identity_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ end
267
+ return data, status_code, headers
268
+ end
269
+
270
+ # Get a Traits Schema Definition
271
+ # @param id [String] ID must be set to the ID of schema you want to get
272
+ # @param [Hash] opts the optional parameters
273
+ # @return [Object]
274
+ def get_schema(id, opts = {})
275
+ data, _status_code, _headers = get_schema_with_http_info(id, opts)
276
+ data
277
+ end
278
+
279
+ # Get a Traits Schema Definition
280
+ # @param id [String] ID must be set to the ID of schema you want to get
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
283
+ def get_schema_with_http_info(id, opts = {})
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_schema ...'
286
+ end
287
+ # verify the required parameter 'id' is set
288
+ if @api_client.config.client_side_validation && id.nil?
289
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_schema"
290
+ end
291
+ # resource path
292
+ local_var_path = '/api/kratos/public/schemas/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
293
+
294
+ # query parameters
295
+ query_params = opts[:query_params] || {}
296
+
297
+ # header parameters
298
+ header_params = opts[:header_params] || {}
299
+ # HTTP header 'Accept' (if needed)
300
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
301
+
302
+ # form parameters
303
+ form_params = opts[:form_params] || {}
304
+
305
+ # http body (model)
306
+ post_body = opts[:debug_body]
307
+
308
+ # return_type
309
+ return_type = opts[:debug_return_type] || 'Object'
310
+
311
+ # auth_names
312
+ auth_names = opts[:debug_auth_names] || []
313
+
314
+ new_options = opts.merge(
315
+ :operation => :"DefaultApi.get_schema",
316
+ :header_params => header_params,
317
+ :query_params => query_params,
318
+ :form_params => form_params,
319
+ :body => post_body,
320
+ :auth_names => auth_names,
321
+ :return_type => return_type
322
+ )
323
+
324
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
325
+ if @api_client.config.debugging
326
+ @api_client.config.logger.debug "API called: DefaultApi#get_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
327
+ end
328
+ return data, status_code, headers
329
+ end
330
+
331
+ # Get a Traits Schema Definition
332
+ # @param id [String] ID must be set to the ID of schema you want to get
333
+ # @param [Hash] opts the optional parameters
334
+ # @return [Object]
335
+ def get_schema_admin(id, opts = {})
336
+ data, _status_code, _headers = get_schema_admin_with_http_info(id, opts)
337
+ data
338
+ end
339
+
340
+ # Get a Traits Schema Definition
341
+ # @param id [String] ID must be set to the ID of schema you want to get
342
+ # @param [Hash] opts the optional parameters
343
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
344
+ def get_schema_admin_with_http_info(id, opts = {})
345
+ if @api_client.config.debugging
346
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_schema_admin ...'
347
+ end
348
+ # verify the required parameter 'id' is set
349
+ if @api_client.config.client_side_validation && id.nil?
350
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_schema_admin"
351
+ end
352
+ # resource path
353
+ local_var_path = '/api/kratos/admin/schemas/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
354
+
355
+ # query parameters
356
+ query_params = opts[:query_params] || {}
357
+
358
+ # header parameters
359
+ header_params = opts[:header_params] || {}
360
+ # HTTP header 'Accept' (if needed)
361
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
362
+
363
+ # form parameters
364
+ form_params = opts[:form_params] || {}
365
+
366
+ # http body (model)
367
+ post_body = opts[:debug_body]
368
+
369
+ # return_type
370
+ return_type = opts[:debug_return_type] || 'Object'
371
+
372
+ # auth_names
373
+ auth_names = opts[:debug_auth_names] || ['oryToken']
374
+
375
+ new_options = opts.merge(
376
+ :operation => :"DefaultApi.get_schema_admin",
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => return_type
383
+ )
384
+
385
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: DefaultApi#get_schema_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ return data, status_code, headers
390
+ end
391
+
392
+ # Get User-Facing Self-Service Errors
393
+ # This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
394
+ # @param error [String] Error is the container&#39;s ID
395
+ # @param [Hash] opts the optional parameters
396
+ # @return [ErrorContainer]
397
+ def get_self_service_error(error, opts = {})
398
+ data, _status_code, _headers = get_self_service_error_with_http_info(error, opts)
399
+ data
400
+ end
401
+
402
+ # Get User-Facing Self-Service Errors
403
+ # This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: &#x60;?error&#x3D;stub:500&#x60; - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
404
+ # @param error [String] Error is the container&#39;s ID
405
+ # @param [Hash] opts the optional parameters
406
+ # @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
407
+ def get_self_service_error_with_http_info(error, opts = {})
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_error ...'
410
+ end
411
+ # verify the required parameter 'error' is set
412
+ if @api_client.config.client_side_validation && error.nil?
413
+ fail ArgumentError, "Missing the required parameter 'error' when calling DefaultApi.get_self_service_error"
414
+ end
415
+ # resource path
416
+ local_var_path = '/api/kratos/public/self-service/errors'
417
+
418
+ # query parameters
419
+ query_params = opts[:query_params] || {}
420
+ query_params[:'error'] = error
421
+
422
+ # header parameters
423
+ header_params = opts[:header_params] || {}
424
+ # HTTP header 'Accept' (if needed)
425
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
426
+
427
+ # form parameters
428
+ form_params = opts[:form_params] || {}
429
+
430
+ # http body (model)
431
+ post_body = opts[:debug_body]
432
+
433
+ # return_type
434
+ return_type = opts[:debug_return_type] || 'ErrorContainer'
435
+
436
+ # auth_names
437
+ auth_names = opts[:debug_auth_names] || []
438
+
439
+ new_options = opts.merge(
440
+ :operation => :"DefaultApi.get_self_service_error",
441
+ :header_params => header_params,
442
+ :query_params => query_params,
443
+ :form_params => form_params,
444
+ :body => post_body,
445
+ :auth_names => auth_names,
446
+ :return_type => return_type
447
+ )
448
+
449
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
452
+ end
453
+ return data, status_code, headers
454
+ end
455
+
456
+ # Get User-Facing Self-Service Errors
457
+ # This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
458
+ # @param error [String] Error is the container&#39;s ID
459
+ # @param [Hash] opts the optional parameters
460
+ # @return [ErrorContainer]
461
+ def get_self_service_error_admin(error, opts = {})
462
+ data, _status_code, _headers = get_self_service_error_admin_with_http_info(error, opts)
463
+ data
464
+ end
465
+
466
+ # Get User-Facing Self-Service Errors
467
+ # This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: &#x60;?error&#x3D;stub:500&#x60; - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
468
+ # @param error [String] Error is the container&#39;s ID
469
+ # @param [Hash] opts the optional parameters
470
+ # @return [Array<(ErrorContainer, Integer, Hash)>] ErrorContainer data, response status code and response headers
471
+ def get_self_service_error_admin_with_http_info(error, opts = {})
472
+ if @api_client.config.debugging
473
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_error_admin ...'
474
+ end
475
+ # verify the required parameter 'error' is set
476
+ if @api_client.config.client_side_validation && error.nil?
477
+ fail ArgumentError, "Missing the required parameter 'error' when calling DefaultApi.get_self_service_error_admin"
478
+ end
479
+ # resource path
480
+ local_var_path = '/api/kratos/admin/self-service/errors'
481
+
482
+ # query parameters
483
+ query_params = opts[:query_params] || {}
484
+ query_params[:'error'] = error
485
+
486
+ # header parameters
487
+ header_params = opts[:header_params] || {}
488
+ # HTTP header 'Accept' (if needed)
489
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
490
+
491
+ # form parameters
492
+ form_params = opts[:form_params] || {}
493
+
494
+ # http body (model)
495
+ post_body = opts[:debug_body]
496
+
497
+ # return_type
498
+ return_type = opts[:debug_return_type] || 'ErrorContainer'
499
+
500
+ # auth_names
501
+ auth_names = opts[:debug_auth_names] || ['oryToken']
502
+
503
+ new_options = opts.merge(
504
+ :operation => :"DefaultApi.get_self_service_error_admin",
505
+ :header_params => header_params,
506
+ :query_params => query_params,
507
+ :form_params => form_params,
508
+ :body => post_body,
509
+ :auth_names => auth_names,
510
+ :return_type => return_type
511
+ )
512
+
513
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
514
+ if @api_client.config.debugging
515
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_error_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
516
+ end
517
+ return data, status_code, headers
518
+ end
519
+
520
+ # Get Login Flow
521
+ # This endpoint returns a login flow's context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
522
+ # @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;).
523
+ # @param [Hash] opts the optional parameters
524
+ # @return [LoginFlow]
525
+ def get_self_service_login_flow(id, opts = {})
526
+ data, _status_code, _headers = get_self_service_login_flow_with_http_info(id, opts)
527
+ data
528
+ end
529
+
530
+ # Get Login Flow
531
+ # This endpoint returns a login flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
532
+ # @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;).
533
+ # @param [Hash] opts the optional parameters
534
+ # @return [Array<(LoginFlow, Integer, Hash)>] LoginFlow data, response status code and response headers
535
+ def get_self_service_login_flow_with_http_info(id, opts = {})
536
+ if @api_client.config.debugging
537
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_login_flow ...'
538
+ end
539
+ # verify the required parameter 'id' is set
540
+ if @api_client.config.client_side_validation && id.nil?
541
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_login_flow"
542
+ end
543
+ # resource path
544
+ local_var_path = '/api/kratos/public/self-service/login/flows'
545
+
546
+ # query parameters
547
+ query_params = opts[:query_params] || {}
548
+ query_params[:'id'] = id
549
+
550
+ # header parameters
551
+ header_params = opts[:header_params] || {}
552
+ # HTTP header 'Accept' (if needed)
553
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
554
+
555
+ # form parameters
556
+ form_params = opts[:form_params] || {}
557
+
558
+ # http body (model)
559
+ post_body = opts[:debug_body]
560
+
561
+ # return_type
562
+ return_type = opts[:debug_return_type] || 'LoginFlow'
563
+
564
+ # auth_names
565
+ auth_names = opts[:debug_auth_names] || []
566
+
567
+ new_options = opts.merge(
568
+ :operation => :"DefaultApi.get_self_service_login_flow",
569
+ :header_params => header_params,
570
+ :query_params => query_params,
571
+ :form_params => form_params,
572
+ :body => post_body,
573
+ :auth_names => auth_names,
574
+ :return_type => return_type
575
+ )
576
+
577
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
578
+ if @api_client.config.debugging
579
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
580
+ end
581
+ return data, status_code, headers
582
+ end
583
+
584
+ # Get Login Flow
585
+ # This endpoint returns a login flow's context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
586
+ # @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;).
587
+ # @param [Hash] opts the optional parameters
588
+ # @return [LoginFlow]
589
+ def get_self_service_login_flow_admin(id, opts = {})
590
+ data, _status_code, _headers = get_self_service_login_flow_admin_with_http_info(id, opts)
591
+ data
592
+ end
593
+
594
+ # Get Login Flow
595
+ # This endpoint returns a login flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
596
+ # @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;).
597
+ # @param [Hash] opts the optional parameters
598
+ # @return [Array<(LoginFlow, Integer, Hash)>] LoginFlow data, response status code and response headers
599
+ def get_self_service_login_flow_admin_with_http_info(id, opts = {})
600
+ if @api_client.config.debugging
601
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_login_flow_admin ...'
602
+ end
603
+ # verify the required parameter 'id' is set
604
+ if @api_client.config.client_side_validation && id.nil?
605
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_login_flow_admin"
606
+ end
607
+ # resource path
608
+ local_var_path = '/api/kratos/admin/self-service/login/flows'
609
+
610
+ # query parameters
611
+ query_params = opts[:query_params] || {}
612
+ query_params[:'id'] = id
613
+
614
+ # header parameters
615
+ header_params = opts[:header_params] || {}
616
+ # HTTP header 'Accept' (if needed)
617
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
618
+
619
+ # form parameters
620
+ form_params = opts[:form_params] || {}
621
+
622
+ # http body (model)
623
+ post_body = opts[:debug_body]
624
+
625
+ # return_type
626
+ return_type = opts[:debug_return_type] || 'LoginFlow'
627
+
628
+ # auth_names
629
+ auth_names = opts[:debug_auth_names] || ['oryToken']
630
+
631
+ new_options = opts.merge(
632
+ :operation => :"DefaultApi.get_self_service_login_flow_admin",
633
+ :header_params => header_params,
634
+ :query_params => query_params,
635
+ :form_params => form_params,
636
+ :body => post_body,
637
+ :auth_names => auth_names,
638
+ :return_type => return_type
639
+ )
640
+
641
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
642
+ if @api_client.config.debugging
643
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_login_flow_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
644
+ end
645
+ return data, status_code, headers
646
+ end
647
+
648
+ # Get information about a recovery flow
649
+ # This endpoint returns a recovery flow's context with, for example, error details and other information. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
650
+ # @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;).
651
+ # @param [Hash] opts the optional parameters
652
+ # @return [RecoveryFlow]
653
+ def get_self_service_recovery_flow(id, opts = {})
654
+ data, _status_code, _headers = get_self_service_recovery_flow_with_http_info(id, opts)
655
+ data
656
+ end
657
+
658
+ # Get information about a recovery flow
659
+ # This endpoint returns a recovery flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
660
+ # @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;).
661
+ # @param [Hash] opts the optional parameters
662
+ # @return [Array<(RecoveryFlow, Integer, Hash)>] RecoveryFlow data, response status code and response headers
663
+ def get_self_service_recovery_flow_with_http_info(id, opts = {})
664
+ if @api_client.config.debugging
665
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_recovery_flow ...'
666
+ end
667
+ # verify the required parameter 'id' is set
668
+ if @api_client.config.client_side_validation && id.nil?
669
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_recovery_flow"
670
+ end
671
+ # resource path
672
+ local_var_path = '/api/kratos/public/self-service/recovery/flows'
673
+
674
+ # query parameters
675
+ query_params = opts[:query_params] || {}
676
+ query_params[:'id'] = id
677
+
678
+ # header parameters
679
+ header_params = opts[:header_params] || {}
680
+ # HTTP header 'Accept' (if needed)
681
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
682
+
683
+ # form parameters
684
+ form_params = opts[:form_params] || {}
685
+
686
+ # http body (model)
687
+ post_body = opts[:debug_body]
688
+
689
+ # return_type
690
+ return_type = opts[:debug_return_type] || 'RecoveryFlow'
691
+
692
+ # auth_names
693
+ auth_names = opts[:debug_auth_names] || []
694
+
695
+ new_options = opts.merge(
696
+ :operation => :"DefaultApi.get_self_service_recovery_flow",
697
+ :header_params => header_params,
698
+ :query_params => query_params,
699
+ :form_params => form_params,
700
+ :body => post_body,
701
+ :auth_names => auth_names,
702
+ :return_type => return_type
703
+ )
704
+
705
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
706
+ if @api_client.config.debugging
707
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
708
+ end
709
+ return data, status_code, headers
710
+ end
711
+
712
+ # Get information about a recovery flow
713
+ # This endpoint returns a recovery flow's context with, for example, error details and other information. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
714
+ # @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;).
715
+ # @param [Hash] opts the optional parameters
716
+ # @return [RecoveryFlow]
717
+ def get_self_service_recovery_flow_admin(id, opts = {})
718
+ data, _status_code, _headers = get_self_service_recovery_flow_admin_with_http_info(id, opts)
719
+ data
720
+ end
721
+
722
+ # Get information about a recovery flow
723
+ # This endpoint returns a recovery flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
724
+ # @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;).
725
+ # @param [Hash] opts the optional parameters
726
+ # @return [Array<(RecoveryFlow, Integer, Hash)>] RecoveryFlow data, response status code and response headers
727
+ def get_self_service_recovery_flow_admin_with_http_info(id, opts = {})
728
+ if @api_client.config.debugging
729
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_recovery_flow_admin ...'
730
+ end
731
+ # verify the required parameter 'id' is set
732
+ if @api_client.config.client_side_validation && id.nil?
733
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_recovery_flow_admin"
734
+ end
735
+ # resource path
736
+ local_var_path = '/api/kratos/admin/self-service/recovery/flows'
737
+
738
+ # query parameters
739
+ query_params = opts[:query_params] || {}
740
+ query_params[:'id'] = id
741
+
742
+ # header parameters
743
+ header_params = opts[:header_params] || {}
744
+ # HTTP header 'Accept' (if needed)
745
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
746
+
747
+ # form parameters
748
+ form_params = opts[:form_params] || {}
749
+
750
+ # http body (model)
751
+ post_body = opts[:debug_body]
752
+
753
+ # return_type
754
+ return_type = opts[:debug_return_type] || 'RecoveryFlow'
755
+
756
+ # auth_names
757
+ auth_names = opts[:debug_auth_names] || ['oryToken']
758
+
759
+ new_options = opts.merge(
760
+ :operation => :"DefaultApi.get_self_service_recovery_flow_admin",
761
+ :header_params => header_params,
762
+ :query_params => query_params,
763
+ :form_params => form_params,
764
+ :body => post_body,
765
+ :auth_names => auth_names,
766
+ :return_type => return_type
767
+ )
768
+
769
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
770
+ if @api_client.config.debugging
771
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_recovery_flow_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
772
+ end
773
+ return data, status_code, headers
774
+ end
775
+
776
+ # Get Registration Flow
777
+ # This endpoint returns a registration flow's context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
778
+ # @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;).
779
+ # @param [Hash] opts the optional parameters
780
+ # @return [RegistrationFlow]
781
+ def get_self_service_registration_flow(id, opts = {})
782
+ data, _status_code, _headers = get_self_service_registration_flow_with_http_info(id, opts)
783
+ data
784
+ end
785
+
786
+ # Get Registration Flow
787
+ # This endpoint returns a registration flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
788
+ # @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;).
789
+ # @param [Hash] opts the optional parameters
790
+ # @return [Array<(RegistrationFlow, Integer, Hash)>] RegistrationFlow data, response status code and response headers
791
+ def get_self_service_registration_flow_with_http_info(id, opts = {})
792
+ if @api_client.config.debugging
793
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_registration_flow ...'
794
+ end
795
+ # verify the required parameter 'id' is set
796
+ if @api_client.config.client_side_validation && id.nil?
797
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_registration_flow"
798
+ end
799
+ # resource path
800
+ local_var_path = '/api/kratos/public/self-service/registration/flows'
801
+
802
+ # query parameters
803
+ query_params = opts[:query_params] || {}
804
+ query_params[:'id'] = id
805
+
806
+ # header parameters
807
+ header_params = opts[:header_params] || {}
808
+ # HTTP header 'Accept' (if needed)
809
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
810
+
811
+ # form parameters
812
+ form_params = opts[:form_params] || {}
813
+
814
+ # http body (model)
815
+ post_body = opts[:debug_body]
816
+
817
+ # return_type
818
+ return_type = opts[:debug_return_type] || 'RegistrationFlow'
819
+
820
+ # auth_names
821
+ auth_names = opts[:debug_auth_names] || []
822
+
823
+ new_options = opts.merge(
824
+ :operation => :"DefaultApi.get_self_service_registration_flow",
825
+ :header_params => header_params,
826
+ :query_params => query_params,
827
+ :form_params => form_params,
828
+ :body => post_body,
829
+ :auth_names => auth_names,
830
+ :return_type => return_type
831
+ )
832
+
833
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
834
+ if @api_client.config.debugging
835
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
836
+ end
837
+ return data, status_code, headers
838
+ end
839
+
840
+ # Get Registration Flow
841
+ # This endpoint returns a registration flow's context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
842
+ # @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;).
843
+ # @param [Hash] opts the optional parameters
844
+ # @return [RegistrationFlow]
845
+ def get_self_service_registration_flow_admin(id, opts = {})
846
+ data, _status_code, _headers = get_self_service_registration_flow_admin_with_http_info(id, opts)
847
+ data
848
+ end
849
+
850
+ # Get Registration Flow
851
+ # This endpoint returns a registration flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
852
+ # @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;).
853
+ # @param [Hash] opts the optional parameters
854
+ # @return [Array<(RegistrationFlow, Integer, Hash)>] RegistrationFlow data, response status code and response headers
855
+ def get_self_service_registration_flow_admin_with_http_info(id, opts = {})
856
+ if @api_client.config.debugging
857
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_registration_flow_admin ...'
858
+ end
859
+ # verify the required parameter 'id' is set
860
+ if @api_client.config.client_side_validation && id.nil?
861
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_registration_flow_admin"
862
+ end
863
+ # resource path
864
+ local_var_path = '/api/kratos/admin/self-service/registration/flows'
865
+
866
+ # query parameters
867
+ query_params = opts[:query_params] || {}
868
+ query_params[:'id'] = id
869
+
870
+ # header parameters
871
+ header_params = opts[:header_params] || {}
872
+ # HTTP header 'Accept' (if needed)
873
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
874
+
875
+ # form parameters
876
+ form_params = opts[:form_params] || {}
877
+
878
+ # http body (model)
879
+ post_body = opts[:debug_body]
880
+
881
+ # return_type
882
+ return_type = opts[:debug_return_type] || 'RegistrationFlow'
883
+
884
+ # auth_names
885
+ auth_names = opts[:debug_auth_names] || ['oryToken']
886
+
887
+ new_options = opts.merge(
888
+ :operation => :"DefaultApi.get_self_service_registration_flow_admin",
889
+ :header_params => header_params,
890
+ :query_params => query_params,
891
+ :form_params => form_params,
892
+ :body => post_body,
893
+ :auth_names => auth_names,
894
+ :return_type => return_type
895
+ )
896
+
897
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
898
+ if @api_client.config.debugging
899
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_registration_flow_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
900
+ end
901
+ return data, status_code, headers
902
+ end
903
+
904
+ # Get Settings Flow
905
+ # When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using Ory Kratos' Admin API. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
906
+ # @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;).
907
+ # @param [Hash] opts the optional parameters
908
+ # @return [SettingsFlow]
909
+ def get_self_service_settings_flow(id, opts = {})
910
+ data, _status_code, _headers = get_self_service_settings_flow_with_http_info(id, opts)
911
+ data
912
+ end
913
+
914
+ # Get Settings Flow
915
+ # When accessing this endpoint through Ory Kratos&#39; Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using Ory Kratos&#39; Admin API. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
916
+ # @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;).
917
+ # @param [Hash] opts the optional parameters
918
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
919
+ def get_self_service_settings_flow_with_http_info(id, opts = {})
920
+ if @api_client.config.debugging
921
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_settings_flow ...'
922
+ end
923
+ # verify the required parameter 'id' is set
924
+ if @api_client.config.client_side_validation && id.nil?
925
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_settings_flow"
926
+ end
927
+ # resource path
928
+ local_var_path = '/api/kratos/public/self-service/settings/flows'
929
+
930
+ # query parameters
931
+ query_params = opts[:query_params] || {}
932
+ query_params[:'id'] = id
933
+
934
+ # header parameters
935
+ header_params = opts[:header_params] || {}
936
+ # HTTP header 'Accept' (if needed)
937
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
938
+
939
+ # form parameters
940
+ form_params = opts[:form_params] || {}
941
+
942
+ # http body (model)
943
+ post_body = opts[:debug_body]
944
+
945
+ # return_type
946
+ return_type = opts[:debug_return_type] || 'SettingsFlow'
947
+
948
+ # auth_names
949
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
950
+
951
+ new_options = opts.merge(
952
+ :operation => :"DefaultApi.get_self_service_settings_flow",
953
+ :header_params => header_params,
954
+ :query_params => query_params,
955
+ :form_params => form_params,
956
+ :body => post_body,
957
+ :auth_names => auth_names,
958
+ :return_type => return_type
959
+ )
960
+
961
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
962
+ if @api_client.config.debugging
963
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
964
+ end
965
+ return data, status_code, headers
966
+ end
967
+
968
+ # Get Settings Flow
969
+ # When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using Ory Kratos' Admin API. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
970
+ # @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;).
971
+ # @param [Hash] opts the optional parameters
972
+ # @return [SettingsFlow]
973
+ def get_self_service_settings_flow_admin(id, opts = {})
974
+ data, _status_code, _headers = get_self_service_settings_flow_admin_with_http_info(id, opts)
975
+ data
976
+ end
977
+
978
+ # Get Settings Flow
979
+ # When accessing this endpoint through Ory Kratos&#39; Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using Ory Kratos&#39; Admin API. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
980
+ # @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;).
981
+ # @param [Hash] opts the optional parameters
982
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
983
+ def get_self_service_settings_flow_admin_with_http_info(id, opts = {})
984
+ if @api_client.config.debugging
985
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_settings_flow_admin ...'
986
+ end
987
+ # verify the required parameter 'id' is set
988
+ if @api_client.config.client_side_validation && id.nil?
989
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_settings_flow_admin"
990
+ end
991
+ # resource path
992
+ local_var_path = '/api/kratos/admin/self-service/settings/flows'
993
+
994
+ # query parameters
995
+ query_params = opts[:query_params] || {}
996
+ query_params[:'id'] = id
997
+
998
+ # header parameters
999
+ header_params = opts[:header_params] || {}
1000
+ # HTTP header 'Accept' (if needed)
1001
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1002
+
1003
+ # form parameters
1004
+ form_params = opts[:form_params] || {}
1005
+
1006
+ # http body (model)
1007
+ post_body = opts[:debug_body]
1008
+
1009
+ # return_type
1010
+ return_type = opts[:debug_return_type] || 'SettingsFlow'
1011
+
1012
+ # auth_names
1013
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1014
+
1015
+ new_options = opts.merge(
1016
+ :operation => :"DefaultApi.get_self_service_settings_flow_admin",
1017
+ :header_params => header_params,
1018
+ :query_params => query_params,
1019
+ :form_params => form_params,
1020
+ :body => post_body,
1021
+ :auth_names => auth_names,
1022
+ :return_type => return_type
1023
+ )
1024
+
1025
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1026
+ if @api_client.config.debugging
1027
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_settings_flow_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1028
+ end
1029
+ return data, status_code, headers
1030
+ end
1031
+
1032
+ # Get Verification Flow
1033
+ # This endpoint returns a verification flow's context with, for example, error details and other information. More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1034
+ # @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;).
1035
+ # @param [Hash] opts the optional parameters
1036
+ # @return [VerificationFlow]
1037
+ def get_self_service_verification_flow(id, opts = {})
1038
+ data, _status_code, _headers = get_self_service_verification_flow_with_http_info(id, opts)
1039
+ data
1040
+ end
1041
+
1042
+ # Get Verification Flow
1043
+ # This endpoint returns a verification flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1044
+ # @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;).
1045
+ # @param [Hash] opts the optional parameters
1046
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
1047
+ def get_self_service_verification_flow_with_http_info(id, opts = {})
1048
+ if @api_client.config.debugging
1049
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_verification_flow ...'
1050
+ end
1051
+ # verify the required parameter 'id' is set
1052
+ if @api_client.config.client_side_validation && id.nil?
1053
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_verification_flow"
1054
+ end
1055
+ # resource path
1056
+ local_var_path = '/api/kratos/public/self-service/verification/flows'
1057
+
1058
+ # query parameters
1059
+ query_params = opts[:query_params] || {}
1060
+ query_params[:'id'] = id
1061
+
1062
+ # header parameters
1063
+ header_params = opts[:header_params] || {}
1064
+ # HTTP header 'Accept' (if needed)
1065
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1066
+
1067
+ # form parameters
1068
+ form_params = opts[:form_params] || {}
1069
+
1070
+ # http body (model)
1071
+ post_body = opts[:debug_body]
1072
+
1073
+ # return_type
1074
+ return_type = opts[:debug_return_type] || 'VerificationFlow'
1075
+
1076
+ # auth_names
1077
+ auth_names = opts[:debug_auth_names] || []
1078
+
1079
+ new_options = opts.merge(
1080
+ :operation => :"DefaultApi.get_self_service_verification_flow",
1081
+ :header_params => header_params,
1082
+ :query_params => query_params,
1083
+ :form_params => form_params,
1084
+ :body => post_body,
1085
+ :auth_names => auth_names,
1086
+ :return_type => return_type
1087
+ )
1088
+
1089
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1090
+ if @api_client.config.debugging
1091
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1092
+ end
1093
+ return data, status_code, headers
1094
+ end
1095
+
1096
+ # Get Verification Flow
1097
+ # This endpoint returns a verification flow's context with, for example, error details and other information. More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1098
+ # @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;).
1099
+ # @param [Hash] opts the optional parameters
1100
+ # @return [VerificationFlow]
1101
+ def get_self_service_verification_flow_admin(id, opts = {})
1102
+ data, _status_code, _headers = get_self_service_verification_flow_admin_with_http_info(id, opts)
1103
+ data
1104
+ end
1105
+
1106
+ # Get Verification Flow
1107
+ # This endpoint returns a verification flow&#39;s context with, for example, error details and other information. More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1108
+ # @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;).
1109
+ # @param [Hash] opts the optional parameters
1110
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
1111
+ def get_self_service_verification_flow_admin_with_http_info(id, opts = {})
1112
+ if @api_client.config.debugging
1113
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_verification_flow_admin ...'
1114
+ end
1115
+ # verify the required parameter 'id' is set
1116
+ if @api_client.config.client_side_validation && id.nil?
1117
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_verification_flow_admin"
1118
+ end
1119
+ # resource path
1120
+ local_var_path = '/api/kratos/admin/self-service/verification/flows'
1121
+
1122
+ # query parameters
1123
+ query_params = opts[:query_params] || {}
1124
+ query_params[:'id'] = id
1125
+
1126
+ # header parameters
1127
+ header_params = opts[:header_params] || {}
1128
+ # HTTP header 'Accept' (if needed)
1129
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1130
+
1131
+ # form parameters
1132
+ form_params = opts[:form_params] || {}
1133
+
1134
+ # http body (model)
1135
+ post_body = opts[:debug_body]
1136
+
1137
+ # return_type
1138
+ return_type = opts[:debug_return_type] || 'VerificationFlow'
1139
+
1140
+ # auth_names
1141
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1142
+
1143
+ new_options = opts.merge(
1144
+ :operation => :"DefaultApi.get_self_service_verification_flow_admin",
1145
+ :header_params => header_params,
1146
+ :query_params => query_params,
1147
+ :form_params => form_params,
1148
+ :body => post_body,
1149
+ :auth_names => auth_names,
1150
+ :return_type => return_type
1151
+ )
1152
+
1153
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1154
+ if @api_client.config.debugging
1155
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_verification_flow_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1156
+ end
1157
+ return data, status_code, headers
1158
+ end
1159
+
1160
+ # Return Running Software Version.
1161
+ # This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
1162
+ # @param [Hash] opts the optional parameters
1163
+ # @return [InlineResponse2001]
1164
+ def get_version_admin(opts = {})
1165
+ data, _status_code, _headers = get_version_admin_with_http_info(opts)
1166
+ data
1167
+ end
1168
+
1169
+ # Return Running Software Version.
1170
+ # This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
1171
+ # @param [Hash] opts the optional parameters
1172
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
1173
+ def get_version_admin_with_http_info(opts = {})
1174
+ if @api_client.config.debugging
1175
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_version_admin ...'
1176
+ end
1177
+ # resource path
1178
+ local_var_path = '/api/kratos/admin/version'
1179
+
1180
+ # query parameters
1181
+ query_params = opts[:query_params] || {}
1182
+
1183
+ # header parameters
1184
+ header_params = opts[:header_params] || {}
1185
+ # HTTP header 'Accept' (if needed)
1186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1187
+
1188
+ # form parameters
1189
+ form_params = opts[:form_params] || {}
1190
+
1191
+ # http body (model)
1192
+ post_body = opts[:debug_body]
1193
+
1194
+ # return_type
1195
+ return_type = opts[:debug_return_type] || 'InlineResponse2001'
1196
+
1197
+ # auth_names
1198
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1199
+
1200
+ new_options = opts.merge(
1201
+ :operation => :"DefaultApi.get_version_admin",
1202
+ :header_params => header_params,
1203
+ :query_params => query_params,
1204
+ :form_params => form_params,
1205
+ :body => post_body,
1206
+ :auth_names => auth_names,
1207
+ :return_type => return_type
1208
+ )
1209
+
1210
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1211
+ if @api_client.config.debugging
1212
+ @api_client.config.logger.debug "API called: DefaultApi#get_version_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1213
+ end
1214
+ return data, status_code, headers
1215
+ end
1216
+
1217
+ # Initialize Browser-Based Logout User Flow
1218
+ # This endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, 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`. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
1219
+ # @param [Hash] opts the optional parameters
1220
+ # @return [nil]
1221
+ def initialize_self_service_browser_logout_flow(opts = {})
1222
+ initialize_self_service_browser_logout_flow_with_http_info(opts)
1223
+ nil
1224
+ end
1225
+
1226
+ # Initialize Browser-Based Logout User Flow
1227
+ # This endpoint initializes a logout flow. &gt; This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, 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;. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
1228
+ # @param [Hash] opts the optional parameters
1229
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1230
+ def initialize_self_service_browser_logout_flow_with_http_info(opts = {})
1231
+ if @api_client.config.debugging
1232
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_browser_logout_flow ...'
1233
+ end
1234
+ # resource path
1235
+ local_var_path = '/api/kratos/public/self-service/browser/flows/logout'
1236
+
1237
+ # query parameters
1238
+ query_params = opts[:query_params] || {}
1239
+
1240
+ # header parameters
1241
+ header_params = opts[:header_params] || {}
1242
+ # HTTP header 'Accept' (if needed)
1243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1244
+
1245
+ # form parameters
1246
+ form_params = opts[:form_params] || {}
1247
+
1248
+ # http body (model)
1249
+ post_body = opts[:debug_body]
1250
+
1251
+ # return_type
1252
+ return_type = opts[:debug_return_type]
1253
+
1254
+ # auth_names
1255
+ auth_names = opts[:debug_auth_names] || []
1256
+
1257
+ new_options = opts.merge(
1258
+ :operation => :"DefaultApi.initialize_self_service_browser_logout_flow",
1259
+ :header_params => header_params,
1260
+ :query_params => query_params,
1261
+ :form_params => form_params,
1262
+ :body => post_body,
1263
+ :auth_names => auth_names,
1264
+ :return_type => return_type
1265
+ )
1266
+
1267
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1268
+ if @api_client.config.debugging
1269
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_browser_logout_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1270
+ end
1271
+ return data, status_code, headers
1272
+ end
1273
+
1274
+ # Initialize Login Flow for API clients
1275
+ # This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1276
+ # @param [Hash] opts the optional parameters
1277
+ # @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.
1278
+ # @return [LoginFlow]
1279
+ def initialize_self_service_login_via_api_flow(opts = {})
1280
+ data, _status_code, _headers = initialize_self_service_login_via_api_flow_with_http_info(opts)
1281
+ data
1282
+ end
1283
+
1284
+ # Initialize Login Flow for API clients
1285
+ # This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter &#x60;?refresh&#x3D;true&#x60; is set. To fetch an existing login flow call &#x60;/self-service/login/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1286
+ # @param [Hash] opts the optional parameters
1287
+ # @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.
1288
+ # @return [Array<(LoginFlow, Integer, Hash)>] LoginFlow data, response status code and response headers
1289
+ def initialize_self_service_login_via_api_flow_with_http_info(opts = {})
1290
+ if @api_client.config.debugging
1291
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_login_via_api_flow ...'
1292
+ end
1293
+ # resource path
1294
+ local_var_path = '/api/kratos/public/self-service/login/api'
1295
+
1296
+ # query parameters
1297
+ query_params = opts[:query_params] || {}
1298
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
1299
+
1300
+ # header parameters
1301
+ header_params = opts[:header_params] || {}
1302
+ # HTTP header 'Accept' (if needed)
1303
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1304
+
1305
+ # form parameters
1306
+ form_params = opts[:form_params] || {}
1307
+
1308
+ # http body (model)
1309
+ post_body = opts[:debug_body]
1310
+
1311
+ # return_type
1312
+ return_type = opts[:debug_return_type] || 'LoginFlow'
1313
+
1314
+ # auth_names
1315
+ auth_names = opts[:debug_auth_names] || []
1316
+
1317
+ new_options = opts.merge(
1318
+ :operation => :"DefaultApi.initialize_self_service_login_via_api_flow",
1319
+ :header_params => header_params,
1320
+ :query_params => query_params,
1321
+ :form_params => form_params,
1322
+ :body => post_body,
1323
+ :auth_names => auth_names,
1324
+ :return_type => return_type
1325
+ )
1326
+
1327
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1328
+ if @api_client.config.debugging
1329
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_login_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1330
+ end
1331
+ return data, status_code, headers
1332
+ end
1333
+
1334
+ # Initialize Login Flow for browsers
1335
+ # This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1336
+ # @param [Hash] opts the optional parameters
1337
+ # @return [nil]
1338
+ def initialize_self_service_login_via_browser_flow(opts = {})
1339
+ initialize_self_service_login_via_browser_flow_with_http_info(opts)
1340
+ nil
1341
+ end
1342
+
1343
+ # Initialize Login Flow for browsers
1344
+ # This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.login.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60; unless the query parameter &#x60;?refresh&#x3D;true&#x60; was set. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1345
+ # @param [Hash] opts the optional parameters
1346
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1347
+ def initialize_self_service_login_via_browser_flow_with_http_info(opts = {})
1348
+ if @api_client.config.debugging
1349
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_login_via_browser_flow ...'
1350
+ end
1351
+ # resource path
1352
+ local_var_path = '/api/kratos/public/self-service/login/browser'
1353
+
1354
+ # query parameters
1355
+ query_params = opts[:query_params] || {}
1356
+
1357
+ # header parameters
1358
+ header_params = opts[:header_params] || {}
1359
+ # HTTP header 'Accept' (if needed)
1360
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1361
+
1362
+ # form parameters
1363
+ form_params = opts[:form_params] || {}
1364
+
1365
+ # http body (model)
1366
+ post_body = opts[:debug_body]
1367
+
1368
+ # return_type
1369
+ return_type = opts[:debug_return_type]
1370
+
1371
+ # auth_names
1372
+ auth_names = opts[:debug_auth_names] || []
1373
+
1374
+ new_options = opts.merge(
1375
+ :operation => :"DefaultApi.initialize_self_service_login_via_browser_flow",
1376
+ :header_params => header_params,
1377
+ :query_params => query_params,
1378
+ :form_params => form_params,
1379
+ :body => post_body,
1380
+ :auth_names => auth_names,
1381
+ :return_type => return_type
1382
+ )
1383
+
1384
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1385
+ if @api_client.config.debugging
1386
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_login_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1387
+ end
1388
+ return data, status_code, headers
1389
+ end
1390
+
1391
+ # Initialize Recovery Flow for API Clients
1392
+ # This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1393
+ # @param [Hash] opts the optional parameters
1394
+ # @return [RecoveryFlow]
1395
+ def initialize_self_service_recovery_via_api_flow(opts = {})
1396
+ data, _status_code, _headers = initialize_self_service_recovery_via_api_flow_with_http_info(opts)
1397
+ data
1398
+ end
1399
+
1400
+ # Initialize Recovery Flow for API Clients
1401
+ # This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call &#x60;/self-service/recovery/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1402
+ # @param [Hash] opts the optional parameters
1403
+ # @return [Array<(RecoveryFlow, Integer, Hash)>] RecoveryFlow data, response status code and response headers
1404
+ def initialize_self_service_recovery_via_api_flow_with_http_info(opts = {})
1405
+ if @api_client.config.debugging
1406
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_recovery_via_api_flow ...'
1407
+ end
1408
+ # resource path
1409
+ local_var_path = '/api/kratos/public/self-service/recovery/api'
1410
+
1411
+ # query parameters
1412
+ query_params = opts[:query_params] || {}
1413
+
1414
+ # header parameters
1415
+ header_params = opts[:header_params] || {}
1416
+ # HTTP header 'Accept' (if needed)
1417
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1418
+
1419
+ # form parameters
1420
+ form_params = opts[:form_params] || {}
1421
+
1422
+ # http body (model)
1423
+ post_body = opts[:debug_body]
1424
+
1425
+ # return_type
1426
+ return_type = opts[:debug_return_type] || 'RecoveryFlow'
1427
+
1428
+ # auth_names
1429
+ auth_names = opts[:debug_auth_names] || []
1430
+
1431
+ new_options = opts.merge(
1432
+ :operation => :"DefaultApi.initialize_self_service_recovery_via_api_flow",
1433
+ :header_params => header_params,
1434
+ :query_params => query_params,
1435
+ :form_params => form_params,
1436
+ :body => post_body,
1437
+ :auth_names => auth_names,
1438
+ :return_type => return_type
1439
+ )
1440
+
1441
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1442
+ if @api_client.config.debugging
1443
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_recovery_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1444
+ end
1445
+ return data, status_code, headers
1446
+ end
1447
+
1448
+ # Initialize Recovery Flow for Browser Clients
1449
+ # This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1450
+ # @param [Hash] opts the optional parameters
1451
+ # @return [nil]
1452
+ def initialize_self_service_recovery_via_browser_flow(opts = {})
1453
+ initialize_self_service_recovery_via_browser_flow_with_http_info(opts)
1454
+ nil
1455
+ end
1456
+
1457
+ # Initialize Recovery Flow for Browser Clients
1458
+ # This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.recovery.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
1459
+ # @param [Hash] opts the optional parameters
1460
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1461
+ def initialize_self_service_recovery_via_browser_flow_with_http_info(opts = {})
1462
+ if @api_client.config.debugging
1463
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_recovery_via_browser_flow ...'
1464
+ end
1465
+ # resource path
1466
+ local_var_path = '/api/kratos/public/self-service/recovery/browser'
1467
+
1468
+ # query parameters
1469
+ query_params = opts[:query_params] || {}
1470
+
1471
+ # header parameters
1472
+ header_params = opts[:header_params] || {}
1473
+ # HTTP header 'Accept' (if needed)
1474
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1475
+
1476
+ # form parameters
1477
+ form_params = opts[:form_params] || {}
1478
+
1479
+ # http body (model)
1480
+ post_body = opts[:debug_body]
1481
+
1482
+ # return_type
1483
+ return_type = opts[:debug_return_type]
1484
+
1485
+ # auth_names
1486
+ auth_names = opts[:debug_auth_names] || []
1487
+
1488
+ new_options = opts.merge(
1489
+ :operation => :"DefaultApi.initialize_self_service_recovery_via_browser_flow",
1490
+ :header_params => header_params,
1491
+ :query_params => query_params,
1492
+ :form_params => form_params,
1493
+ :body => post_body,
1494
+ :auth_names => auth_names,
1495
+ :return_type => return_type
1496
+ )
1497
+
1498
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1499
+ if @api_client.config.debugging
1500
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_recovery_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1501
+ end
1502
+ return data, status_code, headers
1503
+ end
1504
+
1505
+ # Initialize Registration Flow for API clients
1506
+ # This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1507
+ # @param [Hash] opts the optional parameters
1508
+ # @return [RegistrationFlow]
1509
+ def initialize_self_service_registration(opts = {})
1510
+ data, _status_code, _headers = initialize_self_service_registration_with_http_info(opts)
1511
+ data
1512
+ end
1513
+
1514
+ # Initialize Registration Flow for API clients
1515
+ # This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter &#x60;?refresh&#x3D;true&#x60; is set. To fetch an existing registration flow call &#x60;/self-service/registration/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1516
+ # @param [Hash] opts the optional parameters
1517
+ # @return [Array<(RegistrationFlow, Integer, Hash)>] RegistrationFlow data, response status code and response headers
1518
+ def initialize_self_service_registration_with_http_info(opts = {})
1519
+ if @api_client.config.debugging
1520
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_registration ...'
1521
+ end
1522
+ # resource path
1523
+ local_var_path = '/api/kratos/public/self-service/registration/api'
1524
+
1525
+ # query parameters
1526
+ query_params = opts[:query_params] || {}
1527
+
1528
+ # header parameters
1529
+ header_params = opts[:header_params] || {}
1530
+ # HTTP header 'Accept' (if needed)
1531
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1532
+
1533
+ # form parameters
1534
+ form_params = opts[:form_params] || {}
1535
+
1536
+ # http body (model)
1537
+ post_body = opts[:debug_body]
1538
+
1539
+ # return_type
1540
+ return_type = opts[:debug_return_type] || 'RegistrationFlow'
1541
+
1542
+ # auth_names
1543
+ auth_names = opts[:debug_auth_names] || []
1544
+
1545
+ new_options = opts.merge(
1546
+ :operation => :"DefaultApi.initialize_self_service_registration",
1547
+ :header_params => header_params,
1548
+ :query_params => query_params,
1549
+ :form_params => form_params,
1550
+ :body => post_body,
1551
+ :auth_names => auth_names,
1552
+ :return_type => return_type
1553
+ )
1554
+
1555
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1556
+ if @api_client.config.debugging
1557
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1558
+ end
1559
+ return data, status_code, headers
1560
+ end
1561
+
1562
+ # Initialize Registration Flow for browsers
1563
+ # This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1564
+ # @param [Hash] opts the optional parameters
1565
+ # @return [nil]
1566
+ def initialize_self_service_registration_for_browsers(opts = {})
1567
+ initialize_self_service_registration_for_browsers_with_http_info(opts)
1568
+ nil
1569
+ end
1570
+
1571
+ # Initialize Registration Flow for browsers
1572
+ # This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.registration.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60; unless the query parameter &#x60;?refresh&#x3D;true&#x60; was set. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1573
+ # @param [Hash] opts the optional parameters
1574
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1575
+ def initialize_self_service_registration_for_browsers_with_http_info(opts = {})
1576
+ if @api_client.config.debugging
1577
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_registration_for_browsers ...'
1578
+ end
1579
+ # resource path
1580
+ local_var_path = '/api/kratos/public/self-service/registration/browser'
1581
+
1582
+ # query parameters
1583
+ query_params = opts[:query_params] || {}
1584
+
1585
+ # header parameters
1586
+ header_params = opts[:header_params] || {}
1587
+ # HTTP header 'Accept' (if needed)
1588
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1589
+
1590
+ # form parameters
1591
+ form_params = opts[:form_params] || {}
1592
+
1593
+ # http body (model)
1594
+ post_body = opts[:debug_body]
1595
+
1596
+ # return_type
1597
+ return_type = opts[:debug_return_type]
1598
+
1599
+ # auth_names
1600
+ auth_names = opts[:debug_auth_names] || []
1601
+
1602
+ new_options = opts.merge(
1603
+ :operation => :"DefaultApi.initialize_self_service_registration_for_browsers",
1604
+ :header_params => header_params,
1605
+ :query_params => query_params,
1606
+ :form_params => form_params,
1607
+ :body => post_body,
1608
+ :auth_names => auth_names,
1609
+ :return_type => return_type
1610
+ )
1611
+
1612
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1613
+ if @api_client.config.debugging
1614
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_registration_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1615
+ end
1616
+ return data, status_code, headers
1617
+ end
1618
+
1619
+ # Initialize Settings Flow for API Clients
1620
+ # This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
1621
+ # @param [Hash] opts the optional parameters
1622
+ # @return [SettingsFlow]
1623
+ def initialize_self_service_settings_via_api_flow(opts = {})
1624
+ data, _status_code, _headers = initialize_self_service_settings_via_api_flow_with_http_info(opts)
1625
+ data
1626
+ end
1627
+
1628
+ # Initialize Settings Flow for API Clients
1629
+ # This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call &#x60;/self-service/settings/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
1630
+ # @param [Hash] opts the optional parameters
1631
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
1632
+ def initialize_self_service_settings_via_api_flow_with_http_info(opts = {})
1633
+ if @api_client.config.debugging
1634
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_settings_via_api_flow ...'
1635
+ end
1636
+ # resource path
1637
+ local_var_path = '/api/kratos/public/self-service/settings/api'
1638
+
1639
+ # query parameters
1640
+ query_params = opts[:query_params] || {}
1641
+
1642
+ # header parameters
1643
+ header_params = opts[:header_params] || {}
1644
+ # HTTP header 'Accept' (if needed)
1645
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1646
+
1647
+ # form parameters
1648
+ form_params = opts[:form_params] || {}
1649
+
1650
+ # http body (model)
1651
+ post_body = opts[:debug_body]
1652
+
1653
+ # return_type
1654
+ return_type = opts[:debug_return_type] || 'SettingsFlow'
1655
+
1656
+ # auth_names
1657
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
1658
+
1659
+ new_options = opts.merge(
1660
+ :operation => :"DefaultApi.initialize_self_service_settings_via_api_flow",
1661
+ :header_params => header_params,
1662
+ :query_params => query_params,
1663
+ :form_params => form_params,
1664
+ :body => post_body,
1665
+ :auth_names => auth_names,
1666
+ :return_type => return_type
1667
+ )
1668
+
1669
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1670
+ if @api_client.config.debugging
1671
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_settings_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1672
+ end
1673
+ return data, status_code, headers
1674
+ end
1675
+
1676
+ # Initialize Settings Flow for Browsers
1677
+ # This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
1678
+ # @param [Hash] opts the optional parameters
1679
+ # @return [nil]
1680
+ def initialize_self_service_settings_via_browser_flow(opts = {})
1681
+ initialize_self_service_settings_via_browser_flow_with_http_info(opts)
1682
+ nil
1683
+ end
1684
+
1685
+ # Initialize Settings Flow for Browsers
1686
+ # This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.settings.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
1687
+ # @param [Hash] opts the optional parameters
1688
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1689
+ def initialize_self_service_settings_via_browser_flow_with_http_info(opts = {})
1690
+ if @api_client.config.debugging
1691
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_settings_via_browser_flow ...'
1692
+ end
1693
+ # resource path
1694
+ local_var_path = '/api/kratos/public/self-service/settings/browser'
1695
+
1696
+ # query parameters
1697
+ query_params = opts[:query_params] || {}
1698
+
1699
+ # header parameters
1700
+ header_params = opts[:header_params] || {}
1701
+ # HTTP header 'Accept' (if needed)
1702
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1703
+
1704
+ # form parameters
1705
+ form_params = opts[:form_params] || {}
1706
+
1707
+ # http body (model)
1708
+ post_body = opts[:debug_body]
1709
+
1710
+ # return_type
1711
+ return_type = opts[:debug_return_type]
1712
+
1713
+ # auth_names
1714
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
1715
+
1716
+ new_options = opts.merge(
1717
+ :operation => :"DefaultApi.initialize_self_service_settings_via_browser_flow",
1718
+ :header_params => header_params,
1719
+ :query_params => query_params,
1720
+ :form_params => form_params,
1721
+ :body => post_body,
1722
+ :auth_names => auth_names,
1723
+ :return_type => return_type
1724
+ )
1725
+
1726
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1727
+ if @api_client.config.debugging
1728
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_settings_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1729
+ end
1730
+ return data, status_code, headers
1731
+ end
1732
+
1733
+ # Initialize Verification Flow for API Clients
1734
+ # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1735
+ # @param [Hash] opts the optional parameters
1736
+ # @return [VerificationFlow]
1737
+ def initialize_self_service_verification_via_api_flow(opts = {})
1738
+ data, _status_code, _headers = initialize_self_service_verification_via_api_flow_with_http_info(opts)
1739
+ data
1740
+ end
1741
+
1742
+ # Initialize Verification Flow for API Clients
1743
+ # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call &#x60;/self-service/verification/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1744
+ # @param [Hash] opts the optional parameters
1745
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
1746
+ def initialize_self_service_verification_via_api_flow_with_http_info(opts = {})
1747
+ if @api_client.config.debugging
1748
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_verification_via_api_flow ...'
1749
+ end
1750
+ # resource path
1751
+ local_var_path = '/api/kratos/public/self-service/verification/api'
1752
+
1753
+ # query parameters
1754
+ query_params = opts[:query_params] || {}
1755
+
1756
+ # header parameters
1757
+ header_params = opts[:header_params] || {}
1758
+ # HTTP header 'Accept' (if needed)
1759
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1760
+
1761
+ # form parameters
1762
+ form_params = opts[:form_params] || {}
1763
+
1764
+ # http body (model)
1765
+ post_body = opts[:debug_body]
1766
+
1767
+ # return_type
1768
+ return_type = opts[:debug_return_type] || 'VerificationFlow'
1769
+
1770
+ # auth_names
1771
+ auth_names = opts[:debug_auth_names] || []
1772
+
1773
+ new_options = opts.merge(
1774
+ :operation => :"DefaultApi.initialize_self_service_verification_via_api_flow",
1775
+ :header_params => header_params,
1776
+ :query_params => query_params,
1777
+ :form_params => form_params,
1778
+ :body => post_body,
1779
+ :auth_names => auth_names,
1780
+ :return_type => return_type
1781
+ )
1782
+
1783
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1784
+ if @api_client.config.debugging
1785
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_verification_via_api_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1786
+ end
1787
+ return data, status_code, headers
1788
+ end
1789
+
1790
+ # Initialize Verification Flow for Browser Clients
1791
+ # This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1792
+ # @param [Hash] opts the optional parameters
1793
+ # @return [nil]
1794
+ def initialize_self_service_verification_via_browser_flow(opts = {})
1795
+ initialize_self_service_verification_via_browser_flow_with_http_info(opts)
1796
+ nil
1797
+ end
1798
+
1799
+ # Initialize Verification Flow for Browser Clients
1800
+ # This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.verification.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1801
+ # @param [Hash] opts the optional parameters
1802
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1803
+ def initialize_self_service_verification_via_browser_flow_with_http_info(opts = {})
1804
+ if @api_client.config.debugging
1805
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_verification_via_browser_flow ...'
1806
+ end
1807
+ # resource path
1808
+ local_var_path = '/api/kratos/public/self-service/verification/browser'
1809
+
1810
+ # query parameters
1811
+ query_params = opts[:query_params] || {}
1812
+
1813
+ # header parameters
1814
+ header_params = opts[:header_params] || {}
1815
+ # HTTP header 'Accept' (if needed)
1816
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1817
+
1818
+ # form parameters
1819
+ form_params = opts[:form_params] || {}
1820
+
1821
+ # http body (model)
1822
+ post_body = opts[:debug_body]
1823
+
1824
+ # return_type
1825
+ return_type = opts[:debug_return_type]
1826
+
1827
+ # auth_names
1828
+ auth_names = opts[:debug_auth_names] || []
1829
+
1830
+ new_options = opts.merge(
1831
+ :operation => :"DefaultApi.initialize_self_service_verification_via_browser_flow",
1832
+ :header_params => header_params,
1833
+ :query_params => query_params,
1834
+ :form_params => form_params,
1835
+ :body => post_body,
1836
+ :auth_names => auth_names,
1837
+ :return_type => return_type
1838
+ )
1839
+
1840
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1841
+ if @api_client.config.debugging
1842
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_verification_via_browser_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1843
+ end
1844
+ return data, status_code, headers
1845
+ end
1846
+
1847
+ # Check HTTP Server Status
1848
+ # This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
1849
+ # @param [Hash] opts the optional parameters
1850
+ # @return [InlineResponse200]
1851
+ def is_alive_admin(opts = {})
1852
+ data, _status_code, _headers = is_alive_admin_with_http_info(opts)
1853
+ data
1854
+ end
1855
+
1856
+ # Check HTTP Server Status
1857
+ # This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
1858
+ # @param [Hash] opts the optional parameters
1859
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
1860
+ def is_alive_admin_with_http_info(opts = {})
1861
+ if @api_client.config.debugging
1862
+ @api_client.config.logger.debug 'Calling API: DefaultApi.is_alive_admin ...'
1863
+ end
1864
+ # resource path
1865
+ local_var_path = '/api/kratos/admin/health/alive'
1866
+
1867
+ # query parameters
1868
+ query_params = opts[:query_params] || {}
1869
+
1870
+ # header parameters
1871
+ header_params = opts[:header_params] || {}
1872
+ # HTTP header 'Accept' (if needed)
1873
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1874
+
1875
+ # form parameters
1876
+ form_params = opts[:form_params] || {}
1877
+
1878
+ # http body (model)
1879
+ post_body = opts[:debug_body]
1880
+
1881
+ # return_type
1882
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
1883
+
1884
+ # auth_names
1885
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1886
+
1887
+ new_options = opts.merge(
1888
+ :operation => :"DefaultApi.is_alive_admin",
1889
+ :header_params => header_params,
1890
+ :query_params => query_params,
1891
+ :form_params => form_params,
1892
+ :body => post_body,
1893
+ :auth_names => auth_names,
1894
+ :return_type => return_type
1895
+ )
1896
+
1897
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1898
+ if @api_client.config.debugging
1899
+ @api_client.config.logger.debug "API called: DefaultApi#is_alive_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1900
+ end
1901
+ return data, status_code, headers
1902
+ end
1903
+
1904
+ # Check HTTP Server and Database Status
1905
+ # This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance.
1906
+ # @param [Hash] opts the optional parameters
1907
+ # @return [InlineResponse200]
1908
+ def is_ready_admin(opts = {})
1909
+ data, _status_code, _headers = is_ready_admin_with_http_info(opts)
1910
+ data
1911
+ end
1912
+
1913
+ # Check HTTP Server and Database Status
1914
+ # This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance.
1915
+ # @param [Hash] opts the optional parameters
1916
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
1917
+ def is_ready_admin_with_http_info(opts = {})
1918
+ if @api_client.config.debugging
1919
+ @api_client.config.logger.debug 'Calling API: DefaultApi.is_ready_admin ...'
1920
+ end
1921
+ # resource path
1922
+ local_var_path = '/api/kratos/admin/health/ready'
1923
+
1924
+ # query parameters
1925
+ query_params = opts[:query_params] || {}
1926
+
1927
+ # header parameters
1928
+ header_params = opts[:header_params] || {}
1929
+ # HTTP header 'Accept' (if needed)
1930
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1931
+
1932
+ # form parameters
1933
+ form_params = opts[:form_params] || {}
1934
+
1935
+ # http body (model)
1936
+ post_body = opts[:debug_body]
1937
+
1938
+ # return_type
1939
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
1940
+
1941
+ # auth_names
1942
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1943
+
1944
+ new_options = opts.merge(
1945
+ :operation => :"DefaultApi.is_ready_admin",
1946
+ :header_params => header_params,
1947
+ :query_params => query_params,
1948
+ :form_params => form_params,
1949
+ :body => post_body,
1950
+ :auth_names => auth_names,
1951
+ :return_type => return_type
1952
+ )
1953
+
1954
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1955
+ if @api_client.config.debugging
1956
+ @api_client.config.logger.debug "API called: DefaultApi#is_ready_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1957
+ end
1958
+ return data, status_code, headers
1959
+ end
1960
+
1961
+ # List Identities
1962
+ # 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).
1963
+ # @param [Hash] opts the optional parameters
1964
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 100)
1965
+ # @option opts [Integer] :page Pagination Page (default to 0)
1966
+ # @return [Array<Identity>]
1967
+ def list_identities_admin(opts = {})
1968
+ data, _status_code, _headers = list_identities_admin_with_http_info(opts)
1969
+ data
1970
+ end
1971
+
1972
+ # List Identities
1973
+ # 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).
1974
+ # @param [Hash] opts the optional parameters
1975
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page.
1976
+ # @option opts [Integer] :page Pagination Page
1977
+ # @return [Array<(Array<Identity>, Integer, Hash)>] Array<Identity> data, response status code and response headers
1978
+ def list_identities_admin_with_http_info(opts = {})
1979
+ if @api_client.config.debugging
1980
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_identities_admin ...'
1981
+ end
1982
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 500
1983
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_identities_admin, must be smaller than or equal to 500.'
1984
+ end
1985
+
1986
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
1987
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_identities_admin, must be greater than or equal to 1.'
1988
+ end
1989
+
1990
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
1991
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling DefaultApi.list_identities_admin, must be greater than or equal to 0.'
1992
+ end
1993
+
1994
+ # resource path
1995
+ local_var_path = '/api/kratos/admin/identities'
1996
+
1997
+ # query parameters
1998
+ query_params = opts[:query_params] || {}
1999
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
2000
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2001
+
2002
+ # header parameters
2003
+ header_params = opts[:header_params] || {}
2004
+ # HTTP header 'Accept' (if needed)
2005
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2006
+
2007
+ # form parameters
2008
+ form_params = opts[:form_params] || {}
2009
+
2010
+ # http body (model)
2011
+ post_body = opts[:debug_body]
2012
+
2013
+ # return_type
2014
+ return_type = opts[:debug_return_type] || 'Array<Identity>'
2015
+
2016
+ # auth_names
2017
+ auth_names = opts[:debug_auth_names] || ['oryToken']
2018
+
2019
+ new_options = opts.merge(
2020
+ :operation => :"DefaultApi.list_identities_admin",
2021
+ :header_params => header_params,
2022
+ :query_params => query_params,
2023
+ :form_params => form_params,
2024
+ :body => post_body,
2025
+ :auth_names => auth_names,
2026
+ :return_type => return_type
2027
+ )
2028
+
2029
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2030
+ if @api_client.config.debugging
2031
+ @api_client.config.logger.debug "API called: DefaultApi#list_identities_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2032
+ end
2033
+ return data, status_code, headers
2034
+ end
2035
+
2036
+ # Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
2037
+ # ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ```
2038
+ # @param [Hash] opts the optional parameters
2039
+ # @return [nil]
2040
+ def prometheus_admin(opts = {})
2041
+ prometheus_admin_with_http_info(opts)
2042
+ nil
2043
+ end
2044
+
2045
+ # Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
2046
+ # &#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: \&quot;4434\&quot; prometheus.io/path: \&quot;/metrics/prometheus\&quot; &#x60;&#x60;&#x60;
2047
+ # @param [Hash] opts the optional parameters
2048
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2049
+ def prometheus_admin_with_http_info(opts = {})
2050
+ if @api_client.config.debugging
2051
+ @api_client.config.logger.debug 'Calling API: DefaultApi.prometheus_admin ...'
2052
+ end
2053
+ # resource path
2054
+ local_var_path = '/api/kratos/admin/metrics/prometheus'
2055
+
2056
+ # query parameters
2057
+ query_params = opts[:query_params] || {}
2058
+
2059
+ # header parameters
2060
+ header_params = opts[:header_params] || {}
2061
+
2062
+ # form parameters
2063
+ form_params = opts[:form_params] || {}
2064
+
2065
+ # http body (model)
2066
+ post_body = opts[:debug_body]
2067
+
2068
+ # return_type
2069
+ return_type = opts[:debug_return_type]
2070
+
2071
+ # auth_names
2072
+ auth_names = opts[:debug_auth_names] || ['oryToken']
2073
+
2074
+ new_options = opts.merge(
2075
+ :operation => :"DefaultApi.prometheus_admin",
2076
+ :header_params => header_params,
2077
+ :query_params => query_params,
2078
+ :form_params => form_params,
2079
+ :body => post_body,
2080
+ :auth_names => auth_names,
2081
+ :return_type => return_type
2082
+ )
2083
+
2084
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2085
+ if @api_client.config.debugging
2086
+ @api_client.config.logger.debug "API called: DefaultApi#prometheus_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2087
+ end
2088
+ return data, status_code, headers
2089
+ end
2090
+
2091
+ # Initialize Logout Flow for API Clients - Revoke a Session
2092
+ # Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
2093
+ # @param revoke_session [RevokeSession]
2094
+ # @param [Hash] opts the optional parameters
2095
+ # @return [nil]
2096
+ def revoke_session(revoke_session, opts = {})
2097
+ revoke_session_with_http_info(revoke_session, opts)
2098
+ nil
2099
+ end
2100
+
2101
+ # Initialize Logout Flow for API Clients - Revoke a Session
2102
+ # Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
2103
+ # @param revoke_session [RevokeSession]
2104
+ # @param [Hash] opts the optional parameters
2105
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2106
+ def revoke_session_with_http_info(revoke_session, opts = {})
2107
+ if @api_client.config.debugging
2108
+ @api_client.config.logger.debug 'Calling API: DefaultApi.revoke_session ...'
2109
+ end
2110
+ # verify the required parameter 'revoke_session' is set
2111
+ if @api_client.config.client_side_validation && revoke_session.nil?
2112
+ fail ArgumentError, "Missing the required parameter 'revoke_session' when calling DefaultApi.revoke_session"
2113
+ end
2114
+ # resource path
2115
+ local_var_path = '/api/kratos/public/sessions'
2116
+
2117
+ # query parameters
2118
+ query_params = opts[:query_params] || {}
2119
+
2120
+ # header parameters
2121
+ header_params = opts[:header_params] || {}
2122
+ # HTTP header 'Accept' (if needed)
2123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2124
+ # HTTP header 'Content-Type'
2125
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2126
+
2127
+ # form parameters
2128
+ form_params = opts[:form_params] || {}
2129
+
2130
+ # http body (model)
2131
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(revoke_session)
2132
+
2133
+ # return_type
2134
+ return_type = opts[:debug_return_type]
2135
+
2136
+ # auth_names
2137
+ auth_names = opts[:debug_auth_names] || []
2138
+
2139
+ new_options = opts.merge(
2140
+ :operation => :"DefaultApi.revoke_session",
2141
+ :header_params => header_params,
2142
+ :query_params => query_params,
2143
+ :form_params => form_params,
2144
+ :body => post_body,
2145
+ :auth_names => auth_names,
2146
+ :return_type => return_type
2147
+ )
2148
+
2149
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2150
+ if @api_client.config.debugging
2151
+ @api_client.config.logger.debug "API called: DefaultApi#revoke_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2152
+ end
2153
+ return data, status_code, headers
2154
+ end
2155
+
2156
+ # Submit a Login Flow
2157
+ # 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 `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
2158
+ # @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;).
2159
+ # @param [Hash] opts the optional parameters
2160
+ # @option opts [SubmitSelfServiceLoginFlow] :submit_self_service_login_flow
2161
+ # @return [LoginViaApiResponse]
2162
+ def submit_self_service_login_flow(flow, opts = {})
2163
+ data, _status_code, _headers = submit_self_service_login_flow_with_http_info(flow, opts)
2164
+ data
2165
+ end
2166
+
2167
+ # Submit a Login Flow
2168
+ # 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 &#x60;application/x-www-form-urlencoded&#x60; to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the &#x60;return_to&#x60; value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
2169
+ # @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;).
2170
+ # @param [Hash] opts the optional parameters
2171
+ # @option opts [SubmitSelfServiceLoginFlow] :submit_self_service_login_flow
2172
+ # @return [Array<(LoginViaApiResponse, Integer, Hash)>] LoginViaApiResponse data, response status code and response headers
2173
+ def submit_self_service_login_flow_with_http_info(flow, opts = {})
2174
+ if @api_client.config.debugging
2175
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_login_flow ...'
2176
+ end
2177
+ # verify the required parameter 'flow' is set
2178
+ if @api_client.config.client_side_validation && flow.nil?
2179
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_login_flow"
2180
+ end
2181
+ # resource path
2182
+ local_var_path = '/api/kratos/public/self-service/login'
2183
+
2184
+ # query parameters
2185
+ query_params = opts[:query_params] || {}
2186
+ query_params[:'flow'] = flow
2187
+
2188
+ # header parameters
2189
+ header_params = opts[:header_params] || {}
2190
+ # HTTP header 'Accept' (if needed)
2191
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2192
+ # HTTP header 'Content-Type'
2193
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2194
+
2195
+ # form parameters
2196
+ form_params = opts[:form_params] || {}
2197
+
2198
+ # http body (model)
2199
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_login_flow'])
2200
+
2201
+ # return_type
2202
+ return_type = opts[:debug_return_type] || 'LoginViaApiResponse'
2203
+
2204
+ # auth_names
2205
+ auth_names = opts[:debug_auth_names] || []
2206
+
2207
+ new_options = opts.merge(
2208
+ :operation => :"DefaultApi.submit_self_service_login_flow",
2209
+ :header_params => header_params,
2210
+ :query_params => query_params,
2211
+ :form_params => form_params,
2212
+ :body => post_body,
2213
+ :auth_names => auth_names,
2214
+ :return_type => return_type
2215
+ )
2216
+
2217
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2218
+ if @api_client.config.debugging
2219
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2220
+ end
2221
+ return data, status_code, headers
2222
+ end
2223
+
2224
+ # Complete Recovery Flow
2225
+ # 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 it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` 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).
2226
+ # @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;).
2227
+ # @param [Hash] opts the optional parameters
2228
+ # @option opts [Object] :body
2229
+ # @return [nil]
2230
+ def submit_self_service_recovery_flow(flow, opts = {})
2231
+ submit_self_service_recovery_flow_with_http_info(flow, opts)
2232
+ nil
2233
+ end
2234
+
2235
+ # Complete Recovery Flow
2236
+ # 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 it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; 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).
2237
+ # @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;).
2238
+ # @param [Hash] opts the optional parameters
2239
+ # @option opts [Object] :body
2240
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2241
+ def submit_self_service_recovery_flow_with_http_info(flow, opts = {})
2242
+ if @api_client.config.debugging
2243
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_recovery_flow ...'
2244
+ end
2245
+ # verify the required parameter 'flow' is set
2246
+ if @api_client.config.client_side_validation && flow.nil?
2247
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_recovery_flow"
2248
+ end
2249
+ # resource path
2250
+ local_var_path = '/api/kratos/public/self-service/recovery'
2251
+
2252
+ # query parameters
2253
+ query_params = opts[:query_params] || {}
2254
+ query_params[:'flow'] = flow
2255
+
2256
+ # header parameters
2257
+ header_params = opts[:header_params] || {}
2258
+ # HTTP header 'Accept' (if needed)
2259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2260
+ # HTTP header 'Content-Type'
2261
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2262
+
2263
+ # form parameters
2264
+ form_params = opts[:form_params] || {}
2265
+
2266
+ # http body (model)
2267
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
2268
+
2269
+ # return_type
2270
+ return_type = opts[:debug_return_type]
2271
+
2272
+ # auth_names
2273
+ auth_names = opts[:debug_auth_names] || []
2274
+
2275
+ new_options = opts.merge(
2276
+ :operation => :"DefaultApi.submit_self_service_recovery_flow",
2277
+ :header_params => header_params,
2278
+ :query_params => query_params,
2279
+ :form_params => form_params,
2280
+ :body => post_body,
2281
+ :auth_names => auth_names,
2282
+ :return_type => return_type
2283
+ )
2284
+
2285
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2286
+ if @api_client.config.debugging
2287
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2288
+ end
2289
+ return data, status_code, headers
2290
+ end
2291
+
2292
+ # Complete Recovery Flow with Link Method
2293
+ # Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
2294
+ # @param [Hash] opts the optional parameters
2295
+ # @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.
2296
+ # @option opts [String] :flow The Flow ID format: uuid
2297
+ # @option opts [SubmitSelfServiceRecoveryFlowWithLinkMethod] :submit_self_service_recovery_flow_with_link_method
2298
+ # @return [nil]
2299
+ def submit_self_service_recovery_flow_with_link_method(opts = {})
2300
+ submit_self_service_recovery_flow_with_link_method_with_http_info(opts)
2301
+ nil
2302
+ end
2303
+
2304
+ # Complete Recovery Flow with Link Method
2305
+ # Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: &#x60;choose_method&#x60; expects &#x60;flow&#x60; (in the URL query) and &#x60;email&#x60; (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in &#x60;choose_method&#x60; state. &#x60;passed_challenge&#x60; expects a &#x60;token&#x60; to be sent in the URL query and given the nature of the flow (\&quot;sending a recovery link\&quot;) does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
2306
+ # @param [Hash] opts the optional parameters
2307
+ # @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.
2308
+ # @option opts [String] :flow The Flow ID format: uuid
2309
+ # @option opts [SubmitSelfServiceRecoveryFlowWithLinkMethod] :submit_self_service_recovery_flow_with_link_method
2310
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2311
+ def submit_self_service_recovery_flow_with_link_method_with_http_info(opts = {})
2312
+ if @api_client.config.debugging
2313
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_recovery_flow_with_link_method ...'
2314
+ end
2315
+ # resource path
2316
+ local_var_path = '/api/kratos/public/self-service/recovery/methods/link'
2317
+
2318
+ # query parameters
2319
+ query_params = opts[:query_params] || {}
2320
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
2321
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
2322
+
2323
+ # header parameters
2324
+ header_params = opts[:header_params] || {}
2325
+ # HTTP header 'Accept' (if needed)
2326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2327
+ # HTTP header 'Content-Type'
2328
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2329
+
2330
+ # form parameters
2331
+ form_params = opts[:form_params] || {}
2332
+
2333
+ # http body (model)
2334
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_recovery_flow_with_link_method'])
2335
+
2336
+ # return_type
2337
+ return_type = opts[:debug_return_type]
2338
+
2339
+ # auth_names
2340
+ auth_names = opts[:debug_auth_names] || []
2341
+
2342
+ new_options = opts.merge(
2343
+ :operation => :"DefaultApi.submit_self_service_recovery_flow_with_link_method",
2344
+ :header_params => header_params,
2345
+ :query_params => query_params,
2346
+ :form_params => form_params,
2347
+ :body => post_body,
2348
+ :auth_names => auth_names,
2349
+ :return_type => return_type
2350
+ )
2351
+
2352
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2353
+ if @api_client.config.debugging
2354
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_recovery_flow_with_link_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2355
+ end
2356
+ return data, status_code, headers
2357
+ end
2358
+
2359
+ # Submit a Registration Flow
2360
+ # Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
2361
+ # @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;).
2362
+ # @param [Hash] opts the optional parameters
2363
+ # @option opts [SubmitSelfServiceRegistrationFlow] :submit_self_service_registration_flow
2364
+ # @return [RegistrationViaApiResponse]
2365
+ def submit_self_service_registration_flow(flow, opts = {})
2366
+ data, _status_code, _headers = submit_self_service_registration_flow_with_http_info(flow, opts)
2367
+ data
2368
+ end
2369
+
2370
+ # Submit a Registration Flow
2371
+ # Use this endpoint to complete a registration flow by sending an identity&#39;s traits and password. This endpoint behaves differently for API and browser flows. API flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the &#x60;session&#x60; and &#x60;session_token&#x60; will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect &#x60;application/x-www-form-urlencoded&#x60; to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the &#x60;return_to&#x60; value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
2372
+ # @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;).
2373
+ # @param [Hash] opts the optional parameters
2374
+ # @option opts [SubmitSelfServiceRegistrationFlow] :submit_self_service_registration_flow
2375
+ # @return [Array<(RegistrationViaApiResponse, Integer, Hash)>] RegistrationViaApiResponse data, response status code and response headers
2376
+ def submit_self_service_registration_flow_with_http_info(flow, opts = {})
2377
+ if @api_client.config.debugging
2378
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_registration_flow ...'
2379
+ end
2380
+ # verify the required parameter 'flow' is set
2381
+ if @api_client.config.client_side_validation && flow.nil?
2382
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_registration_flow"
2383
+ end
2384
+ # resource path
2385
+ local_var_path = '/api/kratos/public/self-service/registration'
2386
+
2387
+ # query parameters
2388
+ query_params = opts[:query_params] || {}
2389
+ query_params[:'flow'] = flow
2390
+
2391
+ # header parameters
2392
+ header_params = opts[:header_params] || {}
2393
+ # HTTP header 'Accept' (if needed)
2394
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2395
+ # HTTP header 'Content-Type'
2396
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2397
+
2398
+ # form parameters
2399
+ form_params = opts[:form_params] || {}
2400
+
2401
+ # http body (model)
2402
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_registration_flow'])
2403
+
2404
+ # return_type
2405
+ return_type = opts[:debug_return_type] || 'RegistrationViaApiResponse'
2406
+
2407
+ # auth_names
2408
+ auth_names = opts[:debug_auth_names] || []
2409
+
2410
+ new_options = opts.merge(
2411
+ :operation => :"DefaultApi.submit_self_service_registration_flow",
2412
+ :header_params => header_params,
2413
+ :query_params => query_params,
2414
+ :form_params => form_params,
2415
+ :body => post_body,
2416
+ :auth_names => auth_names,
2417
+ :return_type => return_type
2418
+ )
2419
+
2420
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2421
+ if @api_client.config.debugging
2422
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2423
+ end
2424
+ return data, status_code, headers
2425
+ end
2426
+
2427
+ # Complete Settings Flow
2428
+ # Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
2429
+ # @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;).
2430
+ # @param [Hash] opts the optional parameters
2431
+ # @option opts [SubmitSelfServiceSettingsFlow] :submit_self_service_settings_flow
2432
+ # @return [SettingsViaApiResponse]
2433
+ def submit_self_service_settings_flow(flow, opts = {})
2434
+ data, _status_code, _headers = submit_self_service_settings_flow_with_http_info(flow, opts)
2435
+ data
2436
+ end
2437
+
2438
+ # Complete Settings Flow
2439
+ # Use this endpoint to complete a settings flow by sending an identity&#39;s updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached. Implies that the user needs to re-authenticate. Browser flows expect &#x60;application/x-www-form-urlencoded&#x60; to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the &#x60;return_to&#x60; value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
2440
+ # @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;).
2441
+ # @param [Hash] opts the optional parameters
2442
+ # @option opts [SubmitSelfServiceSettingsFlow] :submit_self_service_settings_flow
2443
+ # @return [Array<(SettingsViaApiResponse, Integer, Hash)>] SettingsViaApiResponse data, response status code and response headers
2444
+ def submit_self_service_settings_flow_with_http_info(flow, opts = {})
2445
+ if @api_client.config.debugging
2446
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_settings_flow ...'
2447
+ end
2448
+ # verify the required parameter 'flow' is set
2449
+ if @api_client.config.client_side_validation && flow.nil?
2450
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_settings_flow"
2451
+ end
2452
+ # resource path
2453
+ local_var_path = '/api/kratos/public/self-service/settings'
2454
+
2455
+ # query parameters
2456
+ query_params = opts[:query_params] || {}
2457
+ query_params[:'flow'] = flow
2458
+
2459
+ # header parameters
2460
+ header_params = opts[:header_params] || {}
2461
+ # HTTP header 'Accept' (if needed)
2462
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2463
+ # HTTP header 'Content-Type'
2464
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2465
+
2466
+ # form parameters
2467
+ form_params = opts[:form_params] || {}
2468
+
2469
+ # http body (model)
2470
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_settings_flow'])
2471
+
2472
+ # return_type
2473
+ return_type = opts[:debug_return_type] || 'SettingsViaApiResponse'
2474
+
2475
+ # auth_names
2476
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
2477
+
2478
+ new_options = opts.merge(
2479
+ :operation => :"DefaultApi.submit_self_service_settings_flow",
2480
+ :header_params => header_params,
2481
+ :query_params => query_params,
2482
+ :form_params => form_params,
2483
+ :body => post_body,
2484
+ :auth_names => auth_names,
2485
+ :return_type => return_type
2486
+ )
2487
+
2488
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2489
+ if @api_client.config.debugging
2490
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2491
+ end
2492
+ return data, status_code, headers
2493
+ end
2494
+
2495
+ # Complete Verification Flow
2496
+ # 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 it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` 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).
2497
+ # @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;).
2498
+ # @param [Hash] opts the optional parameters
2499
+ # @option opts [Object] :body
2500
+ # @return [nil]
2501
+ def submit_self_service_verification_flow(flow, opts = {})
2502
+ submit_self_service_verification_flow_with_http_info(flow, opts)
2503
+ nil
2504
+ end
2505
+
2506
+ # Complete Verification Flow
2507
+ # 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 it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; 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).
2508
+ # @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;).
2509
+ # @param [Hash] opts the optional parameters
2510
+ # @option opts [Object] :body
2511
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2512
+ def submit_self_service_verification_flow_with_http_info(flow, opts = {})
2513
+ if @api_client.config.debugging
2514
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_verification_flow ...'
2515
+ end
2516
+ # verify the required parameter 'flow' is set
2517
+ if @api_client.config.client_side_validation && flow.nil?
2518
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_verification_flow"
2519
+ end
2520
+ # resource path
2521
+ local_var_path = '/api/kratos/public/self-service/verification/methods/link'
2522
+
2523
+ # query parameters
2524
+ query_params = opts[:query_params] || {}
2525
+ query_params[:'flow'] = flow
2526
+
2527
+ # header parameters
2528
+ header_params = opts[:header_params] || {}
2529
+ # HTTP header 'Accept' (if needed)
2530
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2531
+ # HTTP header 'Content-Type'
2532
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2533
+
2534
+ # form parameters
2535
+ form_params = opts[:form_params] || {}
2536
+
2537
+ # http body (model)
2538
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
2539
+
2540
+ # return_type
2541
+ return_type = opts[:debug_return_type]
2542
+
2543
+ # auth_names
2544
+ auth_names = opts[:debug_auth_names] || []
2545
+
2546
+ new_options = opts.merge(
2547
+ :operation => :"DefaultApi.submit_self_service_verification_flow",
2548
+ :header_params => header_params,
2549
+ :query_params => query_params,
2550
+ :form_params => form_params,
2551
+ :body => post_body,
2552
+ :auth_names => auth_names,
2553
+ :return_type => return_type
2554
+ )
2555
+
2556
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2557
+ if @api_client.config.debugging
2558
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2559
+ end
2560
+ return data, status_code, headers
2561
+ end
2562
+
2563
+ # Check Who the Current HTTP Session Belongs To
2564
+ # Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response. This endpoint is useful for: 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!
2565
+ # @param [Hash] opts the optional parameters
2566
+ # @option opts [String] :x_session_token
2567
+ # @return [Session]
2568
+ def to_session(opts = {})
2569
+ data, _status_code, _headers = to_session_with_http_info(opts)
2570
+ data
2571
+ end
2572
+
2573
+ # Check Who the Current HTTP Session Belongs To
2574
+ # Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the &#39;X-Kratos-Authenticated-Identity-Id&#39; header in the response. This endpoint is useful for: 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!
2575
+ # @param [Hash] opts the optional parameters
2576
+ # @option opts [String] :x_session_token
2577
+ # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
2578
+ def to_session_with_http_info(opts = {})
2579
+ if @api_client.config.debugging
2580
+ @api_client.config.logger.debug 'Calling API: DefaultApi.to_session ...'
2581
+ end
2582
+ # resource path
2583
+ local_var_path = '/api/kratos/public/sessions/whoami'
2584
+
2585
+ # query parameters
2586
+ query_params = opts[:query_params] || {}
2587
+
2588
+ # header parameters
2589
+ header_params = opts[:header_params] || {}
2590
+ # HTTP header 'Accept' (if needed)
2591
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2592
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
2593
+
2594
+ # form parameters
2595
+ form_params = opts[:form_params] || {}
2596
+
2597
+ # http body (model)
2598
+ post_body = opts[:debug_body]
2599
+
2600
+ # return_type
2601
+ return_type = opts[:debug_return_type] || 'Session'
2602
+
2603
+ # auth_names
2604
+ auth_names = opts[:debug_auth_names] || ['sessionCookie']
2605
+
2606
+ new_options = opts.merge(
2607
+ :operation => :"DefaultApi.to_session",
2608
+ :header_params => header_params,
2609
+ :query_params => query_params,
2610
+ :form_params => form_params,
2611
+ :body => post_body,
2612
+ :auth_names => auth_names,
2613
+ :return_type => return_type
2614
+ )
2615
+
2616
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2617
+ if @api_client.config.debugging
2618
+ @api_client.config.logger.debug "API called: DefaultApi#to_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2619
+ end
2620
+ return data, status_code, headers
2621
+ end
2622
+
2623
+ # Update an Identity
2624
+ # 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).
2625
+ # @param id [String] ID must be set to the ID of identity you want to update
2626
+ # @param [Hash] opts the optional parameters
2627
+ # @option opts [UpdateIdentity] :update_identity
2628
+ # @return [Identity]
2629
+ def update_identity_admin(id, opts = {})
2630
+ data, _status_code, _headers = update_identity_admin_with_http_info(id, opts)
2631
+ data
2632
+ end
2633
+
2634
+ # Update an Identity
2635
+ # 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).
2636
+ # @param id [String] ID must be set to the ID of identity you want to update
2637
+ # @param [Hash] opts the optional parameters
2638
+ # @option opts [UpdateIdentity] :update_identity
2639
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
2640
+ def update_identity_admin_with_http_info(id, opts = {})
2641
+ if @api_client.config.debugging
2642
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_identity_admin ...'
2643
+ end
2644
+ # verify the required parameter 'id' is set
2645
+ if @api_client.config.client_side_validation && id.nil?
2646
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_identity_admin"
2647
+ end
2648
+ # resource path
2649
+ local_var_path = '/api/kratos/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2650
+
2651
+ # query parameters
2652
+ query_params = opts[:query_params] || {}
2653
+
2654
+ # header parameters
2655
+ header_params = opts[:header_params] || {}
2656
+ # HTTP header 'Accept' (if needed)
2657
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2658
+ # HTTP header 'Content-Type'
2659
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2660
+
2661
+ # form parameters
2662
+ form_params = opts[:form_params] || {}
2663
+
2664
+ # http body (model)
2665
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_identity'])
2666
+
2667
+ # return_type
2668
+ return_type = opts[:debug_return_type] || 'Identity'
2669
+
2670
+ # auth_names
2671
+ auth_names = opts[:debug_auth_names] || ['oryToken']
2672
+
2673
+ new_options = opts.merge(
2674
+ :operation => :"DefaultApi.update_identity_admin",
2675
+ :header_params => header_params,
2676
+ :query_params => query_params,
2677
+ :form_params => form_params,
2678
+ :body => post_body,
2679
+ :auth_names => auth_names,
2680
+ :return_type => return_type
2681
+ )
2682
+
2683
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2684
+ if @api_client.config.debugging
2685
+ @api_client.config.logger.debug "API called: DefaultApi#update_identity_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2686
+ end
2687
+ return data, status_code, headers
2688
+ end
2689
+ end
2690
+ end