ory-client 0.0.1.alpha5

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 +2922 -0
  15. data/docs/ErrorResponse.md +18 -0
  16. data/docs/GenericError.md +30 -0
  17. data/docs/GraphDriverData.md +20 -0
  18. data/docs/HealthNotReadyStatus.md +18 -0
  19. data/docs/HealthStatus.md +18 -0
  20. data/docs/IdResponse.md +18 -0
  21. data/docs/Identity.md +32 -0
  22. data/docs/IdentityCredentials.md +26 -0
  23. data/docs/ImageDeleteResponseItem.md +20 -0
  24. data/docs/ImageSummary.md +36 -0
  25. data/docs/InlineResponse200.md +18 -0
  26. data/docs/InlineResponse2001.md +18 -0
  27. data/docs/InlineResponse503.md +18 -0
  28. data/docs/JsonError.md +18 -0
  29. data/docs/LoginFlow.md +36 -0
  30. data/docs/LoginViaApiResponse.md +20 -0
  31. data/docs/Meta.md +18 -0
  32. data/docs/Plugin.md +28 -0
  33. data/docs/PluginConfig.md +48 -0
  34. data/docs/PluginConfigArgs.md +24 -0
  35. data/docs/PluginConfigInterface.md +20 -0
  36. data/docs/PluginConfigLinux.md +22 -0
  37. data/docs/PluginConfigNetwork.md +18 -0
  38. data/docs/PluginConfigRootfs.md +20 -0
  39. data/docs/PluginConfigUser.md +20 -0
  40. data/docs/PluginDevice.md +24 -0
  41. data/docs/PluginEnv.md +24 -0
  42. data/docs/PluginInterfaceType.md +22 -0
  43. data/docs/PluginMount.md +30 -0
  44. data/docs/PluginSettings.md +24 -0
  45. data/docs/Port.md +24 -0
  46. data/docs/RecoveryAddress.md +26 -0
  47. data/docs/RecoveryFlow.md +32 -0
  48. data/docs/RecoveryLink.md +20 -0
  49. data/docs/RegistrationFlow.md +30 -0
  50. data/docs/RegistrationViaApiResponse.md +22 -0
  51. data/docs/RevokeSession.md +18 -0
  52. data/docs/SelfServiceErrorContainer.md +24 -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.rb +117 -0
  84. data/lib/ory-client/api/default_api.rb +2705 -0
  85. data/lib/ory-client/api_client.rb +390 -0
  86. data/lib/ory-client/api_error.rb +57 -0
  87. data/lib/ory-client/configuration.rb +297 -0
  88. data/lib/ory-client/models/authenticate_ok_body.rb +240 -0
  89. data/lib/ory-client/models/container_change_response_item.rb +240 -0
  90. data/lib/ory-client/models/container_create_created_body.rb +242 -0
  91. data/lib/ory-client/models/container_top_ok_body.rb +244 -0
  92. data/lib/ory-client/models/container_update_ok_body.rb +227 -0
  93. data/lib/ory-client/models/container_wait_ok_body.rb +239 -0
  94. data/lib/ory-client/models/container_wait_ok_body_error.rb +220 -0
  95. data/lib/ory-client/models/create_identity.rb +239 -0
  96. data/lib/ory-client/models/create_recovery_link.rb +250 -0
  97. data/lib/ory-client/models/error_response.rb +224 -0
  98. data/lib/ory-client/models/generic_error.rb +286 -0
  99. data/lib/ory-client/models/graph_driver_data.rb +241 -0
  100. data/lib/ory-client/models/health_not_ready_status.rb +221 -0
  101. data/lib/ory-client/models/health_status.rb +219 -0
  102. data/lib/ory-client/models/id_response.rb +225 -0
  103. data/lib/ory-client/models/identity.rb +309 -0
  104. data/lib/ory-client/models/identity_credentials.rb +261 -0
  105. data/lib/ory-client/models/image_delete_response_item.rb +230 -0
  106. data/lib/ory-client/models/image_summary.rb +366 -0
  107. data/lib/ory-client/models/inline_response200.rb +224 -0
  108. data/lib/ory-client/models/inline_response2001.rb +224 -0
  109. data/lib/ory-client/models/inline_response503.rb +226 -0
  110. data/lib/ory-client/models/json_error.rb +224 -0
  111. data/lib/ory-client/models/login_flow.rb +338 -0
  112. data/lib/ory-client/models/login_via_api_response.rb +239 -0
  113. data/lib/ory-client/models/meta.rb +219 -0
  114. data/lib/ory-client/models/plugin.rb +288 -0
  115. data/lib/ory-client/models/plugin_config.rb +434 -0
  116. data/lib/ory-client/models/plugin_config_args.rb +274 -0
  117. data/lib/ory-client/models/plugin_config_interface.rb +242 -0
  118. data/lib/ory-client/models/plugin_config_linux.rb +259 -0
  119. data/lib/ory-client/models/plugin_config_network.rb +225 -0
  120. data/lib/ory-client/models/plugin_config_rootfs.rb +232 -0
  121. data/lib/ory-client/models/plugin_config_user.rb +230 -0
  122. data/lib/ory-client/models/plugin_device.rb +272 -0
  123. data/lib/ory-client/models/plugin_env.rb +272 -0
  124. data/lib/ory-client/models/plugin_interface_type.rb +255 -0
  125. data/lib/ory-client/models/plugin_mount.rb +319 -0
  126. data/lib/ory-client/models/plugin_settings.rb +277 -0
  127. data/lib/ory-client/models/port.rb +260 -0
  128. data/lib/ory-client/models/recovery_address.rb +271 -0
  129. data/lib/ory-client/models/recovery_flow.rb +317 -0
  130. data/lib/ory-client/models/recovery_link.rb +234 -0
  131. data/lib/ory-client/models/registration_flow.rb +302 -0
  132. data/lib/ory-client/models/registration_via_api_response.rb +248 -0
  133. data/lib/ory-client/models/revoke_session.rb +224 -0
  134. data/lib/ory-client/models/self_service_error_container.rb +260 -0
  135. data/lib/ory-client/models/service_update_response.rb +222 -0
  136. data/lib/ory-client/models/session.rb +288 -0
  137. data/lib/ory-client/models/settings_flow.rb +331 -0
  138. data/lib/ory-client/models/settings_profile_form_config.rb +266 -0
  139. data/lib/ory-client/models/settings_via_api_response.rb +238 -0
  140. data/lib/ory-client/models/submit_self_service_browser_settings_oidc_flow_payload.rb +239 -0
  141. data/lib/ory-client/models/submit_self_service_login_flow.rb +104 -0
  142. data/lib/ory-client/models/submit_self_service_login_flow_with_password_method.rb +249 -0
  143. data/lib/ory-client/models/submit_self_service_recovery_flow_with_link_method.rb +229 -0
  144. data/lib/ory-client/models/submit_self_service_registration_flow.rb +104 -0
  145. data/lib/ory-client/models/submit_self_service_registration_flow_with_password_method.rb +276 -0
  146. data/lib/ory-client/models/submit_self_service_settings_flow.rb +105 -0
  147. data/lib/ory-client/models/submit_self_service_settings_flow_with_password_method.rb +244 -0
  148. data/lib/ory-client/models/submit_self_service_settings_flow_with_profile_method.rb +245 -0
  149. data/lib/ory-client/models/submit_self_service_verification_flow_with_link_method.rb +230 -0
  150. data/lib/ory-client/models/ui_container.rb +267 -0
  151. data/lib/ory-client/models/ui_node.rb +282 -0
  152. data/lib/ory-client/models/ui_node_anchor_attributes.rb +238 -0
  153. data/lib/ory-client/models/ui_node_attributes.rb +107 -0
  154. data/lib/ory-client/models/ui_node_image_attributes.rb +224 -0
  155. data/lib/ory-client/models/ui_node_input_attributes.rb +292 -0
  156. data/lib/ory-client/models/ui_node_input_attributes_value.rb +106 -0
  157. data/lib/ory-client/models/ui_node_text_attributes.rb +223 -0
  158. data/lib/ory-client/models/ui_text.rb +262 -0
  159. data/lib/ory-client/models/update_identity.rb +234 -0
  160. data/lib/ory-client/models/verifiable_identity_address.rb +313 -0
  161. data/lib/ory-client/models/verification_flow.rb +307 -0
  162. data/lib/ory-client/models/version.rb +219 -0
  163. data/lib/ory-client/models/volume.rb +335 -0
  164. data/lib/ory-client/models/volume_usage_data.rb +240 -0
  165. data/lib/ory-client/version.rb +15 -0
  166. data/ory-client.gemspec +38 -0
  167. data/spec/api/default_api_spec.rb +549 -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_response_spec.rb +34 -0
  180. data/spec/models/generic_error_spec.rb +70 -0
  181. data/spec/models/graph_driver_data_spec.rb +40 -0
  182. data/spec/models/health_not_ready_status_spec.rb +34 -0
  183. data/spec/models/health_status_spec.rb +34 -0
  184. data/spec/models/id_response_spec.rb +34 -0
  185. data/spec/models/identity_credentials_spec.rb +58 -0
  186. data/spec/models/identity_spec.rb +76 -0
  187. data/spec/models/image_delete_response_item_spec.rb +40 -0
  188. data/spec/models/image_summary_spec.rb +88 -0
  189. data/spec/models/inline_response2001_spec.rb +34 -0
  190. data/spec/models/inline_response200_spec.rb +34 -0
  191. data/spec/models/inline_response503_spec.rb +34 -0
  192. data/spec/models/json_error_spec.rb +34 -0
  193. data/spec/models/login_flow_spec.rb +88 -0
  194. data/spec/models/login_via_api_response_spec.rb +40 -0
  195. data/spec/models/meta_spec.rb +34 -0
  196. data/spec/models/plugin_config_args_spec.rb +52 -0
  197. data/spec/models/plugin_config_interface_spec.rb +40 -0
  198. data/spec/models/plugin_config_linux_spec.rb +46 -0
  199. data/spec/models/plugin_config_network_spec.rb +34 -0
  200. data/spec/models/plugin_config_rootfs_spec.rb +40 -0
  201. data/spec/models/plugin_config_spec.rb +124 -0
  202. data/spec/models/plugin_config_user_spec.rb +40 -0
  203. data/spec/models/plugin_device_spec.rb +52 -0
  204. data/spec/models/plugin_env_spec.rb +52 -0
  205. data/spec/models/plugin_interface_type_spec.rb +46 -0
  206. data/spec/models/plugin_mount_spec.rb +70 -0
  207. data/spec/models/plugin_settings_spec.rb +52 -0
  208. data/spec/models/plugin_spec.rb +64 -0
  209. data/spec/models/port_spec.rb +52 -0
  210. data/spec/models/recovery_address_spec.rb +58 -0
  211. data/spec/models/recovery_flow_spec.rb +76 -0
  212. data/spec/models/recovery_link_spec.rb +40 -0
  213. data/spec/models/registration_flow_spec.rb +70 -0
  214. data/spec/models/registration_via_api_response_spec.rb +46 -0
  215. data/spec/models/revoke_session_spec.rb +34 -0
  216. data/spec/models/self_service_error_container_spec.rb +52 -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'
