ory-kratos-client 0.6.3.alpha1 → 0.7.0.alpha1

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