ory-client 0.0.1.alpha15 → 0.0.1.alpha16

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