14
+
15
+ instance = OryHydraClient::VolumeUsageData.new(
16
+ ref_count: null,
17
+ size: null
18
+ )
19
+ ```
20
+
data/lib/ory-client.rb ADDED
@@ -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.5
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/api_client'
15
+ require 'ory-client/api_error'
16
+ require 'ory-client/version'
17
+ require 'ory-client/configuration'
18
+
19
+ # Models
20
+ require 'ory-client/models/authenticate_ok_body'
21
+ require 'ory-client/models/container_change_response_item'
22
+ require 'ory-client/models/container_create_created_body'
23
+ require 'ory-client/models/container_top_ok_body'
24
+ require 'ory-client/models/container_update_ok_body'
25
+ require 'ory-client/models/container_wait_ok_body'
26
+ require 'ory-client/models/container_wait_ok_body_error'
27
+ require 'ory-client/models/create_identity'
28
+ require 'ory-client/models/create_recovery_link'
29
+ require 'ory-client/models/error_response'
30
+ require 'ory-client/models/generic_error'
31
+ require 'ory-client/models/graph_driver_data'
32
+ require 'ory-client/models/health_not_ready_status'
33
+ require 'ory-client/models/health_status'
34
+ require 'ory-client/models/id_response'
35
+ require 'ory-client/models/identity'
36
+ require 'ory-client/models/identity_credentials'
37
+ require 'ory-client/models/image_delete_response_item'
38
+ require 'ory-client/models/image_summary'
39
+ require 'ory-client/models/inline_response200'
40
+ require 'ory-client/models/inline_response2001'
41
+ require 'ory-client/models/inline_response503'
42
+ require 'ory-client/models/json_error'
43
+ require 'ory-client/models/login_flow'
44
+ require 'ory-client/models/login_via_api_response'
45
+ require 'ory-client/models/meta'
46
+ require 'ory-client/models/plugin'
47
+ require 'ory-client/models/plugin_config'
48
+ require 'ory-client/models/plugin_config_args'
49
+ require 'ory-client/models/plugin_config_interface'
50
+ require 'ory-client/models/plugin_config_linux'
51
+ require 'ory-client/models/plugin_config_network'
52
+ require 'ory-client/models/plugin_config_rootfs'
53
+ require 'ory-client/models/plugin_config_user'
54
+ require 'ory-client/models/plugin_device'
55
+ require 'ory-client/models/plugin_env'
56
+ require 'ory-client/models/plugin_interface_type'
57
+ require 'ory-client/models/plugin_mount'
58
+ require 'ory-client/models/plugin_settings'
59
+ require 'ory-client/models/port'
60
+ require 'ory-client/models/recovery_address'
61
+ require 'ory-client/models/recovery_flow'
62
+ require 'ory-client/models/recovery_link'
63
+ require 'ory-client/models/registration_flow'
64
+ require 'ory-client/models/registration_via_api_response'
65
+ require 'ory-client/models/revoke_session'
66
+ require 'ory-client/models/self_service_error_container'
67
+ require 'ory-client/models/service_update_response'
68
+ require 'ory-client/models/session'
69
+ require 'ory-client/models/settings_flow'
70
+ require 'ory-client/models/settings_profile_form_config'
71
+ require 'ory-client/models/settings_via_api_response'
72
+ require 'ory-client/models/submit_self_service_browser_settings_oidc_flow_payload'
73
+ require 'ory-client/models/submit_self_service_login_flow'
74
+ require 'ory-client/models/submit_self_service_login_flow_with_password_method'
75
+ require 'ory-client/models/submit_self_service_recovery_flow_with_link_method'
76
+ require 'ory-client/models/submit_self_service_registration_flow'
77
+ require 'ory-client/models/submit_self_service_registration_flow_with_password_method'
78
+ require 'ory-client/models/submit_self_service_settings_flow'
79
+ require 'ory-client/models/submit_self_service_settings_flow_with_password_method'
80
+ require 'ory-client/models/submit_self_service_settings_flow_with_profile_method'
81
+ require 'ory-client/models/submit_self_service_verification_flow_with_link_method'
82
+ require 'ory-client/models/ui_container'
83
+ require 'ory-client/models/ui_node'
84
+ require 'ory-client/models/ui_node_anchor_attributes'
85
+ require 'ory-client/models/ui_node_attributes'
86
+ require 'ory-client/models/ui_node_image_attributes'
87
+ require 'ory-client/models/ui_node_input_attributes'
88
+ require 'ory-client/models/ui_node_input_attributes_value'
89
+ require 'ory-client/models/ui_node_text_attributes'
90
+ require 'ory-client/models/ui_text'
91
+ require 'ory-client/models/update_identity'
92
+ require 'ory-client/models/verifiable_identity_address'
93
+ require 'ory-client/models/verification_flow'
94
+ require 'ory-client/models/version'
95
+ require 'ory-client/models/volume'
96
+ require 'ory-client/models/volume_usage_data'
97
+
98
+ # APIs
99
+ require 'ory-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,2705 @@
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.5
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 [SelfServiceErrorContainer]
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<(SelfServiceErrorContainer, Integer, Hash)>] SelfServiceErrorContainer 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] || 'SelfServiceErrorContainer'
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 [SelfServiceErrorContainer]
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<(SelfServiceErrorContainer, Integer, Hash)>] SelfServiceErrorContainer 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] || 'SelfServiceErrorContainer'
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
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
909
+ # @return [SettingsFlow]
910
+ def get_self_service_settings_flow(id, opts = {})
911
+ data, _status_code, _headers = get_self_service_settings_flow_with_http_info(id, opts)
912
+ data
913
+ end
914
+
915
+ # Get Settings Flow
916
+ # 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).
917
+ # @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;).
918
+ # @param [Hash] opts the optional parameters
919
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
920
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
921
+ def get_self_service_settings_flow_with_http_info(id, opts = {})
922
+ if @api_client.config.debugging
923
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_settings_flow ...'
924
+ end
925
+ # verify the required parameter 'id' is set
926
+ if @api_client.config.client_side_validation && id.nil?
927
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_settings_flow"
928
+ end
929
+ # resource path
930
+ local_var_path = '/api/kratos/public/self-service/settings/flows'
931
+
932
+ # query parameters
933
+ query_params = opts[:query_params] || {}
934
+ query_params[:'id'] = id
935
+
936
+ # header parameters
937
+ header_params = opts[:header_params] || {}
938
+ # HTTP header 'Accept' (if needed)
939
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
940
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
941
+
942
+ # form parameters
943
+ form_params = opts[:form_params] || {}
944
+
945
+ # http body (model)
946
+ post_body = opts[:debug_body]
947
+
948
+ # return_type
949
+ return_type = opts[:debug_return_type] || 'SettingsFlow'
950
+
951
+ # auth_names
952
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
953
+
954
+ new_options = opts.merge(
955
+ :operation => :"DefaultApi.get_self_service_settings_flow",
956
+ :header_params => header_params,
957
+ :query_params => query_params,
958
+ :form_params => form_params,
959
+ :body => post_body,
960
+ :auth_names => auth_names,
961
+ :return_type => return_type
962
+ )
963
+
964
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
965
+ if @api_client.config.debugging
966
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
967
+ end
968
+ return data, status_code, headers
969
+ end
970
+
971
+ # Get Settings Flow
972
+ # 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).
973
+ # @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;).
974
+ # @param [Hash] opts the optional parameters
975
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
976
+ # @return [SettingsFlow]
977
+ def get_self_service_settings_flow_admin(id, opts = {})
978
+ data, _status_code, _headers = get_self_service_settings_flow_admin_with_http_info(id, opts)
979
+ data
980
+ end
981
+
982
+ # Get Settings Flow
983
+ # 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).
984
+ # @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;).
985
+ # @param [Hash] opts the optional parameters
986
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
987
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
988
+ def get_self_service_settings_flow_admin_with_http_info(id, opts = {})
989
+ if @api_client.config.debugging
990
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_settings_flow_admin ...'
991
+ end
992
+ # verify the required parameter 'id' is set
993
+ if @api_client.config.client_side_validation && id.nil?
994
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_settings_flow_admin"
995
+ end
996
+ # resource path
997
+ local_var_path = '/api/kratos/admin/self-service/settings/flows'
998
+
999
+ # query parameters
1000
+ query_params = opts[:query_params] || {}
1001
+ query_params[:'id'] = id
1002
+
1003
+ # header parameters
1004
+ header_params = opts[:header_params] || {}
1005
+ # HTTP header 'Accept' (if needed)
1006
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1007
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
1008
+
1009
+ # form parameters
1010
+ form_params = opts[:form_params] || {}
1011
+
1012
+ # http body (model)
1013
+ post_body = opts[:debug_body]
1014
+
1015
+ # return_type
1016
+ return_type = opts[:debug_return_type] || 'SettingsFlow'
1017
+
1018
+ # auth_names
1019
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1020
+
1021
+ new_options = opts.merge(
1022
+ :operation => :"DefaultApi.get_self_service_settings_flow_admin",
1023
+ :header_params => header_params,
1024
+ :query_params => query_params,
1025
+ :form_params => form_params,
1026
+ :body => post_body,
1027
+ :auth_names => auth_names,
1028
+ :return_type => return_type
1029
+ )
1030
+
1031
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1032
+ if @api_client.config.debugging
1033
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_settings_flow_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1034
+ end
1035
+ return data, status_code, headers
1036
+ end
1037
+
1038
+ # Get Verification Flow
1039
+ # 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).
1040
+ # @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;).
1041
+ # @param [Hash] opts the optional parameters
1042
+ # @return [VerificationFlow]
1043
+ def get_self_service_verification_flow(id, opts = {})
1044
+ data, _status_code, _headers = get_self_service_verification_flow_with_http_info(id, opts)
1045
+ data
1046
+ end
1047
+
1048
+ # Get Verification Flow
1049
+ # 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).
1050
+ # @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;).
1051
+ # @param [Hash] opts the optional parameters
1052
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
1053
+ def get_self_service_verification_flow_with_http_info(id, opts = {})
1054
+ if @api_client.config.debugging
1055
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_verification_flow ...'
1056
+ end
1057
+ # verify the required parameter 'id' is set
1058
+ if @api_client.config.client_side_validation && id.nil?
1059
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_verification_flow"
1060
+ end
1061
+ # resource path
1062
+ local_var_path = '/api/kratos/public/self-service/verification/flows'
1063
+
1064
+ # query parameters
1065
+ query_params = opts[:query_params] || {}
1066
+ query_params[:'id'] = id
1067
+
1068
+ # header parameters
1069
+ header_params = opts[:header_params] || {}
1070
+ # HTTP header 'Accept' (if needed)
1071
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1072
+
1073
+ # form parameters
1074
+ form_params = opts[:form_params] || {}
1075
+
1076
+ # http body (model)
1077
+ post_body = opts[:debug_body]
1078
+
1079
+ # return_type
1080
+ return_type = opts[:debug_return_type] || 'VerificationFlow'
1081
+
1082
+ # auth_names
1083
+ auth_names = opts[:debug_auth_names] || []
1084
+
1085
+ new_options = opts.merge(
1086
+ :operation => :"DefaultApi.get_self_service_verification_flow",
1087
+ :header_params => header_params,
1088
+ :query_params => query_params,
1089
+ :form_params => form_params,
1090
+ :body => post_body,
1091
+ :auth_names => auth_names,
1092
+ :return_type => return_type
1093
+ )
1094
+
1095
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1096
+ if @api_client.config.debugging
1097
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1098
+ end
1099
+ return data, status_code, headers
1100
+ end
1101
+
1102
+ # Get Verification Flow
1103
+ # 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).
1104
+ # @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;).
1105
+ # @param [Hash] opts the optional parameters
1106
+ # @return [VerificationFlow]
1107
+ def get_self_service_verification_flow_admin(id, opts = {})
1108
+ data, _status_code, _headers = get_self_service_verification_flow_admin_with_http_info(id, opts)
1109
+ data
1110
+ end
1111
+
1112
+ # Get Verification Flow
1113
+ # 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).
1114
+ # @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;).
1115
+ # @param [Hash] opts the optional parameters
1116
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
1117
+ def get_self_service_verification_flow_admin_with_http_info(id, opts = {})
1118
+ if @api_client.config.debugging
1119
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_self_service_verification_flow_admin ...'
1120
+ end
1121
+ # verify the required parameter 'id' is set
1122
+ if @api_client.config.client_side_validation && id.nil?
1123
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_self_service_verification_flow_admin"
1124
+ end
1125
+ # resource path
1126
+ local_var_path = '/api/kratos/admin/self-service/verification/flows'
1127
+
1128
+ # query parameters
1129
+ query_params = opts[:query_params] || {}
1130
+ query_params[:'id'] = id
1131
+
1132
+ # header parameters
1133
+ header_params = opts[:header_params] || {}
1134
+ # HTTP header 'Accept' (if needed)
1135
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1136
+
1137
+ # form parameters
1138
+ form_params = opts[:form_params] || {}
1139
+
1140
+ # http body (model)
1141
+ post_body = opts[:debug_body]
1142
+
1143
+ # return_type
1144
+ return_type = opts[:debug_return_type] || 'VerificationFlow'
1145
+
1146
+ # auth_names
1147
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1148
+
1149
+ new_options = opts.merge(
1150
+ :operation => :"DefaultApi.get_self_service_verification_flow_admin",
1151
+ :header_params => header_params,
1152
+ :query_params => query_params,
1153
+ :form_params => form_params,
1154
+ :body => post_body,
1155
+ :auth_names => auth_names,
1156
+ :return_type => return_type
1157
+ )
1158
+
1159
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1160
+ if @api_client.config.debugging
1161
+ @api_client.config.logger.debug "API called: DefaultApi#get_self_service_verification_flow_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1162
+ end
1163
+ return data, status_code, headers
1164
+ end
1165
+
1166
+ # Return Running Software Version.
1167
+ # 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.
1168
+ # @param [Hash] opts the optional parameters
1169
+ # @return [InlineResponse2001]
1170
+ def get_version_admin(opts = {})
1171
+ data, _status_code, _headers = get_version_admin_with_http_info(opts)
1172
+ data
1173
+ end
1174
+
1175
+ # Return Running Software Version.
1176
+ # 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.
1177
+ # @param [Hash] opts the optional parameters
1178
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
1179
+ def get_version_admin_with_http_info(opts = {})
1180
+ if @api_client.config.debugging
1181
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_version_admin ...'
1182
+ end
1183
+ # resource path
1184
+ local_var_path = '/api/kratos/admin/version'
1185
+
1186
+ # query parameters
1187
+ query_params = opts[:query_params] || {}
1188
+
1189
+ # header parameters
1190
+ header_params = opts[:header_params] || {}
1191
+ # HTTP header 'Accept' (if needed)
1192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1193
+
1194
+ # form parameters
1195
+ form_params = opts[:form_params] || {}
1196
+
1197
+ # http body (model)
1198
+ post_body = opts[:debug_body]
1199
+
1200
+ # return_type
1201
+ return_type = opts[:debug_return_type] || 'InlineResponse2001'
1202
+
1203
+ # auth_names
1204
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1205
+
1206
+ new_options = opts.merge(
1207
+ :operation => :"DefaultApi.get_version_admin",
1208
+ :header_params => header_params,
1209
+ :query_params => query_params,
1210
+ :form_params => form_params,
1211
+ :body => post_body,
1212
+ :auth_names => auth_names,
1213
+ :return_type => return_type
1214
+ )
1215
+
1216
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1217
+ if @api_client.config.debugging
1218
+ @api_client.config.logger.debug "API called: DefaultApi#get_version_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1219
+ end
1220
+ return data, status_code, headers
1221
+ end
1222
+
1223
+ # Initialize Browser-Based Logout User Flow
1224
+ # 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).
1225
+ # @param [Hash] opts the optional parameters
1226
+ # @return [nil]
1227
+ def initialize_self_service_browser_logout_flow(opts = {})
1228
+ initialize_self_service_browser_logout_flow_with_http_info(opts)
1229
+ nil
1230
+ end
1231
+
1232
+ # Initialize Browser-Based Logout User Flow
1233
+ # 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).
1234
+ # @param [Hash] opts the optional parameters
1235
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1236
+ def initialize_self_service_browser_logout_flow_with_http_info(opts = {})
1237
+ if @api_client.config.debugging
1238
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_browser_logout_flow ...'
1239
+ end
1240
+ # resource path
1241
+ local_var_path = '/api/kratos/public/self-service/browser/flows/logout'
1242
+
1243
+ # query parameters
1244
+ query_params = opts[:query_params] || {}
1245
+
1246
+ # header parameters
1247
+ header_params = opts[:header_params] || {}
1248
+ # HTTP header 'Accept' (if needed)
1249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1250
+
1251
+ # form parameters
1252
+ form_params = opts[:form_params] || {}
1253
+
1254
+ # http body (model)
1255
+ post_body = opts[:debug_body]
1256
+
1257
+ # return_type
1258
+ return_type = opts[:debug_return_type]
1259
+
1260
+ # auth_names
1261
+ auth_names = opts[:debug_auth_names] || []
1262
+
1263
+ new_options = opts.merge(
1264
+ :operation => :"DefaultApi.initialize_self_service_browser_logout_flow",
1265
+ :header_params => header_params,
1266
+ :query_params => query_params,
1267
+ :form_params => form_params,
1268
+ :body => post_body,
1269
+ :auth_names => auth_names,
1270
+ :return_type => return_type
1271
+ )
1272
+
1273
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1274
+ if @api_client.config.debugging
1275
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_browser_logout_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1276
+ end
1277
+ return data, status_code, headers
1278
+ end
1279
+
1280
+ # Initialize Login Flow for browsers
1281
+ # 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).
1282
+ # @param [Hash] opts the optional parameters
1283
+ # @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.
1284
+ # @return [nil]
1285
+ def initialize_self_service_login_for_browsers(opts = {})
1286
+ initialize_self_service_login_for_browsers_with_http_info(opts)
1287
+ nil
1288
+ end
1289
+
1290
+ # Initialize Login Flow for browsers
1291
+ # 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).
1292
+ # @param [Hash] opts the optional parameters
1293
+ # @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.
1294
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1295
+ def initialize_self_service_login_for_browsers_with_http_info(opts = {})
1296
+ if @api_client.config.debugging
1297
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_login_for_browsers ...'
1298
+ end
1299
+ # resource path
1300
+ local_var_path = '/api/kratos/public/self-service/login/browser'
1301
+
1302
+ # query parameters
1303
+ query_params = opts[:query_params] || {}
1304
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
1305
+
1306
+ # header parameters
1307
+ header_params = opts[:header_params] || {}
1308
+ # HTTP header 'Accept' (if needed)
1309
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1310
+
1311
+ # form parameters
1312
+ form_params = opts[:form_params] || {}
1313
+
1314
+ # http body (model)
1315
+ post_body = opts[:debug_body]
1316
+
1317
+ # return_type
1318
+ return_type = opts[:debug_return_type]
1319
+
1320
+ # auth_names
1321
+ auth_names = opts[:debug_auth_names] || []
1322
+
1323
+ new_options = opts.merge(
1324
+ :operation => :"DefaultApi.initialize_self_service_login_for_browsers",
1325
+ :header_params => header_params,
1326
+ :query_params => query_params,
1327
+ :form_params => form_params,
1328
+ :body => post_body,
1329
+ :auth_names => auth_names,
1330
+ :return_type => return_type
1331
+ )
1332
+
1333
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1334
+ if @api_client.config.debugging
1335
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_login_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1336
+ end
1337
+ return data, status_code, headers
1338
+ end
1339
+
1340
+ # Initialize Login Flow for Native Apps and API clients
1341
+ # 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).
1342
+ # @param [Hash] opts the optional parameters
1343
+ # @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.
1344
+ # @return [LoginFlow]
1345
+ def initialize_self_service_login_for_native_apps(opts = {})
1346
+ data, _status_code, _headers = initialize_self_service_login_for_native_apps_with_http_info(opts)
1347
+ data
1348
+ end
1349
+
1350
+ # Initialize Login Flow for Native Apps and API clients
1351
+ # 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).
1352
+ # @param [Hash] opts the optional parameters
1353
+ # @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.
1354
+ # @return [Array<(LoginFlow, Integer, Hash)>] LoginFlow data, response status code and response headers
1355
+ def initialize_self_service_login_for_native_apps_with_http_info(opts = {})
1356
+ if @api_client.config.debugging
1357
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_login_for_native_apps ...'
1358
+ end
1359
+ # resource path
1360
+ local_var_path = '/api/kratos/public/self-service/login/api'
1361
+
1362
+ # query parameters
1363
+ query_params = opts[:query_params] || {}
1364
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
1365
+
1366
+ # header parameters
1367
+ header_params = opts[:header_params] || {}
1368
+ # HTTP header 'Accept' (if needed)
1369
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1370
+
1371
+ # form parameters
1372
+ form_params = opts[:form_params] || {}
1373
+
1374
+ # http body (model)
1375
+ post_body = opts[:debug_body]
1376
+
1377
+ # return_type
1378
+ return_type = opts[:debug_return_type] || 'LoginFlow'
1379
+
1380
+ # auth_names
1381
+ auth_names = opts[:debug_auth_names] || []
1382
+
1383
+ new_options = opts.merge(
1384
+ :operation => :"DefaultApi.initialize_self_service_login_for_native_apps",
1385
+ :header_params => header_params,
1386
+ :query_params => query_params,
1387
+ :form_params => form_params,
1388
+ :body => post_body,
1389
+ :auth_names => auth_names,
1390
+ :return_type => return_type
1391
+ )
1392
+
1393
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1394
+ if @api_client.config.debugging
1395
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_login_for_native_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1396
+ end
1397
+ return data, status_code, headers
1398
+ end
1399
+
1400
+ # Initialize Recovery Flow for Browser Clients
1401
+ # 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).
1402
+ # @param [Hash] opts the optional parameters
1403
+ # @return [nil]
1404
+ def initialize_self_service_recovery_for_browsers(opts = {})
1405
+ initialize_self_service_recovery_for_browsers_with_http_info(opts)
1406
+ nil
1407
+ end
1408
+
1409
+ # Initialize Recovery Flow for Browser Clients
1410
+ # 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).
1411
+ # @param [Hash] opts the optional parameters
1412
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1413
+ def initialize_self_service_recovery_for_browsers_with_http_info(opts = {})
1414
+ if @api_client.config.debugging
1415
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_recovery_for_browsers ...'
1416
+ end
1417
+ # resource path
1418
+ local_var_path = '/api/kratos/public/self-service/recovery/browser'
1419
+
1420
+ # query parameters
1421
+ query_params = opts[:query_params] || {}
1422
+
1423
+ # header parameters
1424
+ header_params = opts[:header_params] || {}
1425
+ # HTTP header 'Accept' (if needed)
1426
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1427
+
1428
+ # form parameters
1429
+ form_params = opts[:form_params] || {}
1430
+
1431
+ # http body (model)
1432
+ post_body = opts[:debug_body]
1433
+
1434
+ # return_type
1435
+ return_type = opts[:debug_return_type]
1436
+
1437
+ # auth_names
1438
+ auth_names = opts[:debug_auth_names] || []
1439
+
1440
+ new_options = opts.merge(
1441
+ :operation => :"DefaultApi.initialize_self_service_recovery_for_browsers",
1442
+ :header_params => header_params,
1443
+ :query_params => query_params,
1444
+ :form_params => form_params,
1445
+ :body => post_body,
1446
+ :auth_names => auth_names,
1447
+ :return_type => return_type
1448
+ )
1449
+
1450
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1451
+ if @api_client.config.debugging
1452
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_recovery_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1453
+ end
1454
+ return data, status_code, headers
1455
+ end
1456
+
1457
+ # Initialize Recovery Flow for Native Apps and API clients
1458
+ # 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).
1459
+ # @param [Hash] opts the optional parameters
1460
+ # @return [RecoveryFlow]
1461
+ def initialize_self_service_recovery_for_native_apps(opts = {})
1462
+ data, _status_code, _headers = initialize_self_service_recovery_for_native_apps_with_http_info(opts)
1463
+ data
1464
+ end
1465
+
1466
+ # Initialize Recovery Flow for Native Apps and API clients
1467
+ # 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).
1468
+ # @param [Hash] opts the optional parameters
1469
+ # @return [Array<(RecoveryFlow, Integer, Hash)>] RecoveryFlow data, response status code and response headers
1470
+ def initialize_self_service_recovery_for_native_apps_with_http_info(opts = {})
1471
+ if @api_client.config.debugging
1472
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_recovery_for_native_apps ...'
1473
+ end
1474
+ # resource path
1475
+ local_var_path = '/api/kratos/public/self-service/recovery/api'
1476
+
1477
+ # query parameters
1478
+ query_params = opts[:query_params] || {}
1479
+
1480
+ # header parameters
1481
+ header_params = opts[:header_params] || {}
1482
+ # HTTP header 'Accept' (if needed)
1483
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1484
+
1485
+ # form parameters
1486
+ form_params = opts[:form_params] || {}
1487
+
1488
+ # http body (model)
1489
+ post_body = opts[:debug_body]
1490
+
1491
+ # return_type
1492
+ return_type = opts[:debug_return_type] || 'RecoveryFlow'
1493
+
1494
+ # auth_names
1495
+ auth_names = opts[:debug_auth_names] || []
1496
+
1497
+ new_options = opts.merge(
1498
+ :operation => :"DefaultApi.initialize_self_service_recovery_for_native_apps",
1499
+ :header_params => header_params,
1500
+ :query_params => query_params,
1501
+ :form_params => form_params,
1502
+ :body => post_body,
1503
+ :auth_names => auth_names,
1504
+ :return_type => return_type
1505
+ )
1506
+
1507
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1508
+ if @api_client.config.debugging
1509
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_recovery_for_native_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1510
+ end
1511
+ return data, status_code, headers
1512
+ end
1513
+
1514
+ # Initialize Registration Flow for browsers
1515
+ # 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).
1516
+ # @param [Hash] opts the optional parameters
1517
+ # @return [nil]
1518
+ def initialize_self_service_registration_for_browsers(opts = {})
1519
+ initialize_self_service_registration_for_browsers_with_http_info(opts)
1520
+ nil
1521
+ end
1522
+
1523
+ # Initialize Registration Flow for browsers
1524
+ # 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).
1525
+ # @param [Hash] opts the optional parameters
1526
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1527
+ def initialize_self_service_registration_for_browsers_with_http_info(opts = {})
1528
+ if @api_client.config.debugging
1529
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_registration_for_browsers ...'
1530
+ end
1531
+ # resource path
1532
+ local_var_path = '/api/kratos/public/self-service/registration/browser'
1533
+
1534
+ # query parameters
1535
+ query_params = opts[:query_params] || {}
1536
+
1537
+ # header parameters
1538
+ header_params = opts[:header_params] || {}
1539
+ # HTTP header 'Accept' (if needed)
1540
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1541
+
1542
+ # form parameters
1543
+ form_params = opts[:form_params] || {}
1544
+
1545
+ # http body (model)
1546
+ post_body = opts[:debug_body]
1547
+
1548
+ # return_type
1549
+ return_type = opts[:debug_return_type]
1550
+
1551
+ # auth_names
1552
+ auth_names = opts[:debug_auth_names] || []
1553
+
1554
+ new_options = opts.merge(
1555
+ :operation => :"DefaultApi.initialize_self_service_registration_for_browsers",
1556
+ :header_params => header_params,
1557
+ :query_params => query_params,
1558
+ :form_params => form_params,
1559
+ :body => post_body,
1560
+ :auth_names => auth_names,
1561
+ :return_type => return_type
1562
+ )
1563
+
1564
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1565
+ if @api_client.config.debugging
1566
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_registration_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1567
+ end
1568
+ return data, status_code, headers
1569
+ end
1570
+
1571
+ # Initialize Registration Flow for Native Apps and API clients
1572
+ # 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).
1573
+ # @param [Hash] opts the optional parameters
1574
+ # @return [RegistrationFlow]
1575
+ def initialize_self_service_registration_for_native_apps(opts = {})
1576
+ data, _status_code, _headers = initialize_self_service_registration_for_native_apps_with_http_info(opts)
1577
+ data
1578
+ end
1579
+
1580
+ # Initialize Registration Flow for Native Apps and API clients
1581
+ # 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).
1582
+ # @param [Hash] opts the optional parameters
1583
+ # @return [Array<(RegistrationFlow, Integer, Hash)>] RegistrationFlow data, response status code and response headers
1584
+ def initialize_self_service_registration_for_native_apps_with_http_info(opts = {})
1585
+ if @api_client.config.debugging
1586
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_registration_for_native_apps ...'
1587
+ end
1588
+ # resource path
1589
+ local_var_path = '/api/kratos/public/self-service/registration/api'
1590
+
1591
+ # query parameters
1592
+ query_params = opts[:query_params] || {}
1593
+
1594
+ # header parameters
1595
+ header_params = opts[:header_params] || {}
1596
+ # HTTP header 'Accept' (if needed)
1597
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1598
+
1599
+ # form parameters
1600
+ form_params = opts[:form_params] || {}
1601
+
1602
+ # http body (model)
1603
+ post_body = opts[:debug_body]
1604
+
1605
+ # return_type
1606
+ return_type = opts[:debug_return_type] || 'RegistrationFlow'
1607
+
1608
+ # auth_names
1609
+ auth_names = opts[:debug_auth_names] || []
1610
+
1611
+ new_options = opts.merge(
1612
+ :operation => :"DefaultApi.initialize_self_service_registration_for_native_apps",
1613
+ :header_params => header_params,
1614
+ :query_params => query_params,
1615
+ :form_params => form_params,
1616
+ :body => post_body,
1617
+ :auth_names => auth_names,
1618
+ :return_type => return_type
1619
+ )
1620
+
1621
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1622
+ if @api_client.config.debugging
1623
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_registration_for_native_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1624
+ end
1625
+ return data, status_code, headers
1626
+ end
1627
+
1628
+ # Initialize Settings Flow for Browsers
1629
+ # 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).
1630
+ # @param [Hash] opts the optional parameters
1631
+ # @return [nil]
1632
+ def initialize_self_service_settings_for_browsers(opts = {})
1633
+ initialize_self_service_settings_for_browsers_with_http_info(opts)
1634
+ nil
1635
+ end
1636
+
1637
+ # Initialize Settings Flow for Browsers
1638
+ # 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).
1639
+ # @param [Hash] opts the optional parameters
1640
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1641
+ def initialize_self_service_settings_for_browsers_with_http_info(opts = {})
1642
+ if @api_client.config.debugging
1643
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_settings_for_browsers ...'
1644
+ end
1645
+ # resource path
1646
+ local_var_path = '/api/kratos/public/self-service/settings/browser'
1647
+
1648
+ # query parameters
1649
+ query_params = opts[:query_params] || {}
1650
+
1651
+ # header parameters
1652
+ header_params = opts[:header_params] || {}
1653
+ # HTTP header 'Accept' (if needed)
1654
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1655
+
1656
+ # form parameters
1657
+ form_params = opts[:form_params] || {}
1658
+
1659
+ # http body (model)
1660
+ post_body = opts[:debug_body]
1661
+
1662
+ # return_type
1663
+ return_type = opts[:debug_return_type]
1664
+
1665
+ # auth_names
1666
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
1667
+
1668
+ new_options = opts.merge(
1669
+ :operation => :"DefaultApi.initialize_self_service_settings_for_browsers",
1670
+ :header_params => header_params,
1671
+ :query_params => query_params,
1672
+ :form_params => form_params,
1673
+ :body => post_body,
1674
+ :auth_names => auth_names,
1675
+ :return_type => return_type
1676
+ )
1677
+
1678
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1679
+ if @api_client.config.debugging
1680
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_settings_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1681
+ end
1682
+ return data, status_code, headers
1683
+ end
1684
+
1685
+ # Initialize Settings Flow for Native Apps and API clients
1686
+ # 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).
1687
+ # @param [Hash] opts the optional parameters
1688
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1689
+ # @return [SettingsFlow]
1690
+ def initialize_self_service_settings_for_native_apps(opts = {})
1691
+ data, _status_code, _headers = initialize_self_service_settings_for_native_apps_with_http_info(opts)
1692
+ data
1693
+ end
1694
+
1695
+ # Initialize Settings Flow for Native Apps and API clients
1696
+ # 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).
1697
+ # @param [Hash] opts the optional parameters
1698
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
1699
+ # @return [Array<(SettingsFlow, Integer, Hash)>] SettingsFlow data, response status code and response headers
1700
+ def initialize_self_service_settings_for_native_apps_with_http_info(opts = {})
1701
+ if @api_client.config.debugging
1702
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_settings_for_native_apps ...'
1703
+ end
1704
+ # resource path
1705
+ local_var_path = '/api/kratos/public/self-service/settings/api'
1706
+
1707
+ # query parameters
1708
+ query_params = opts[:query_params] || {}
1709
+
1710
+ # header parameters
1711
+ header_params = opts[:header_params] || {}
1712
+ # HTTP header 'Accept' (if needed)
1713
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1714
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
1715
+
1716
+ # form parameters
1717
+ form_params = opts[:form_params] || {}
1718
+
1719
+ # http body (model)
1720
+ post_body = opts[:debug_body]
1721
+
1722
+ # return_type
1723
+ return_type = opts[:debug_return_type] || 'SettingsFlow'
1724
+
1725
+ # auth_names
1726
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
1727
+
1728
+ new_options = opts.merge(
1729
+ :operation => :"DefaultApi.initialize_self_service_settings_for_native_apps",
1730
+ :header_params => header_params,
1731
+ :query_params => query_params,
1732
+ :form_params => form_params,
1733
+ :body => post_body,
1734
+ :auth_names => auth_names,
1735
+ :return_type => return_type
1736
+ )
1737
+
1738
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1739
+ if @api_client.config.debugging
1740
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_settings_for_native_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1741
+ end
1742
+ return data, status_code, headers
1743
+ end
1744
+
1745
+ # Initialize Verification Flow for Browser Clients
1746
+ # 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).
1747
+ # @param [Hash] opts the optional parameters
1748
+ # @return [nil]
1749
+ def initialize_self_service_verification_for_browsers(opts = {})
1750
+ initialize_self_service_verification_for_browsers_with_http_info(opts)
1751
+ nil
1752
+ end
1753
+
1754
+ # Initialize Verification Flow for Browser Clients
1755
+ # 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).
1756
+ # @param [Hash] opts the optional parameters
1757
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1758
+ def initialize_self_service_verification_for_browsers_with_http_info(opts = {})
1759
+ if @api_client.config.debugging
1760
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_verification_for_browsers ...'
1761
+ end
1762
+ # resource path
1763
+ local_var_path = '/api/kratos/public/self-service/verification/browser'
1764
+
1765
+ # query parameters
1766
+ query_params = opts[:query_params] || {}
1767
+
1768
+ # header parameters
1769
+ header_params = opts[:header_params] || {}
1770
+ # HTTP header 'Accept' (if needed)
1771
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1772
+
1773
+ # form parameters
1774
+ form_params = opts[:form_params] || {}
1775
+
1776
+ # http body (model)
1777
+ post_body = opts[:debug_body]
1778
+
1779
+ # return_type
1780
+ return_type = opts[:debug_return_type]
1781
+
1782
+ # auth_names
1783
+ auth_names = opts[:debug_auth_names] || []
1784
+
1785
+ new_options = opts.merge(
1786
+ :operation => :"DefaultApi.initialize_self_service_verification_for_browsers",
1787
+ :header_params => header_params,
1788
+ :query_params => query_params,
1789
+ :form_params => form_params,
1790
+ :body => post_body,
1791
+ :auth_names => auth_names,
1792
+ :return_type => return_type
1793
+ )
1794
+
1795
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1796
+ if @api_client.config.debugging
1797
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_verification_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1798
+ end
1799
+ return data, status_code, headers
1800
+ end
1801
+
1802
+ # Initialize Verification Flow for Native Apps and API clients
1803
+ # 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).
1804
+ # @param [Hash] opts the optional parameters
1805
+ # @return [VerificationFlow]
1806
+ def initialize_self_service_verification_for_native_apps(opts = {})
1807
+ data, _status_code, _headers = initialize_self_service_verification_for_native_apps_with_http_info(opts)
1808
+ data
1809
+ end
1810
+
1811
+ # Initialize Verification Flow for Native Apps and API clients
1812
+ # 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).
1813
+ # @param [Hash] opts the optional parameters
1814
+ # @return [Array<(VerificationFlow, Integer, Hash)>] VerificationFlow data, response status code and response headers
1815
+ def initialize_self_service_verification_for_native_apps_with_http_info(opts = {})
1816
+ if @api_client.config.debugging
1817
+ @api_client.config.logger.debug 'Calling API: DefaultApi.initialize_self_service_verification_for_native_apps ...'
1818
+ end
1819
+ # resource path
1820
+ local_var_path = '/api/kratos/public/self-service/verification/api'
1821
+
1822
+ # query parameters
1823
+ query_params = opts[:query_params] || {}
1824
+
1825
+ # header parameters
1826
+ header_params = opts[:header_params] || {}
1827
+ # HTTP header 'Accept' (if needed)
1828
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1829
+
1830
+ # form parameters
1831
+ form_params = opts[:form_params] || {}
1832
+
1833
+ # http body (model)
1834
+ post_body = opts[:debug_body]
1835
+
1836
+ # return_type
1837
+ return_type = opts[:debug_return_type] || 'VerificationFlow'
1838
+
1839
+ # auth_names
1840
+ auth_names = opts[:debug_auth_names] || []
1841
+
1842
+ new_options = opts.merge(
1843
+ :operation => :"DefaultApi.initialize_self_service_verification_for_native_apps",
1844
+ :header_params => header_params,
1845
+ :query_params => query_params,
1846
+ :form_params => form_params,
1847
+ :body => post_body,
1848
+ :auth_names => auth_names,
1849
+ :return_type => return_type
1850
+ )
1851
+
1852
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1853
+ if @api_client.config.debugging
1854
+ @api_client.config.logger.debug "API called: DefaultApi#initialize_self_service_verification_for_native_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1855
+ end
1856
+ return data, status_code, headers
1857
+ end
1858
+
1859
+ # Check HTTP Server Status
1860
+ # 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.
1861
+ # @param [Hash] opts the optional parameters
1862
+ # @return [InlineResponse200]
1863
+ def is_alive_admin(opts = {})
1864
+ data, _status_code, _headers = is_alive_admin_with_http_info(opts)
1865
+ data
1866
+ end
1867
+
1868
+ # Check HTTP Server Status
1869
+ # 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.
1870
+ # @param [Hash] opts the optional parameters
1871
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
1872
+ def is_alive_admin_with_http_info(opts = {})
1873
+ if @api_client.config.debugging
1874
+ @api_client.config.logger.debug 'Calling API: DefaultApi.is_alive_admin ...'
1875
+ end
1876
+ # resource path
1877
+ local_var_path = '/api/kratos/admin/health/alive'
1878
+
1879
+ # query parameters
1880
+ query_params = opts[:query_params] || {}
1881
+
1882
+ # header parameters
1883
+ header_params = opts[:header_params] || {}
1884
+ # HTTP header 'Accept' (if needed)
1885
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1886
+
1887
+ # form parameters
1888
+ form_params = opts[:form_params] || {}
1889
+
1890
+ # http body (model)
1891
+ post_body = opts[:debug_body]
1892
+
1893
+ # return_type
1894
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
1895
+
1896
+ # auth_names
1897
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1898
+
1899
+ new_options = opts.merge(
1900
+ :operation => :"DefaultApi.is_alive_admin",
1901
+ :header_params => header_params,
1902
+ :query_params => query_params,
1903
+ :form_params => form_params,
1904
+ :body => post_body,
1905
+ :auth_names => auth_names,
1906
+ :return_type => return_type
1907
+ )
1908
+
1909
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1910
+ if @api_client.config.debugging
1911
+ @api_client.config.logger.debug "API called: DefaultApi#is_alive_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1912
+ end
1913
+ return data, status_code, headers
1914
+ end
1915
+
1916
+ # Check HTTP Server and Database Status
1917
+ # 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.
1918
+ # @param [Hash] opts the optional parameters
1919
+ # @return [InlineResponse200]
1920
+ def is_ready_admin(opts = {})
1921
+ data, _status_code, _headers = is_ready_admin_with_http_info(opts)
1922
+ data
1923
+ end
1924
+
1925
+ # Check HTTP Server and Database Status
1926
+ # 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.
1927
+ # @param [Hash] opts the optional parameters
1928
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
1929
+ def is_ready_admin_with_http_info(opts = {})
1930
+ if @api_client.config.debugging
1931
+ @api_client.config.logger.debug 'Calling API: DefaultApi.is_ready_admin ...'
1932
+ end
1933
+ # resource path
1934
+ local_var_path = '/api/kratos/admin/health/ready'
1935
+
1936
+ # query parameters
1937
+ query_params = opts[:query_params] || {}
1938
+
1939
+ # header parameters
1940
+ header_params = opts[:header_params] || {}
1941
+ # HTTP header 'Accept' (if needed)
1942
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1943
+
1944
+ # form parameters
1945
+ form_params = opts[:form_params] || {}
1946
+
1947
+ # http body (model)
1948
+ post_body = opts[:debug_body]
1949
+
1950
+ # return_type
1951
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
1952
+
1953
+ # auth_names
1954
+ auth_names = opts[:debug_auth_names] || ['oryToken']
1955
+
1956
+ new_options = opts.merge(
1957
+ :operation => :"DefaultApi.is_ready_admin",
1958
+ :header_params => header_params,
1959
+ :query_params => query_params,
1960
+ :form_params => form_params,
1961
+ :body => post_body,
1962
+ :auth_names => auth_names,
1963
+ :return_type => return_type
1964
+ )
1965
+
1966
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1967
+ if @api_client.config.debugging
1968
+ @api_client.config.logger.debug "API called: DefaultApi#is_ready_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1969
+ end
1970
+ return data, status_code, headers
1971
+ end
1972
+
1973
+ # List Identities
1974
+ # 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).
1975
+ # @param [Hash] opts the optional parameters
1976
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 100)
1977
+ # @option opts [Integer] :page Pagination Page (default to 0)
1978
+ # @return [Array<Identity>]
1979
+ def list_identities_admin(opts = {})
1980
+ data, _status_code, _headers = list_identities_admin_with_http_info(opts)
1981
+ data
1982
+ end
1983
+
1984
+ # List Identities
1985
+ # 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).
1986
+ # @param [Hash] opts the optional parameters
1987
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page.
1988
+ # @option opts [Integer] :page Pagination Page
1989
+ # @return [Array<(Array<Identity>, Integer, Hash)>] Array<Identity> data, response status code and response headers
1990
+ def list_identities_admin_with_http_info(opts = {})
1991
+ if @api_client.config.debugging
1992
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_identities_admin ...'
1993
+ end
1994
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 500
1995
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_identities_admin, must be smaller than or equal to 500.'
1996
+ end
1997
+
1998
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
1999
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling DefaultApi.list_identities_admin, must be greater than or equal to 1.'
2000
+ end
2001
+
2002
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
2003
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling DefaultApi.list_identities_admin, must be greater than or equal to 0.'
2004
+ end
2005
+
2006
+ # resource path
2007
+ local_var_path = '/api/kratos/admin/identities'
2008
+
2009
+ # query parameters
2010
+ query_params = opts[:query_params] || {}
2011
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
2012
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
2013
+
2014
+ # header parameters
2015
+ header_params = opts[:header_params] || {}
2016
+ # HTTP header 'Accept' (if needed)
2017
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2018
+
2019
+ # form parameters
2020
+ form_params = opts[:form_params] || {}
2021
+
2022
+ # http body (model)
2023
+ post_body = opts[:debug_body]
2024
+
2025
+ # return_type
2026
+ return_type = opts[:debug_return_type] || 'Array<Identity>'
2027
+
2028
+ # auth_names
2029
+ auth_names = opts[:debug_auth_names] || ['oryToken']
2030
+
2031
+ new_options = opts.merge(
2032
+ :operation => :"DefaultApi.list_identities_admin",
2033
+ :header_params => header_params,
2034
+ :query_params => query_params,
2035
+ :form_params => form_params,
2036
+ :body => post_body,
2037
+ :auth_names => auth_names,
2038
+ :return_type => return_type
2039
+ )
2040
+
2041
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2042
+ if @api_client.config.debugging
2043
+ @api_client.config.logger.debug "API called: DefaultApi#list_identities_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2044
+ end
2045
+ return data, status_code, headers
2046
+ end
2047
+
2048
+ # Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
2049
+ # ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ```
2050
+ # @param [Hash] opts the optional parameters
2051
+ # @return [nil]
2052
+ def prometheus_admin(opts = {})
2053
+ prometheus_admin_with_http_info(opts)
2054
+ nil
2055
+ end
2056
+
2057
+ # Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
2058
+ # &#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: \&quot;4434\&quot; prometheus.io/path: \&quot;/metrics/prometheus\&quot; &#x60;&#x60;&#x60;
2059
+ # @param [Hash] opts the optional parameters
2060
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2061
+ def prometheus_admin_with_http_info(opts = {})
2062
+ if @api_client.config.debugging
2063
+ @api_client.config.logger.debug 'Calling API: DefaultApi.prometheus_admin ...'
2064
+ end
2065
+ # resource path
2066
+ local_var_path = '/api/kratos/admin/metrics/prometheus'
2067
+
2068
+ # query parameters
2069
+ query_params = opts[:query_params] || {}
2070
+
2071
+ # header parameters
2072
+ header_params = opts[:header_params] || {}
2073
+
2074
+ # form parameters
2075
+ form_params = opts[:form_params] || {}
2076
+
2077
+ # http body (model)
2078
+ post_body = opts[:debug_body]
2079
+
2080
+ # return_type
2081
+ return_type = opts[:debug_return_type]
2082
+
2083
+ # auth_names
2084
+ auth_names = opts[:debug_auth_names] || ['oryToken']
2085
+
2086
+ new_options = opts.merge(
2087
+ :operation => :"DefaultApi.prometheus_admin",
2088
+ :header_params => header_params,
2089
+ :query_params => query_params,
2090
+ :form_params => form_params,
2091
+ :body => post_body,
2092
+ :auth_names => auth_names,
2093
+ :return_type => return_type
2094
+ )
2095
+
2096
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2097
+ if @api_client.config.debugging
2098
+ @api_client.config.logger.debug "API called: DefaultApi#prometheus_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2099
+ end
2100
+ return data, status_code, headers
2101
+ end
2102
+
2103
+ # Initialize Logout Flow for API Clients - Revoke a Session
2104
+ # 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.
2105
+ # @param revoke_session [RevokeSession]
2106
+ # @param [Hash] opts the optional parameters
2107
+ # @return [nil]
2108
+ def revoke_session(revoke_session, opts = {})
2109
+ revoke_session_with_http_info(revoke_session, opts)
2110
+ nil
2111
+ end
2112
+
2113
+ # Initialize Logout Flow for API Clients - Revoke a Session
2114
+ # 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.
2115
+ # @param revoke_session [RevokeSession]
2116
+ # @param [Hash] opts the optional parameters
2117
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2118
+ def revoke_session_with_http_info(revoke_session, opts = {})
2119
+ if @api_client.config.debugging
2120
+ @api_client.config.logger.debug 'Calling API: DefaultApi.revoke_session ...'
2121
+ end
2122
+ # verify the required parameter 'revoke_session' is set
2123
+ if @api_client.config.client_side_validation && revoke_session.nil?
2124
+ fail ArgumentError, "Missing the required parameter 'revoke_session' when calling DefaultApi.revoke_session"
2125
+ end
2126
+ # resource path
2127
+ local_var_path = '/api/kratos/public/sessions'
2128
+
2129
+ # query parameters
2130
+ query_params = opts[:query_params] || {}
2131
+
2132
+ # header parameters
2133
+ header_params = opts[:header_params] || {}
2134
+ # HTTP header 'Accept' (if needed)
2135
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2136
+ # HTTP header 'Content-Type'
2137
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2138
+
2139
+ # form parameters
2140
+ form_params = opts[:form_params] || {}
2141
+
2142
+ # http body (model)
2143
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(revoke_session)
2144
+
2145
+ # return_type
2146
+ return_type = opts[:debug_return_type]
2147
+
2148
+ # auth_names
2149
+ auth_names = opts[:debug_auth_names] || []
2150
+
2151
+ new_options = opts.merge(
2152
+ :operation => :"DefaultApi.revoke_session",
2153
+ :header_params => header_params,
2154
+ :query_params => query_params,
2155
+ :form_params => form_params,
2156
+ :body => post_body,
2157
+ :auth_names => auth_names,
2158
+ :return_type => return_type
2159
+ )
2160
+
2161
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2162
+ if @api_client.config.debugging
2163
+ @api_client.config.logger.debug "API called: DefaultApi#revoke_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2164
+ end
2165
+ return data, status_code, headers
2166
+ end
2167
+
2168
+ # Submit a Login Flow
2169
+ # 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).
2170
+ # @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;).
2171
+ # @param [Hash] opts the optional parameters
2172
+ # @option opts [SubmitSelfServiceLoginFlow] :submit_self_service_login_flow
2173
+ # @return [LoginViaApiResponse]
2174
+ def submit_self_service_login_flow(flow, opts = {})
2175
+ data, _status_code, _headers = submit_self_service_login_flow_with_http_info(flow, opts)
2176
+ data
2177
+ end
2178
+
2179
+ # Submit a Login Flow
2180
+ # 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).
2181
+ # @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;).
2182
+ # @param [Hash] opts the optional parameters
2183
+ # @option opts [SubmitSelfServiceLoginFlow] :submit_self_service_login_flow
2184
+ # @return [Array<(LoginViaApiResponse, Integer, Hash)>] LoginViaApiResponse data, response status code and response headers
2185
+ def submit_self_service_login_flow_with_http_info(flow, opts = {})
2186
+ if @api_client.config.debugging
2187
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_login_flow ...'
2188
+ end
2189
+ # verify the required parameter 'flow' is set
2190
+ if @api_client.config.client_side_validation && flow.nil?
2191
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_login_flow"
2192
+ end
2193
+ # resource path
2194
+ local_var_path = '/api/kratos/public/self-service/login'
2195
+
2196
+ # query parameters
2197
+ query_params = opts[:query_params] || {}
2198
+ query_params[:'flow'] = flow
2199
+
2200
+ # header parameters
2201
+ header_params = opts[:header_params] || {}
2202
+ # HTTP header 'Accept' (if needed)
2203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2204
+ # HTTP header 'Content-Type'
2205
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2206
+
2207
+ # form parameters
2208
+ form_params = opts[:form_params] || {}
2209
+
2210
+ # http body (model)
2211
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_login_flow'])
2212
+
2213
+ # return_type
2214
+ return_type = opts[:debug_return_type] || 'LoginViaApiResponse'
2215
+
2216
+ # auth_names
2217
+ auth_names = opts[:debug_auth_names] || []
2218
+
2219
+ new_options = opts.merge(
2220
+ :operation => :"DefaultApi.submit_self_service_login_flow",
2221
+ :header_params => header_params,
2222
+ :query_params => query_params,
2223
+ :form_params => form_params,
2224
+ :body => post_body,
2225
+ :auth_names => auth_names,
2226
+ :return_type => return_type
2227
+ )
2228
+
2229
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2230
+ if @api_client.config.debugging
2231
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2232
+ end
2233
+ return data, status_code, headers
2234
+ end
2235
+
2236
+ # Complete Recovery Flow
2237
+ # 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).
2238
+ # @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;).
2239
+ # @param [Hash] opts the optional parameters
2240
+ # @option opts [Object] :body
2241
+ # @return [nil]
2242
+ def submit_self_service_recovery_flow(flow, opts = {})
2243
+ submit_self_service_recovery_flow_with_http_info(flow, opts)
2244
+ nil
2245
+ end
2246
+
2247
+ # Complete Recovery Flow
2248
+ # 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).
2249
+ # @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;).
2250
+ # @param [Hash] opts the optional parameters
2251
+ # @option opts [Object] :body
2252
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2253
+ def submit_self_service_recovery_flow_with_http_info(flow, opts = {})
2254
+ if @api_client.config.debugging
2255
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_recovery_flow ...'
2256
+ end
2257
+ # verify the required parameter 'flow' is set
2258
+ if @api_client.config.client_side_validation && flow.nil?
2259
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_recovery_flow"
2260
+ end
2261
+ # resource path
2262
+ local_var_path = '/api/kratos/public/self-service/recovery'
2263
+
2264
+ # query parameters
2265
+ query_params = opts[:query_params] || {}
2266
+ query_params[:'flow'] = flow
2267
+
2268
+ # header parameters
2269
+ header_params = opts[:header_params] || {}
2270
+ # HTTP header 'Accept' (if needed)
2271
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2272
+ # HTTP header 'Content-Type'
2273
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2274
+
2275
+ # form parameters
2276
+ form_params = opts[:form_params] || {}
2277
+
2278
+ # http body (model)
2279
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
2280
+
2281
+ # return_type
2282
+ return_type = opts[:debug_return_type]
2283
+
2284
+ # auth_names
2285
+ auth_names = opts[:debug_auth_names] || []
2286
+
2287
+ new_options = opts.merge(
2288
+ :operation => :"DefaultApi.submit_self_service_recovery_flow",
2289
+ :header_params => header_params,
2290
+ :query_params => query_params,
2291
+ :form_params => form_params,
2292
+ :body => post_body,
2293
+ :auth_names => auth_names,
2294
+ :return_type => return_type
2295
+ )
2296
+
2297
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2298
+ if @api_client.config.debugging
2299
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2300
+ end
2301
+ return data, status_code, headers
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: `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).
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 [nil]
2311
+ def submit_self_service_recovery_flow_with_link_method(opts = {})
2312
+ submit_self_service_recovery_flow_with_link_method_with_http_info(opts)
2313
+ nil
2314
+ end
2315
+
2316
+ # Complete Recovery Flow with Link Method
2317
+ # 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).
2318
+ # @param [Hash] opts the optional parameters
2319
+ # @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.
2320
+ # @option opts [String] :flow The Flow ID format: uuid
2321
+ # @option opts [SubmitSelfServiceRecoveryFlowWithLinkMethod] :submit_self_service_recovery_flow_with_link_method
2322
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2323
+ def submit_self_service_recovery_flow_with_link_method_with_http_info(opts = {})
2324
+ if @api_client.config.debugging
2325
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_recovery_flow_with_link_method ...'
2326
+ end
2327
+ # resource path
2328
+ local_var_path = '/api/kratos/public/self-service/recovery/methods/link'
2329
+
2330
+ # query parameters
2331
+ query_params = opts[:query_params] || {}
2332
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
2333
+ query_params[:'flow'] = opts[:'flow'] if !opts[:'flow'].nil?
2334
+
2335
+ # header parameters
2336
+ header_params = opts[:header_params] || {}
2337
+ # HTTP header 'Accept' (if needed)
2338
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2339
+ # HTTP header 'Content-Type'
2340
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2341
+
2342
+ # form parameters
2343
+ form_params = opts[:form_params] || {}
2344
+
2345
+ # http body (model)
2346
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_recovery_flow_with_link_method'])
2347
+
2348
+ # return_type
2349
+ return_type = opts[:debug_return_type]
2350
+
2351
+ # auth_names
2352
+ auth_names = opts[:debug_auth_names] || []
2353
+
2354
+ new_options = opts.merge(
2355
+ :operation => :"DefaultApi.submit_self_service_recovery_flow_with_link_method",
2356
+ :header_params => header_params,
2357
+ :query_params => query_params,
2358
+ :form_params => form_params,
2359
+ :body => post_body,
2360
+ :auth_names => auth_names,
2361
+ :return_type => return_type
2362
+ )
2363
+
2364
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2365
+ if @api_client.config.debugging
2366
+ @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}"
2367
+ end
2368
+ return data, status_code, headers
2369
+ end
2370
+
2371
+ # Submit a Registration Flow
2372
+ # 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).
2373
+ # @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;).
2374
+ # @param [Hash] opts the optional parameters
2375
+ # @option opts [SubmitSelfServiceRegistrationFlow] :submit_self_service_registration_flow
2376
+ # @return [RegistrationViaApiResponse]
2377
+ def submit_self_service_registration_flow(flow, opts = {})
2378
+ data, _status_code, _headers = submit_self_service_registration_flow_with_http_info(flow, opts)
2379
+ data
2380
+ end
2381
+
2382
+ # Submit a Registration Flow
2383
+ # 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).
2384
+ # @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;).
2385
+ # @param [Hash] opts the optional parameters
2386
+ # @option opts [SubmitSelfServiceRegistrationFlow] :submit_self_service_registration_flow
2387
+ # @return [Array<(RegistrationViaApiResponse, Integer, Hash)>] RegistrationViaApiResponse data, response status code and response headers
2388
+ def submit_self_service_registration_flow_with_http_info(flow, opts = {})
2389
+ if @api_client.config.debugging
2390
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_registration_flow ...'
2391
+ end
2392
+ # verify the required parameter 'flow' is set
2393
+ if @api_client.config.client_side_validation && flow.nil?
2394
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_registration_flow"
2395
+ end
2396
+ # resource path
2397
+ local_var_path = '/api/kratos/public/self-service/registration'
2398
+
2399
+ # query parameters
2400
+ query_params = opts[:query_params] || {}
2401
+ query_params[:'flow'] = flow
2402
+
2403
+ # header parameters
2404
+ header_params = opts[:header_params] || {}
2405
+ # HTTP header 'Accept' (if needed)
2406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2407
+ # HTTP header 'Content-Type'
2408
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2409
+
2410
+ # form parameters
2411
+ form_params = opts[:form_params] || {}
2412
+
2413
+ # http body (model)
2414
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_registration_flow'])
2415
+
2416
+ # return_type
2417
+ return_type = opts[:debug_return_type] || 'RegistrationViaApiResponse'
2418
+
2419
+ # auth_names
2420
+ auth_names = opts[:debug_auth_names] || []
2421
+
2422
+ new_options = opts.merge(
2423
+ :operation => :"DefaultApi.submit_self_service_registration_flow",
2424
+ :header_params => header_params,
2425
+ :query_params => query_params,
2426
+ :form_params => form_params,
2427
+ :body => post_body,
2428
+ :auth_names => auth_names,
2429
+ :return_type => return_type
2430
+ )
2431
+
2432
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2433
+ if @api_client.config.debugging
2434
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2435
+ end
2436
+ return data, status_code, headers
2437
+ end
2438
+
2439
+ # Complete Settings Flow
2440
+ # 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).
2441
+ # @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;).
2442
+ # @param [Hash] opts the optional parameters
2443
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
2444
+ # @option opts [SubmitSelfServiceSettingsFlow] :submit_self_service_settings_flow
2445
+ # @return [SettingsViaApiResponse]
2446
+ def submit_self_service_settings_flow(flow, opts = {})
2447
+ data, _status_code, _headers = submit_self_service_settings_flow_with_http_info(flow, opts)
2448
+ data
2449
+ end
2450
+
2451
+ # Complete Settings Flow
2452
+ # 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).
2453
+ # @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;).
2454
+ # @param [Hash] opts the optional parameters
2455
+ # @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
2456
+ # @option opts [SubmitSelfServiceSettingsFlow] :submit_self_service_settings_flow
2457
+ # @return [Array<(SettingsViaApiResponse, Integer, Hash)>] SettingsViaApiResponse data, response status code and response headers
2458
+ def submit_self_service_settings_flow_with_http_info(flow, opts = {})
2459
+ if @api_client.config.debugging
2460
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_settings_flow ...'
2461
+ end
2462
+ # verify the required parameter 'flow' is set
2463
+ if @api_client.config.client_side_validation && flow.nil?
2464
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_settings_flow"
2465
+ end
2466
+ # resource path
2467
+ local_var_path = '/api/kratos/public/self-service/settings'
2468
+
2469
+ # query parameters
2470
+ query_params = opts[:query_params] || {}
2471
+ query_params[:'flow'] = flow
2472
+
2473
+ # header parameters
2474
+ header_params = opts[:header_params] || {}
2475
+ # HTTP header 'Accept' (if needed)
2476
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2477
+ # HTTP header 'Content-Type'
2478
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2479
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
2480
+
2481
+ # form parameters
2482
+ form_params = opts[:form_params] || {}
2483
+
2484
+ # http body (model)
2485
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_settings_flow'])
2486
+
2487
+ # return_type
2488
+ return_type = opts[:debug_return_type] || 'SettingsViaApiResponse'
2489
+
2490
+ # auth_names
2491
+ auth_names = opts[:debug_auth_names] || ['sessionToken']
2492
+
2493
+ new_options = opts.merge(
2494
+ :operation => :"DefaultApi.submit_self_service_settings_flow",
2495
+ :header_params => header_params,
2496
+ :query_params => query_params,
2497
+ :form_params => form_params,
2498
+ :body => post_body,
2499
+ :auth_names => auth_names,
2500
+ :return_type => return_type
2501
+ )
2502
+
2503
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2504
+ if @api_client.config.debugging
2505
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2506
+ end
2507
+ return data, status_code, headers
2508
+ end
2509
+
2510
+ # Complete Verification Flow
2511
+ # 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).
2512
+ # @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;).
2513
+ # @param [Hash] opts the optional parameters
2514
+ # @option opts [Object] :body
2515
+ # @return [nil]
2516
+ def submit_self_service_verification_flow(flow, opts = {})
2517
+ submit_self_service_verification_flow_with_http_info(flow, opts)
2518
+ nil
2519
+ end
2520
+
2521
+ # Complete Verification Flow
2522
+ # 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).
2523
+ # @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;).
2524
+ # @param [Hash] opts the optional parameters
2525
+ # @option opts [Object] :body
2526
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2527
+ def submit_self_service_verification_flow_with_http_info(flow, opts = {})
2528
+ if @api_client.config.debugging
2529
+ @api_client.config.logger.debug 'Calling API: DefaultApi.submit_self_service_verification_flow ...'
2530
+ end
2531
+ # verify the required parameter 'flow' is set
2532
+ if @api_client.config.client_side_validation && flow.nil?
2533
+ fail ArgumentError, "Missing the required parameter 'flow' when calling DefaultApi.submit_self_service_verification_flow"
2534
+ end
2535
+ # resource path
2536
+ local_var_path = '/api/kratos/public/self-service/verification/methods/link'
2537
+
2538
+ # query parameters
2539
+ query_params = opts[:query_params] || {}
2540
+ query_params[:'flow'] = flow
2541
+
2542
+ # header parameters
2543
+ header_params = opts[:header_params] || {}
2544
+ # HTTP header 'Accept' (if needed)
2545
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2546
+ # HTTP header 'Content-Type'
2547
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2548
+
2549
+ # form parameters
2550
+ form_params = opts[:form_params] || {}
2551
+
2552
+ # http body (model)
2553
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
2554
+
2555
+ # return_type
2556
+ return_type = opts[:debug_return_type]
2557
+
2558
+ # auth_names
2559
+ auth_names = opts[:debug_auth_names] || []
2560
+
2561
+ new_options = opts.merge(
2562
+ :operation => :"DefaultApi.submit_self_service_verification_flow",
2563
+ :header_params => header_params,
2564
+ :query_params => query_params,
2565
+ :form_params => form_params,
2566
+ :body => post_body,
2567
+ :auth_names => auth_names,
2568
+ :return_type => return_type
2569
+ )
2570
+
2571
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2572
+ if @api_client.config.debugging
2573
+ @api_client.config.logger.debug "API called: DefaultApi#submit_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2574
+ end
2575
+ return data, status_code, headers
2576
+ end
2577
+
2578
+ # Check Who the Current HTTP Session Belongs To
2579
+ # 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!
2580
+ # @param [Hash] opts the optional parameters
2581
+ # @option opts [String] :x_session_token
2582
+ # @return [Session]
2583
+ def to_session(opts = {})
2584
+ data, _status_code, _headers = to_session_with_http_info(opts)
2585
+ data
2586
+ end
2587
+
2588
+ # Check Who the Current HTTP Session Belongs To
2589
+ # 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!
2590
+ # @param [Hash] opts the optional parameters
2591
+ # @option opts [String] :x_session_token
2592
+ # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
2593
+ def to_session_with_http_info(opts = {})
2594
+ if @api_client.config.debugging
2595
+ @api_client.config.logger.debug 'Calling API: DefaultApi.to_session ...'
2596
+ end
2597
+ # resource path
2598
+ local_var_path = '/api/kratos/public/sessions/whoami'
2599
+
2600
+ # query parameters
2601
+ query_params = opts[:query_params] || {}
2602
+
2603
+ # header parameters
2604
+ header_params = opts[:header_params] || {}
2605
+ # HTTP header 'Accept' (if needed)
2606
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2607
+ header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
2608
+
2609
+ # form parameters
2610
+ form_params = opts[:form_params] || {}
2611
+
2612
+ # http body (model)
2613
+ post_body = opts[:debug_body]
2614
+
2615
+ # return_type
2616
+ return_type = opts[:debug_return_type] || 'Session'
2617
+
2618
+ # auth_names
2619
+ auth_names = opts[:debug_auth_names] || ['sessionCookie']
2620
+
2621
+ new_options = opts.merge(
2622
+ :operation => :"DefaultApi.to_session",
2623
+ :header_params => header_params,
2624
+ :query_params => query_params,
2625
+ :form_params => form_params,
2626
+ :body => post_body,
2627
+ :auth_names => auth_names,
2628
+ :return_type => return_type
2629
+ )
2630
+
2631
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2632
+ if @api_client.config.debugging
2633
+ @api_client.config.logger.debug "API called: DefaultApi#to_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2634
+ end
2635
+ return data, status_code, headers
2636
+ end
2637
+
2638
+ # Update an Identity
2639
+ # 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).
2640
+ # @param id [String] ID must be set to the ID of identity you want to update
2641
+ # @param [Hash] opts the optional parameters
2642
+ # @option opts [UpdateIdentity] :update_identity
2643
+ # @return [Identity]
2644
+ def update_identity_admin(id, opts = {})
2645
+ data, _status_code, _headers = update_identity_admin_with_http_info(id, opts)
2646
+ data
2647
+ end
2648
+
2649
+ # Update an Identity
2650
+ # 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).
2651
+ # @param id [String] ID must be set to the ID of identity you want to update
2652
+ # @param [Hash] opts the optional parameters
2653
+ # @option opts [UpdateIdentity] :update_identity
2654
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
2655
+ def update_identity_admin_with_http_info(id, opts = {})
2656
+ if @api_client.config.debugging
2657
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_identity_admin ...'
2658
+ end
2659
+ # verify the required parameter 'id' is set
2660
+ if @api_client.config.client_side_validation && id.nil?
2661
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_identity_admin"
2662
+ end
2663
+ # resource path
2664
+ local_var_path = '/api/kratos/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2665
+
2666
+ # query parameters
2667
+ query_params = opts[:query_params] || {}
2668
+
2669
+ # header parameters
2670
+ header_params = opts[:header_params] || {}
2671
+ # HTTP header 'Accept' (if needed)
2672
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2673
+ # HTTP header 'Content-Type'
2674
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2675
+
2676
+ # form parameters
2677
+ form_params = opts[:form_params] || {}
2678
+
2679
+ # http body (model)
2680
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_identity'])
2681
+
2682
+ # return_type
2683
+ return_type = opts[:debug_return_type] || 'Identity'
2684
+
2685
+ # auth_names
2686
+ auth_names = opts[:debug_auth_names] || ['oryToken']
2687
+
2688
+ new_options = opts.merge(
2689
+ :operation => :"DefaultApi.update_identity_admin",
2690
+ :header_params => header_params,
2691
+ :query_params => query_params,
2692
+ :form_params => form_params,
2693
+ :body => post_body,
2694
+ :auth_names => auth_names,
2695
+ :return_type => return_type
2696
+ )
2697
+
2698
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2699
+ if @api_client.config.debugging
2700
+ @api_client.config.logger.debug "API called: DefaultApi#update_identity_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2701
+ end
2702
+ return data, status_code, headers
2703
+ end
2704
+ end
2705
+ end