ory-kratos-client 0.2.1.alpha1 → 0.5.2.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +84 -52
  4. data/docs/AdminApi.md +244 -86
  5. data/docs/CommonApi.md +54 -6
  6. data/docs/CompleteSelfServiceLoginFlowWithPasswordMethod.md +21 -0
  7. data/docs/CompleteSelfServiceRecoveryFlowWithLinkMethod.md +19 -0
  8. data/docs/CompleteSelfServiceSettingsFlowWithPasswordMethod.md +19 -0
  9. data/docs/CompleteSelfServiceVerificationFlowWithLinkMethod.md +19 -0
  10. data/docs/CreateIdentity.md +19 -0
  11. data/docs/CreateRecoveryLink.md +19 -0
  12. data/docs/ErrorContainer.md +2 -2
  13. data/docs/Form.md +2 -2
  14. data/docs/FormField.md +4 -4
  15. data/docs/GenericErrorPayload.md +1 -1
  16. data/docs/Identity.md +9 -7
  17. data/docs/LoginFlow.md +33 -0
  18. data/docs/LoginFlowMethod.md +19 -0
  19. data/docs/LoginFlowMethodConfig.md +25 -0
  20. data/docs/LoginRequest.md +2 -0
  21. data/docs/LoginRequestMethodConfig.md +2 -2
  22. data/docs/LoginViaApiResponse.md +19 -0
  23. data/docs/Message.md +23 -0
  24. data/docs/ProviderCredentialsConfig.md +19 -0
  25. data/docs/PublicApi.md +726 -151
  26. data/docs/RecoveryAddress.md +21 -0
  27. data/docs/RecoveryFlow.md +33 -0
  28. data/docs/RecoveryFlowMethod.md +19 -0
  29. data/docs/RecoveryFlowMethodConfig.md +23 -0
  30. data/docs/RecoveryLink.md +19 -0
  31. data/docs/RecoveryRequest.md +31 -0
  32. data/docs/RecoveryRequestMethod.md +19 -0
  33. data/docs/RegistrationFlow.md +31 -0
  34. data/docs/RegistrationFlowMethod.md +19 -0
  35. data/docs/RegistrationFlowMethodConfig.md +25 -0
  36. data/docs/RegistrationRequest.md +3 -1
  37. data/docs/RegistrationRequestMethodConfig.md +2 -2
  38. data/docs/RegistrationViaApiResponse.md +21 -0
  39. data/docs/RequestMethodConfig.md +2 -2
  40. data/docs/RevokeSession.md +17 -0
  41. data/docs/Session.md +6 -4
  42. data/docs/SettingsFlow.md +35 -0
  43. data/docs/SettingsFlowMethod.md +19 -0
  44. data/docs/SettingsFlowMethodConfig.md +23 -0
  45. data/docs/SettingsRequest.md +4 -2
  46. data/docs/SettingsViaApiResponse.md +19 -0
  47. data/docs/UpdateIdentity.md +19 -0
  48. data/docs/VerifiableAddress.md +3 -3
  49. data/docs/VerificationFlow.md +33 -0
  50. data/docs/VerificationFlowMethod.md +19 -0
  51. data/docs/VerificationFlowMethodConfig.md +23 -0
  52. data/docs/VerificationRequest.md +2 -0
  53. data/lib/ory-kratos-client.rb +31 -16
  54. data/lib/ory-kratos-client/api/admin_api.rb +321 -130
  55. data/lib/ory-kratos-client/api/common_api.rb +75 -12
  56. data/lib/ory-kratos-client/api/health_api.rb +2 -2
  57. data/lib/ory-kratos-client/api/public_api.rb +896 -246
  58. data/lib/ory-kratos-client/api/version_api.rb +2 -2
  59. data/lib/ory-kratos-client/api_client.rb +10 -7
  60. data/lib/ory-kratos-client/api_error.rb +2 -2
  61. data/lib/ory-kratos-client/configuration.rb +9 -2
  62. data/lib/ory-kratos-client/models/complete_self_service_browser_settings_strategy_profile_flow_payload.rb +2 -2
  63. data/lib/ory-kratos-client/models/complete_self_service_login_flow_with_password_method.rb +227 -0
  64. data/lib/ory-kratos-client/models/complete_self_service_recovery_flow_with_link_method.rb +217 -0
  65. data/lib/ory-kratos-client/models/complete_self_service_settings_flow_with_password_method.rb +222 -0
  66. data/lib/ory-kratos-client/models/complete_self_service_verification_flow_with_link_method.rb +217 -0
  67. data/lib/ory-kratos-client/models/create_identity.rb +227 -0
  68. data/lib/ory-kratos-client/models/create_recovery_link.rb +238 -0
  69. data/lib/ory-kratos-client/models/error_container.rb +13 -2
  70. data/lib/ory-kratos-client/models/form.rb +14 -15
  71. data/lib/ory-kratos-client/models/form_field.rb +11 -17
  72. data/lib/ory-kratos-client/models/generic_error.rb +2 -2
  73. data/lib/ory-kratos-client/models/generic_error_payload.rb +4 -6
  74. data/lib/ory-kratos-client/models/health_not_ready_status.rb +2 -2
  75. data/lib/ory-kratos-client/models/health_status.rb +2 -2
  76. data/lib/ory-kratos-client/models/identity.rb +53 -35
  77. data/lib/ory-kratos-client/models/login_flow.rb +315 -0
  78. data/lib/ory-kratos-client/models/login_flow_method.rb +226 -0
  79. data/lib/ory-kratos-client/models/login_flow_method_config.rb +267 -0
  80. data/lib/ory-kratos-client/models/login_request.rb +14 -3
  81. data/lib/ory-kratos-client/models/login_request_method.rb +2 -2
  82. data/lib/ory-kratos-client/models/login_request_method_config.rb +14 -15
  83. data/lib/ory-kratos-client/models/login_via_api_response.rb +227 -0
  84. data/lib/ory-kratos-client/models/message.rb +234 -0
  85. data/lib/ory-kratos-client/models/provider_credentials_config.rb +215 -0
  86. data/lib/ory-kratos-client/models/recovery_address.rb +239 -0
  87. data/lib/ory-kratos-client/models/recovery_flow.rb +319 -0
  88. data/lib/ory-kratos-client/models/recovery_flow_method.rb +226 -0
  89. data/lib/ory-kratos-client/models/recovery_flow_method_config.rb +255 -0
  90. data/lib/ory-kratos-client/models/recovery_link.rb +222 -0
  91. data/lib/ory-kratos-client/models/recovery_request.rb +309 -0
  92. data/lib/ory-kratos-client/models/recovery_request_method.rb +216 -0
  93. data/lib/ory-kratos-client/models/registration_flow.rb +304 -0
  94. data/lib/ory-kratos-client/models/registration_flow_method.rb +226 -0
  95. data/lib/ory-kratos-client/models/registration_flow_method_config.rb +267 -0
  96. data/lib/ory-kratos-client/models/registration_request.rb +14 -8
  97. data/lib/ory-kratos-client/models/registration_request_method.rb +2 -2
  98. data/lib/ory-kratos-client/models/registration_request_method_config.rb +14 -15
  99. data/lib/ory-kratos-client/models/registration_via_api_response.rb +236 -0
  100. data/lib/ory-kratos-client/models/request_method_config.rb +14 -15
  101. data/lib/ory-kratos-client/models/revoke_session.rb +212 -0
  102. data/lib/ory-kratos-client/models/session.rb +29 -20
  103. data/lib/ory-kratos-client/models/settings_flow.rb +333 -0
  104. data/lib/ory-kratos-client/models/settings_flow_method.rb +226 -0
  105. data/lib/ory-kratos-client/models/settings_flow_method_config.rb +255 -0
  106. data/lib/ory-kratos-client/models/settings_request.rb +24 -14
  107. data/lib/ory-kratos-client/models/settings_request_method.rb +2 -2
  108. data/lib/ory-kratos-client/models/settings_via_api_response.rb +226 -0
  109. data/lib/ory-kratos-client/models/update_identity.rb +222 -0
  110. data/lib/ory-kratos-client/models/verifiable_address.rb +17 -17
  111. data/lib/ory-kratos-client/models/verification_flow.rb +299 -0
  112. data/lib/ory-kratos-client/models/verification_flow_method.rb +226 -0
  113. data/lib/ory-kratos-client/models/verification_flow_method_config.rb +255 -0
  114. data/lib/ory-kratos-client/models/verification_request.rb +14 -3
  115. data/lib/ory-kratos-client/models/version.rb +2 -2
  116. data/lib/ory-kratos-client/version.rb +3 -3
  117. data/ory-kratos-client.gemspec +2 -2
  118. data/spec/models/complete_self_service_login_flow_with_password_method_spec.rb +53 -0
  119. data/spec/models/complete_self_service_recovery_flow_with_link_method_spec.rb +47 -0
  120. data/spec/models/complete_self_service_settings_flow_with_password_method_spec.rb +47 -0
  121. data/spec/models/complete_self_service_verification_flow_with_link_method_spec.rb +47 -0
  122. data/spec/models/create_identity_spec.rb +47 -0
  123. data/spec/models/create_recovery_link_spec.rb +47 -0
  124. data/spec/models/login_flow_method_config_spec.rb +65 -0
  125. data/spec/models/login_flow_method_spec.rb +47 -0
  126. data/spec/models/login_flow_spec.rb +89 -0
  127. data/spec/models/login_via_api_response_spec.rb +47 -0
  128. data/spec/models/message_spec.rb +59 -0
  129. data/spec/models/provider_credentials_config_spec.rb +47 -0
  130. data/spec/models/recovery_address_spec.rb +53 -0
  131. data/spec/models/recovery_flow_method_config_spec.rb +59 -0
  132. data/spec/models/recovery_flow_method_spec.rb +47 -0
  133. data/spec/models/recovery_flow_spec.rb +89 -0
  134. data/spec/models/recovery_link_spec.rb +47 -0
  135. data/spec/models/recovery_request_method_spec.rb +47 -0
  136. data/spec/models/recovery_request_spec.rb +83 -0
  137. data/spec/models/registration_flow_method_config_spec.rb +65 -0
  138. data/spec/models/registration_flow_method_spec.rb +47 -0
  139. data/spec/models/registration_flow_spec.rb +83 -0
  140. data/spec/models/registration_via_api_response_spec.rb +53 -0
  141. data/spec/models/revoke_session_spec.rb +41 -0
  142. data/spec/models/settings_flow_method_config_spec.rb +59 -0
  143. data/spec/models/settings_flow_method_spec.rb +47 -0
  144. data/spec/models/settings_flow_spec.rb +95 -0
  145. data/spec/models/settings_via_api_response_spec.rb +47 -0
  146. data/spec/models/update_identity_spec.rb +47 -0
  147. data/spec/models/verification_flow_method_config_spec.rb +59 -0
  148. data/spec/models/verification_flow_method_spec.rb +47 -0
  149. data/spec/models/verification_flow_spec.rb +89 -0
  150. metadata +150 -22
@@ -0,0 +1,19 @@
1
+ # OryHydraClient::LoginViaApiResponse
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! |
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'OryHydraClient'
14
+
15
+ instance = OryHydraClient::LoginViaApiResponse.new(session: null,
16
+ session_token: null)
17
+ ```
18
+
19
+
@@ -0,0 +1,23 @@
1
+ # OryHydraClient::Message
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **context** | [**Object**](.md) | | [optional]
8
+ **id** | **Integer** | | [optional]
9
+ **text** | **String** | | [optional]
10
+ **type** | **String** | The flow type can either be `api` or `browser`. | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'OryHydraClient'
16
+
17
+ instance = OryHydraClient::Message.new(context: null,
18
+ id: null,
19
+ text: null,
20
+ type: null)
21
+ ```
22
+
23
+
@@ -0,0 +1,19 @@
1
+ # OryHydraClient::ProviderCredentialsConfig
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **provider** | **String** | | [optional]
8
+ **subject** | **String** | | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'OryHydraClient'
14
+
15
+ instance = OryHydraClient::ProviderCredentialsConfig.new(provider: null,
16
+ subject: null)
17
+ ```
18
+
19
+
@@ -4,32 +4,43 @@ All URIs are relative to *http://localhost*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**complete_self_service_browser_settings_password_strategy_flow**](PublicApi.md#complete_self_service_browser_settings_password_strategy_flow) | **POST** /self-service/browser/flows/settings/strategies/password | Complete the browser-based settings flow for the password strategy
8
- [**complete_self_service_browser_settings_profile_strategy_flow**](PublicApi.md#complete_self_service_browser_settings_profile_strategy_flow) | **POST** /self-service/browser/flows/settings/strategies/profile | Complete the browser-based settings flow for profile data
9
- [**complete_self_service_browser_verification_flow**](PublicApi.md#complete_self_service_browser_verification_flow) | **POST** /self-service/browser/flows/verification/{via}/complete | Complete the browser-based verification flows
7
+ [**complete_self_service_browser_settings_oidc_settings_flow**](PublicApi.md#complete_self_service_browser_settings_oidc_settings_flow) | **POST** /self-service/browser/flows/registration/strategies/oidc/settings/connections | Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
8
+ [**complete_self_service_login_flow_with_password_method**](PublicApi.md#complete_self_service_login_flow_with_password_method) | **POST** /self-service/login/methods/password | Complete Login Flow with Username/Email Password Method
9
+ [**complete_self_service_recovery_flow_with_link_method**](PublicApi.md#complete_self_service_recovery_flow_with_link_method) | **POST** /self-service/recovery/methods/link | Complete Recovery Flow with Link Method
10
+ [**complete_self_service_registration_flow_with_password_method**](PublicApi.md#complete_self_service_registration_flow_with_password_method) | **POST** /self-service/registration/methods/password | Complete Registration Flow with Username/Email Password Method
11
+ [**complete_self_service_settings_flow_with_password_method**](PublicApi.md#complete_self_service_settings_flow_with_password_method) | **POST** /self-service/settings/methods/password | Complete Settings Flow with Username/Email Password Method
12
+ [**complete_self_service_settings_flow_with_profile_method**](PublicApi.md#complete_self_service_settings_flow_with_profile_method) | **POST** /self-service/settings/methods/profile | Complete Settings Flow with Profile Method
13
+ [**complete_self_service_verification_flow_with_link_method**](PublicApi.md#complete_self_service_verification_flow_with_link_method) | **POST** /self-service/verification/methods/link | Complete Verification Flow with Link Method
10
14
  [**get_schema**](PublicApi.md#get_schema) | **GET** /schemas/{id} |
11
- [**get_self_service_browser_login_request**](PublicApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
12
- [**get_self_service_browser_registration_request**](PublicApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
13
- [**get_self_service_browser_settings_request**](PublicApi.md#get_self_service_browser_settings_request) | **GET** /self-service/browser/flows/requests/settings | Get the request context of browser-based settings flows
14
- [**get_self_service_error**](PublicApi.md#get_self_service_error) | **GET** /self-service/errors | Get user-facing self-service errors
15
- [**get_self_service_verification_request**](PublicApi.md#get_self_service_verification_request) | **GET** /self-service/browser/flows/requests/verification | Get the request context of browser-based verification flows
16
- [**initialize_self_service_browser_login_flow**](PublicApi.md#initialize_self_service_browser_login_flow) | **GET** /self-service/browser/flows/login | Initialize browser-based login user flow
15
+ [**get_self_service_error**](PublicApi.md#get_self_service_error) | **GET** /self-service/errors | Get User-Facing Self-Service Errors
16
+ [**get_self_service_login_flow**](PublicApi.md#get_self_service_login_flow) | **GET** /self-service/login/flows | Get Login Flow
17
+ [**get_self_service_recovery_flow**](PublicApi.md#get_self_service_recovery_flow) | **GET** /self-service/recovery/flows | Get information about a recovery flow
18
+ [**get_self_service_registration_flow**](PublicApi.md#get_self_service_registration_flow) | **GET** /self-service/registration/flows | Get Registration Flow
19
+ [**get_self_service_settings_flow**](PublicApi.md#get_self_service_settings_flow) | **GET** /self-service/settings/flows | Get Settings Flow
20
+ [**get_self_service_verification_flow**](PublicApi.md#get_self_service_verification_flow) | **GET** /self-service/verification/flows | Get Verification Flow
17
21
  [**initialize_self_service_browser_logout_flow**](PublicApi.md#initialize_self_service_browser_logout_flow) | **GET** /self-service/browser/flows/logout | Initialize Browser-Based Logout User Flow
18
- [**initialize_self_service_browser_registration_flow**](PublicApi.md#initialize_self_service_browser_registration_flow) | **GET** /self-service/browser/flows/registration | Initialize browser-based registration user flow
19
- [**initialize_self_service_browser_verification_flow**](PublicApi.md#initialize_self_service_browser_verification_flow) | **GET** /self-service/browser/flows/verification/init/{via} | Initialize browser-based verification flow
20
- [**initialize_self_service_settings_flow**](PublicApi.md#initialize_self_service_settings_flow) | **GET** /self-service/browser/flows/settings | Initialize browser-based settings flow
21
- [**self_service_browser_verify**](PublicApi.md#self_service_browser_verify) | **GET** /self-service/browser/flows/verification/{via}/confirm/{code} | Complete the browser-based verification flows
22
- [**whoami**](PublicApi.md#whoami) | **GET** /sessions/whoami | Check who the current HTTP session belongs to
22
+ [**initialize_self_service_login_via_api_flow**](PublicApi.md#initialize_self_service_login_via_api_flow) | **GET** /self-service/login/api | Initialize Login Flow for API clients
23
+ [**initialize_self_service_login_via_browser_flow**](PublicApi.md#initialize_self_service_login_via_browser_flow) | **GET** /self-service/login/browser | Initialize Login Flow for browsers
24
+ [**initialize_self_service_recovery_via_api_flow**](PublicApi.md#initialize_self_service_recovery_via_api_flow) | **GET** /self-service/recovery/api | Initialize Recovery Flow for API Clients
25
+ [**initialize_self_service_recovery_via_browser_flow**](PublicApi.md#initialize_self_service_recovery_via_browser_flow) | **GET** /self-service/recovery/browser | Initialize Recovery Flow for Browser Clients
26
+ [**initialize_self_service_registration_via_api_flow**](PublicApi.md#initialize_self_service_registration_via_api_flow) | **GET** /self-service/registration/api | Initialize Registration Flow for API clients
27
+ [**initialize_self_service_registration_via_browser_flow**](PublicApi.md#initialize_self_service_registration_via_browser_flow) | **GET** /self-service/registration/browser | Initialize Registration Flow for browsers
28
+ [**initialize_self_service_settings_via_api_flow**](PublicApi.md#initialize_self_service_settings_via_api_flow) | **GET** /self-service/settings/api | Initialize Settings Flow for API Clients
29
+ [**initialize_self_service_settings_via_browser_flow**](PublicApi.md#initialize_self_service_settings_via_browser_flow) | **GET** /self-service/settings/browser/flows | Initialize Settings Flow for Browsers
30
+ [**initialize_self_service_verification_via_api_flow**](PublicApi.md#initialize_self_service_verification_via_api_flow) | **GET** /self-service/verification/api | Initialize Verification Flow for API Clients
31
+ [**initialize_self_service_verification_via_browser_flow**](PublicApi.md#initialize_self_service_verification_via_browser_flow) | **GET** /self-service/verification/browser | Initialize Verification Flow for Browser Clients
32
+ [**revoke_session**](PublicApi.md#revoke_session) | **DELETE** /sessions | Revoke and Invalidate a Session
33
+ [**whoami**](PublicApi.md#whoami) | **GET** /sessions/whoami | Check Who the Current HTTP Session Belongs To
23
34
 
24
35
 
25
36
 
26
- ## complete_self_service_browser_settings_password_strategy_flow
37
+ ## complete_self_service_browser_settings_oidc_settings_flow
27
38
 
28
- > complete_self_service_browser_settings_password_strategy_flow
39
+ > complete_self_service_browser_settings_oidc_settings_flow
29
40
 
30
- Complete the browser-based settings flow for the password strategy
41
+ Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
31
42
 
32
- This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
43
+ This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
33
44
 
34
45
  ### Example
35
46
 
@@ -40,10 +51,10 @@ require 'ory-kratos-client'
40
51
  api_instance = OryHydraClient::PublicApi.new
41
52
 
42
53
  begin
43
- #Complete the browser-based settings flow for the password strategy
44
- api_instance.complete_self_service_browser_settings_password_strategy_flow
54
+ #Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
55
+ api_instance.complete_self_service_browser_settings_oidc_settings_flow
45
56
  rescue OryHydraClient::ApiError => e
46
- puts "Exception when calling PublicApi->complete_self_service_browser_settings_password_strategy_flow: #{e}"
57
+ puts "Exception when calling PublicApi->complete_self_service_browser_settings_oidc_settings_flow: #{e}"
47
58
  end
48
59
  ```
49
60
 
@@ -65,13 +76,13 @@ No authorization required
65
76
  - **Accept**: application/json
66
77
 
67
78
 
68
- ## complete_self_service_browser_settings_profile_strategy_flow
79
+ ## complete_self_service_login_flow_with_password_method
69
80
 
70
- > complete_self_service_browser_settings_profile_strategy_flow(request, body)
81
+ > LoginViaApiResponse complete_self_service_login_flow_with_password_method(flow, opts)
71
82
 
72
- Complete the browser-based settings flow for profile data
83
+ Complete Login Flow with Username/Email Password Method
73
84
 
74
- This endpoint completes a browser-based settings flow. This is usually achieved by POSTing data to this endpoint. If the provided profile data is valid against the Identity's Traits JSON Schema, the data will be updated and the browser redirected to `url.settings_ui` for further steps. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
85
+ Use this endpoint to complete a login flow by sending an identity's identifier and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
75
86
 
76
87
  ### Example
77
88
 
@@ -80,14 +91,17 @@ This endpoint completes a browser-based settings flow. This is usually achieved
80
91
  require 'ory-kratos-client'
81
92
 
82
93
  api_instance = OryHydraClient::PublicApi.new
83
- request = 'request_example' # String | Request is the request ID.
84
- body = OryHydraClient::CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload.new # CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload |
94
+ flow = 'flow_example' # String | The Flow ID
95
+ opts = {
96
+ body: OryHydraClient::CompleteSelfServiceLoginFlowWithPasswordMethod.new # CompleteSelfServiceLoginFlowWithPasswordMethod |
97
+ }
85
98
 
86
99
  begin
87
- #Complete the browser-based settings flow for profile data
88
- api_instance.complete_self_service_browser_settings_profile_strategy_flow(request, body)
100
+ #Complete Login Flow with Username/Email Password Method
101
+ result = api_instance.complete_self_service_login_flow_with_password_method(flow, opts)
102
+ p result
89
103
  rescue OryHydraClient::ApiError => e
90
- puts "Exception when calling PublicApi->complete_self_service_browser_settings_profile_strategy_flow: #{e}"
104
+ puts "Exception when calling PublicApi->complete_self_service_login_flow_with_password_method: #{e}"
91
105
  end
92
106
  ```
93
107
 
@@ -96,8 +110,60 @@ end
96
110
 
97
111
  Name | Type | Description | Notes
98
112
  ------------- | ------------- | ------------- | -------------
99
- **request** | **String**| Request is the request ID. |
100
- **body** | [**CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload**](CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload.md)| |
113
+ **flow** | **String**| The Flow ID |
114
+ **body** | [**CompleteSelfServiceLoginFlowWithPasswordMethod**](CompleteSelfServiceLoginFlowWithPasswordMethod.md)| | [optional]
115
+
116
+ ### Return type
117
+
118
+ [**LoginViaApiResponse**](LoginViaApiResponse.md)
119
+
120
+ ### Authorization
121
+
122
+ No authorization required
123
+
124
+ ### HTTP request headers
125
+
126
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
127
+ - **Accept**: application/json
128
+
129
+
130
+ ## complete_self_service_recovery_flow_with_link_method
131
+
132
+ > complete_self_service_recovery_flow_with_link_method(opts)
133
+
134
+ Complete Recovery Flow with Link Method
135
+
136
+ Use this endpoint to complete a recovery flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\"sending a recovery link\") does not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
137
+
138
+ ### Example
139
+
140
+ ```ruby
141
+ # load the gem
142
+ require 'ory-kratos-client'
143
+
144
+ api_instance = OryHydraClient::PublicApi.new
145
+ opts = {
146
+ 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.
147
+ flow: 'flow_example', # String | The Flow ID format: uuid
148
+ body: OryHydraClient::CompleteSelfServiceRecoveryFlowWithLinkMethod.new # CompleteSelfServiceRecoveryFlowWithLinkMethod |
149
+ }
150
+
151
+ begin
152
+ #Complete Recovery Flow with Link Method
153
+ api_instance.complete_self_service_recovery_flow_with_link_method(opts)
154
+ rescue OryHydraClient::ApiError => e
155
+ puts "Exception when calling PublicApi->complete_self_service_recovery_flow_with_link_method: #{e}"
156
+ end
157
+ ```
158
+
159
+ ### Parameters
160
+
161
+
162
+ Name | Type | Description | Notes
163
+ ------------- | ------------- | ------------- | -------------
164
+ **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. | [optional]
165
+ **flow** | **String**| The Flow ID format: uuid | [optional]
166
+ **body** | [**CompleteSelfServiceRecoveryFlowWithLinkMethod**](CompleteSelfServiceRecoveryFlowWithLinkMethod.md)| | [optional]
101
167
 
102
168
  ### Return type
103
169
 
@@ -113,29 +179,90 @@ No authorization required
113
179
  - **Accept**: application/json
114
180
 
115
181
 
116
- ## complete_self_service_browser_verification_flow
182
+ ## complete_self_service_registration_flow_with_password_method
183
+
184
+ > RegistrationViaApiResponse complete_self_service_registration_flow_with_password_method(opts)
185
+
186
+ Complete Registration Flow with Username/Email Password Method
187
+
188
+ Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
189
+
190
+ ### Example
191
+
192
+ ```ruby
193
+ # load the gem
194
+ require 'ory-kratos-client'
195
+
196
+ api_instance = OryHydraClient::PublicApi.new
197
+ opts = {
198
+ flow: 'flow_example', # String | Flow is flow ID.
199
+ payload: nil # Object |
200
+ }
201
+
202
+ begin
203
+ #Complete Registration Flow with Username/Email Password Method
204
+ result = api_instance.complete_self_service_registration_flow_with_password_method(opts)
205
+ p result
206
+ rescue OryHydraClient::ApiError => e
207
+ puts "Exception when calling PublicApi->complete_self_service_registration_flow_with_password_method: #{e}"
208
+ end
209
+ ```
210
+
211
+ ### Parameters
212
+
213
+
214
+ Name | Type | Description | Notes
215
+ ------------- | ------------- | ------------- | -------------
216
+ **flow** | **String**| Flow is flow ID. | [optional]
217
+ **payload** | **Object**| | [optional]
218
+
219
+ ### Return type
220
+
221
+ [**RegistrationViaApiResponse**](RegistrationViaApiResponse.md)
222
+
223
+ ### Authorization
224
+
225
+ No authorization required
226
+
227
+ ### HTTP request headers
228
+
229
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
230
+ - **Accept**: application/json
231
+
232
+
233
+ ## complete_self_service_settings_flow_with_password_method
117
234
 
118
- > complete_self_service_browser_verification_flow(request, via)
235
+ > SettingsViaApiResponse complete_self_service_settings_flow_with_password_method(opts)
119
236
 
120
- Complete the browser-based verification flows
237
+ Complete Settings Flow with Username/Email Password Method
121
238
 
122
- This endpoint completes a browser-based verification flow. This is usually achieved by POSTing data to this endpoint. If the provided data is valid against the Identity's Traits JSON Schema, the data will be updated and the browser redirected to `url.settings_ui` for further steps. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. 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).
239
+ Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
123
240
 
124
241
  ### Example
125
242
 
126
243
  ```ruby
127
244
  # load the gem
128
245
  require 'ory-kratos-client'
246
+ # setup authorization
247
+ OryHydraClient.configure do |config|
248
+ # Configure API key authorization: sessionToken
249
+ config.api_key['X-Session-Token'] = 'YOUR API KEY'
250
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
251
+ #config.api_key_prefix['X-Session-Token'] = 'Bearer'
252
+ end
129
253
 
130
254
  api_instance = OryHydraClient::PublicApi.new
131
- request = 'request_example' # String | Request is the Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verify?request=abcde`).
132
- via = 'via_example' # String | What to verify Currently only \"email\" is supported.
255
+ opts = {
256
+ flow: 'flow_example', # String | Flow is flow ID.
257
+ body: OryHydraClient::CompleteSelfServiceSettingsFlowWithPasswordMethod.new # CompleteSelfServiceSettingsFlowWithPasswordMethod |
258
+ }
133
259
 
134
260
  begin
135
- #Complete the browser-based verification flows
136
- api_instance.complete_self_service_browser_verification_flow(request, via)
261
+ #Complete Settings Flow with Username/Email Password Method
262
+ result = api_instance.complete_self_service_settings_flow_with_password_method(opts)
263
+ p result
137
264
  rescue OryHydraClient::ApiError => e
138
- puts "Exception when calling PublicApi->complete_self_service_browser_verification_flow: #{e}"
265
+ puts "Exception when calling PublicApi->complete_self_service_settings_flow_with_password_method: #{e}"
139
266
  end
140
267
  ```
141
268
 
@@ -144,8 +271,118 @@ end
144
271
 
145
272
  Name | Type | Description | Notes
146
273
  ------------- | ------------- | ------------- | -------------
147
- **request** | **String**| Request is the Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verify?request=abcde`). |
148
- **via** | **String**| What to verify Currently only \"email\" is supported. |
274
+ **flow** | **String**| Flow is flow ID. | [optional]
275
+ **body** | [**CompleteSelfServiceSettingsFlowWithPasswordMethod**](CompleteSelfServiceSettingsFlowWithPasswordMethod.md)| | [optional]
276
+
277
+ ### Return type
278
+
279
+ [**SettingsViaApiResponse**](SettingsViaApiResponse.md)
280
+
281
+ ### Authorization
282
+
283
+ [sessionToken](../README.md#sessionToken)
284
+
285
+ ### HTTP request headers
286
+
287
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
288
+ - **Accept**: application/json
289
+
290
+
291
+ ## complete_self_service_settings_flow_with_profile_method
292
+
293
+ > SettingsFlow complete_self_service_settings_flow_with_profile_method(opts)
294
+
295
+ Complete Settings Flow with Profile Method
296
+
297
+ Use this endpoint to complete a settings flow by sending an identity's updated traits. 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 and a sensitive field was updated (e.g. recovery email). Implies that the user needs to re-authenticate. Browser flows expect `application/x-www-form-urlencoded` to be sent in the body and responds with a HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 302 redirect to the settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
298
+
299
+ ### Example
300
+
301
+ ```ruby
302
+ # load the gem
303
+ require 'ory-kratos-client'
304
+ # setup authorization
305
+ OryHydraClient.configure do |config|
306
+ # Configure API key authorization: sessionToken
307
+ config.api_key['X-Session-Token'] = 'YOUR API KEY'
308
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
309
+ #config.api_key_prefix['X-Session-Token'] = 'Bearer'
310
+ end
311
+
312
+ api_instance = OryHydraClient::PublicApi.new
313
+ opts = {
314
+ flow: 'flow_example', # String | Flow is flow ID.
315
+ payload: nil # Object |
316
+ }
317
+
318
+ begin
319
+ #Complete Settings Flow with Profile Method
320
+ result = api_instance.complete_self_service_settings_flow_with_profile_method(opts)
321
+ p result
322
+ rescue OryHydraClient::ApiError => e
323
+ puts "Exception when calling PublicApi->complete_self_service_settings_flow_with_profile_method: #{e}"
324
+ end
325
+ ```
326
+
327
+ ### Parameters
328
+
329
+
330
+ Name | Type | Description | Notes
331
+ ------------- | ------------- | ------------- | -------------
332
+ **flow** | **String**| Flow is flow ID. | [optional]
333
+ **payload** | **Object**| | [optional]
334
+
335
+ ### Return type
336
+
337
+ [**SettingsFlow**](SettingsFlow.md)
338
+
339
+ ### Authorization
340
+
341
+ [sessionToken](../README.md#sessionToken)
342
+
343
+ ### HTTP request headers
344
+
345
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
346
+ - **Accept**: application/json
347
+
348
+
349
+ ## complete_self_service_verification_flow_with_link_method
350
+
351
+ > complete_self_service_verification_flow_with_link_method(opts)
352
+
353
+ Complete Verification Flow with Link Method
354
+
355
+ Use this endpoint to complete a verification flow using the link method. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` 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).
356
+
357
+ ### Example
358
+
359
+ ```ruby
360
+ # load the gem
361
+ require 'ory-kratos-client'
362
+
363
+ api_instance = OryHydraClient::PublicApi.new
364
+ opts = {
365
+ 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.
366
+ flow: 'flow_example', # String | The Flow ID format: uuid
367
+ body: OryHydraClient::CompleteSelfServiceVerificationFlowWithLinkMethod.new # CompleteSelfServiceVerificationFlowWithLinkMethod |
368
+ }
369
+
370
+ begin
371
+ #Complete Verification Flow with Link Method
372
+ api_instance.complete_self_service_verification_flow_with_link_method(opts)
373
+ rescue OryHydraClient::ApiError => e
374
+ puts "Exception when calling PublicApi->complete_self_service_verification_flow_with_link_method: #{e}"
375
+ end
376
+ ```
377
+
378
+ ### Parameters
379
+
380
+
381
+ Name | Type | Description | Notes
382
+ ------------- | ------------- | ------------- | -------------
383
+ **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. | [optional]
384
+ **flow** | **String**| The Flow ID format: uuid | [optional]
385
+ **body** | [**CompleteSelfServiceVerificationFlowWithLinkMethod**](CompleteSelfServiceVerificationFlowWithLinkMethod.md)| | [optional]
149
386
 
150
387
  ### Return type
151
388
 
@@ -157,7 +394,7 @@ No authorization required
157
394
 
158
395
  ### HTTP request headers
159
396
 
160
- - **Content-Type**: Not defined
397
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
161
398
  - **Accept**: application/json
162
399
 
163
400
 
@@ -167,7 +404,7 @@ No authorization required
167
404
 
168
405
 
169
406
 
170
- Get a traits schema definition
407
+ Get a Traits Schema Definition
171
408
 
172
409
  ### Example
173
410
 
@@ -207,13 +444,13 @@ No authorization required
207
444
  - **Accept**: application/json
208
445
 
209
446
 
210
- ## get_self_service_browser_login_request
447
+ ## get_self_service_error
211
448
 
212
- > LoginRequest get_self_service_browser_login_request(request)
449
+ > ErrorContainer get_self_service_error(error)
213
450
 
214
- Get the request context of browser-based login user flows
451
+ Get User-Facing Self-Service Errors
215
452
 
216
- This endpoint returns a login request's context with, for example, error details and other information. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. 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).
453
+ This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?error=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [ORY Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
217
454
 
218
455
  ### Example
219
456
 
@@ -222,14 +459,14 @@ This endpoint returns a login request's context with, for example, error details
222
459
  require 'ory-kratos-client'
223
460
 
224
461
  api_instance = OryHydraClient::PublicApi.new
225
- request = 'request_example' # String | Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
462
+ error = 'error_example' # String | Error is the container's ID
226
463
 
227
464
  begin
228
- #Get the request context of browser-based login user flows
229
- result = api_instance.get_self_service_browser_login_request(request)
465
+ #Get User-Facing Self-Service Errors
466
+ result = api_instance.get_self_service_error(error)
230
467
  p result
231
468
  rescue OryHydraClient::ApiError => e
232
- puts "Exception when calling PublicApi->get_self_service_browser_login_request: #{e}"
469
+ puts "Exception when calling PublicApi->get_self_service_error: #{e}"
233
470
  end
234
471
  ```
235
472
 
@@ -238,11 +475,11 @@ end
238
475
 
239
476
  Name | Type | Description | Notes
240
477
  ------------- | ------------- | ------------- | -------------
241
- **request** | **String**| Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`). |
478
+ **error** | **String**| Error is the container's ID |
242
479
 
243
480
  ### Return type
244
481
 
245
- [**LoginRequest**](LoginRequest.md)
482
+ [**ErrorContainer**](ErrorContainer.md)
246
483
 
247
484
  ### Authorization
248
485
 
@@ -254,13 +491,13 @@ No authorization required
254
491
  - **Accept**: application/json
255
492
 
256
493
 
257
- ## get_self_service_browser_registration_request
494
+ ## get_self_service_login_flow
258
495
 
259
- > RegistrationRequest get_self_service_browser_registration_request(request)
496
+ > LoginFlow get_self_service_login_flow(id)
260
497
 
261
- Get the request context of browser-based registration user flows
498
+ Get Login Flow
262
499
 
263
- This endpoint returns a registration request's context with, for example, error details and other information. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. 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).
500
+ This endpoint returns a login flow's context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
264
501
 
265
502
  ### Example
266
503
 
@@ -269,14 +506,14 @@ This endpoint returns a registration request's context with, for example, error
269
506
  require 'ory-kratos-client'
270
507
 
271
508
  api_instance = OryHydraClient::PublicApi.new
272
- request = 'request_example' # String | Request is the Registration Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/registration?request=abcde`).
509
+ 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`).
273
510
 
274
511
  begin
275
- #Get the request context of browser-based registration user flows
276
- result = api_instance.get_self_service_browser_registration_request(request)
512
+ #Get Login Flow
513
+ result = api_instance.get_self_service_login_flow(id)
277
514
  p result
278
515
  rescue OryHydraClient::ApiError => e
279
- puts "Exception when calling PublicApi->get_self_service_browser_registration_request: #{e}"
516
+ puts "Exception when calling PublicApi->get_self_service_login_flow: #{e}"
280
517
  end
281
518
  ```
282
519
 
@@ -285,11 +522,11 @@ end
285
522
 
286
523
  Name | Type | Description | Notes
287
524
  ------------- | ------------- | ------------- | -------------
288
- **request** | **String**| Request is the Registration Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/registration?request=abcde`). |
525
+ **id** | **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`). |
289
526
 
290
527
  ### Return type
291
528
 
292
- [**RegistrationRequest**](RegistrationRequest.md)
529
+ [**LoginFlow**](LoginFlow.md)
293
530
 
294
531
  ### Authorization
295
532
 
@@ -301,13 +538,13 @@ No authorization required
301
538
  - **Accept**: application/json
302
539
 
303
540
 
304
- ## get_self_service_browser_settings_request
541
+ ## get_self_service_recovery_flow
305
542
 
306
- > SettingsRequest get_self_service_browser_settings_request(request)
543
+ > RecoveryFlow get_self_service_recovery_flow(id)
307
544
 
308
- Get the request context of browser-based settings flows
545
+ Get information about a recovery flow
309
546
 
310
- When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos User Settings & Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
547
+ This endpoint returns a recovery flow's context with, for example, error details and other information. More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
311
548
 
312
549
  ### Example
313
550
 
@@ -316,14 +553,14 @@ When accessing this endpoint through ORY Kratos' Public API, ensure that cookies
316
553
  require 'ory-kratos-client'
317
554
 
318
555
  api_instance = OryHydraClient::PublicApi.new
319
- request = 'request_example' # String | Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
556
+ 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`).
320
557
 
321
558
  begin
322
- #Get the request context of browser-based settings flows
323
- result = api_instance.get_self_service_browser_settings_request(request)
559
+ #Get information about a recovery flow
560
+ result = api_instance.get_self_service_recovery_flow(id)
324
561
  p result
325
562
  rescue OryHydraClient::ApiError => e
326
- puts "Exception when calling PublicApi->get_self_service_browser_settings_request: #{e}"
563
+ puts "Exception when calling PublicApi->get_self_service_recovery_flow: #{e}"
327
564
  end
328
565
  ```
329
566
 
@@ -332,11 +569,11 @@ end
332
569
 
333
570
  Name | Type | Description | Notes
334
571
  ------------- | ------------- | ------------- | -------------
335
- **request** | **String**| Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`). |
572
+ **id** | **String**| The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). |
336
573
 
337
574
  ### Return type
338
575
 
339
- [**SettingsRequest**](SettingsRequest.md)
576
+ [**RecoveryFlow**](RecoveryFlow.md)
340
577
 
341
578
  ### Authorization
342
579
 
@@ -348,13 +585,13 @@ No authorization required
348
585
  - **Accept**: application/json
349
586
 
350
587
 
351
- ## get_self_service_error
588
+ ## get_self_service_registration_flow
352
589
 
353
- > ErrorContainer get_self_service_error(opts)
590
+ > RegistrationFlow get_self_service_registration_flow(id)
354
591
 
355
- Get user-facing self-service errors
592
+ Get Registration Flow
356
593
 
357
- This endpoint returns the error associated with a user-facing self service errors. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. 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).
594
+ This endpoint returns a registration flow's context with, for example, error details and other information. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
358
595
 
359
596
  ### Example
360
597
 
@@ -363,16 +600,14 @@ This endpoint returns the error associated with a user-facing self service error
363
600
  require 'ory-kratos-client'
364
601
 
365
602
  api_instance = OryHydraClient::PublicApi.new
366
- opts = {
367
- error: 'error_example' # String |
368
- }
603
+ 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`).
369
604
 
370
605
  begin
371
- #Get user-facing self-service errors
372
- result = api_instance.get_self_service_error(opts)
606
+ #Get Registration Flow
607
+ result = api_instance.get_self_service_registration_flow(id)
373
608
  p result
374
609
  rescue OryHydraClient::ApiError => e
375
- puts "Exception when calling PublicApi->get_self_service_error: #{e}"
610
+ puts "Exception when calling PublicApi->get_self_service_registration_flow: #{e}"
376
611
  end
377
612
  ```
378
613
 
@@ -381,11 +616,11 @@ end
381
616
 
382
617
  Name | Type | Description | Notes
383
618
  ------------- | ------------- | ------------- | -------------
384
- **error** | **String**| | [optional]
619
+ **id** | **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`). |
385
620
 
386
621
  ### Return type
387
622
 
388
- [**ErrorContainer**](ErrorContainer.md)
623
+ [**RegistrationFlow**](RegistrationFlow.md)
389
624
 
390
625
  ### Authorization
391
626
 
@@ -397,29 +632,36 @@ No authorization required
397
632
  - **Accept**: application/json
398
633
 
399
634
 
400
- ## get_self_service_verification_request
635
+ ## get_self_service_settings_flow
401
636
 
402
- > VerificationRequest get_self_service_verification_request(request)
637
+ > SettingsFlow get_self_service_settings_flow(id)
403
638
 
404
- Get the request context of browser-based verification flows
639
+ Get Settings Flow
405
640
 
406
- When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. 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).
641
+ 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).
407
642
 
408
643
  ### Example
409
644
 
410
645
  ```ruby
411
646
  # load the gem
412
647
  require 'ory-kratos-client'
648
+ # setup authorization
649
+ OryHydraClient.configure do |config|
650
+ # Configure API key authorization: sessionToken
651
+ config.api_key['X-Session-Token'] = 'YOUR API KEY'
652
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
653
+ #config.api_key_prefix['X-Session-Token'] = 'Bearer'
654
+ end
413
655
 
414
656
  api_instance = OryHydraClient::PublicApi.new
415
- request = 'request_example' # String | Request is the Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verify?request=abcde`).
657
+ 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`).
416
658
 
417
659
  begin
418
- #Get the request context of browser-based verification flows
419
- result = api_instance.get_self_service_verification_request(request)
660
+ #Get Settings Flow
661
+ result = api_instance.get_self_service_settings_flow(id)
420
662
  p result
421
663
  rescue OryHydraClient::ApiError => e
422
- puts "Exception when calling PublicApi->get_self_service_verification_request: #{e}"
664
+ puts "Exception when calling PublicApi->get_self_service_settings_flow: #{e}"
423
665
  end
424
666
  ```
425
667
 
@@ -428,15 +670,15 @@ end
428
670
 
429
671
  Name | Type | Description | Notes
430
672
  ------------- | ------------- | ------------- | -------------
431
- **request** | **String**| Request is the Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verify?request=abcde`). |
673
+ **id** | **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`). |
432
674
 
433
675
  ### Return type
434
676
 
435
- [**VerificationRequest**](VerificationRequest.md)
677
+ [**SettingsFlow**](SettingsFlow.md)
436
678
 
437
679
  ### Authorization
438
680
 
439
- No authorization required
681
+ [sessionToken](../README.md#sessionToken)
440
682
 
441
683
  ### HTTP request headers
442
684
 
@@ -444,13 +686,13 @@ No authorization required
444
686
  - **Accept**: application/json
445
687
 
446
688
 
447
- ## initialize_self_service_browser_login_flow
689
+ ## get_self_service_verification_flow
448
690
 
449
- > initialize_self_service_browser_login_flow
691
+ > VerificationFlow get_self_service_verification_flow(id)
450
692
 
451
- Initialize browser-based login user flow
693
+ Get Verification Flow
452
694
 
453
- This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `urls.login_ui` with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
695
+ This endpoint returns a verification flow's context with, for example, error details and other information. More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
454
696
 
455
697
  ### Example
456
698
 
@@ -459,22 +701,27 @@ This endpoint initializes a browser-based user login flow. Once initialized, the
459
701
  require 'ory-kratos-client'
460
702
 
461
703
  api_instance = OryHydraClient::PublicApi.new
704
+ 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`).
462
705
 
463
706
  begin
464
- #Initialize browser-based login user flow
465
- api_instance.initialize_self_service_browser_login_flow
707
+ #Get Verification Flow
708
+ result = api_instance.get_self_service_verification_flow(id)
709
+ p result
466
710
  rescue OryHydraClient::ApiError => e
467
- puts "Exception when calling PublicApi->initialize_self_service_browser_login_flow: #{e}"
711
+ puts "Exception when calling PublicApi->get_self_service_verification_flow: #{e}"
468
712
  end
469
713
  ```
470
714
 
471
715
  ### Parameters
472
716
 
473
- This endpoint does not need any parameter.
717
+
718
+ Name | Type | Description | Notes
719
+ ------------- | ------------- | ------------- | -------------
720
+ **id** | **String**| The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). |
474
721
 
475
722
  ### Return type
476
723
 
477
- nil (empty response body)
724
+ [**VerificationFlow**](VerificationFlow.md)
478
725
 
479
726
  ### Authorization
480
727
 
@@ -528,13 +775,147 @@ No authorization required
528
775
  - **Accept**: application/json
529
776
 
530
777
 
531
- ## initialize_self_service_browser_registration_flow
778
+ ## initialize_self_service_login_via_api_flow
779
+
780
+ > LoginFlow initialize_self_service_login_via_api_flow(opts)
781
+
782
+ Initialize Login Flow for API clients
783
+
784
+ This endpoint initiates a login flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
785
+
786
+ ### Example
787
+
788
+ ```ruby
789
+ # load the gem
790
+ require 'ory-kratos-client'
791
+
792
+ api_instance = OryHydraClient::PublicApi.new
793
+ opts = {
794
+ 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.
795
+ }
796
+
797
+ begin
798
+ #Initialize Login Flow for API clients
799
+ result = api_instance.initialize_self_service_login_via_api_flow(opts)
800
+ p result
801
+ rescue OryHydraClient::ApiError => e
802
+ puts "Exception when calling PublicApi->initialize_self_service_login_via_api_flow: #{e}"
803
+ end
804
+ ```
805
+
806
+ ### Parameters
807
+
808
+
809
+ Name | Type | Description | Notes
810
+ ------------- | ------------- | ------------- | -------------
811
+ **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]
812
+
813
+ ### Return type
814
+
815
+ [**LoginFlow**](LoginFlow.md)
816
+
817
+ ### Authorization
818
+
819
+ No authorization required
820
+
821
+ ### HTTP request headers
822
+
823
+ - **Content-Type**: Not defined
824
+ - **Accept**: application/json
825
+
826
+
827
+ ## initialize_self_service_login_via_browser_flow
828
+
829
+ > initialize_self_service_login_via_browser_flow
830
+
831
+ Initialize Login Flow for browsers
832
+
833
+ This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
834
+
835
+ ### Example
836
+
837
+ ```ruby
838
+ # load the gem
839
+ require 'ory-kratos-client'
840
+
841
+ api_instance = OryHydraClient::PublicApi.new
842
+
843
+ begin
844
+ #Initialize Login Flow for browsers
845
+ api_instance.initialize_self_service_login_via_browser_flow
846
+ rescue OryHydraClient::ApiError => e
847
+ puts "Exception when calling PublicApi->initialize_self_service_login_via_browser_flow: #{e}"
848
+ end
849
+ ```
850
+
851
+ ### Parameters
852
+
853
+ This endpoint does not need any parameter.
854
+
855
+ ### Return type
856
+
857
+ nil (empty response body)
858
+
859
+ ### Authorization
860
+
861
+ No authorization required
862
+
863
+ ### HTTP request headers
864
+
865
+ - **Content-Type**: Not defined
866
+ - **Accept**: application/json
867
+
868
+
869
+ ## initialize_self_service_recovery_via_api_flow
870
+
871
+ > RecoveryFlow initialize_self_service_recovery_via_api_flow
872
+
873
+ Initialize Recovery Flow for API Clients
874
+
875
+ This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
876
+
877
+ ### Example
878
+
879
+ ```ruby
880
+ # load the gem
881
+ require 'ory-kratos-client'
882
+
883
+ api_instance = OryHydraClient::PublicApi.new
884
+
885
+ begin
886
+ #Initialize Recovery Flow for API Clients
887
+ result = api_instance.initialize_self_service_recovery_via_api_flow
888
+ p result
889
+ rescue OryHydraClient::ApiError => e
890
+ puts "Exception when calling PublicApi->initialize_self_service_recovery_via_api_flow: #{e}"
891
+ end
892
+ ```
893
+
894
+ ### Parameters
895
+
896
+ This endpoint does not need any parameter.
897
+
898
+ ### Return type
899
+
900
+ [**RecoveryFlow**](RecoveryFlow.md)
901
+
902
+ ### Authorization
903
+
904
+ No authorization required
905
+
906
+ ### HTTP request headers
907
+
908
+ - **Content-Type**: Not defined
909
+ - **Accept**: application/json
910
+
911
+
912
+ ## initialize_self_service_recovery_via_browser_flow
532
913
 
533
- > initialize_self_service_browser_registration_flow
914
+ > initialize_self_service_recovery_via_browser_flow
534
915
 
535
- Initialize browser-based registration user flow
916
+ Initialize Recovery Flow for Browser Clients
536
917
 
537
- This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `urls.registration_ui` with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
918
+ This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
538
919
 
539
920
  ### Example
540
921
 
@@ -545,10 +926,10 @@ require 'ory-kratos-client'
545
926
  api_instance = OryHydraClient::PublicApi.new
546
927
 
547
928
  begin
548
- #Initialize browser-based registration user flow
549
- api_instance.initialize_self_service_browser_registration_flow
929
+ #Initialize Recovery Flow for Browser Clients
930
+ api_instance.initialize_self_service_recovery_via_browser_flow
550
931
  rescue OryHydraClient::ApiError => e
551
- puts "Exception when calling PublicApi->initialize_self_service_browser_registration_flow: #{e}"
932
+ puts "Exception when calling PublicApi->initialize_self_service_recovery_via_browser_flow: #{e}"
552
933
  end
553
934
  ```
554
935
 
@@ -570,13 +951,13 @@ No authorization required
570
951
  - **Accept**: application/json
571
952
 
572
953
 
573
- ## initialize_self_service_browser_verification_flow
954
+ ## initialize_self_service_registration_via_api_flow
574
955
 
575
- > initialize_self_service_browser_verification_flow(via)
956
+ > RegistrationFlow initialize_self_service_registration_via_api_flow
576
957
 
577
- Initialize browser-based verification flow
958
+ Initialize Registration Flow for API clients
578
959
 
579
- This endpoint initializes a browser-based verification flow. Once initialized, the browser will be redirected to `urls.settings_ui` with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. > 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).
960
+ This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
580
961
 
581
962
  ### Example
582
963
 
@@ -585,22 +966,61 @@ This endpoint initializes a browser-based verification flow. Once initialized, t
585
966
  require 'ory-kratos-client'
586
967
 
587
968
  api_instance = OryHydraClient::PublicApi.new
588
- via = 'via_example' # String | What to verify Currently only \"email\" is supported.
589
969
 
590
970
  begin
591
- #Initialize browser-based verification flow
592
- api_instance.initialize_self_service_browser_verification_flow(via)
971
+ #Initialize Registration Flow for API clients
972
+ result = api_instance.initialize_self_service_registration_via_api_flow
973
+ p result
593
974
  rescue OryHydraClient::ApiError => e
594
- puts "Exception when calling PublicApi->initialize_self_service_browser_verification_flow: #{e}"
975
+ puts "Exception when calling PublicApi->initialize_self_service_registration_via_api_flow: #{e}"
595
976
  end
596
977
  ```
597
978
 
598
979
  ### Parameters
599
980
 
981
+ This endpoint does not need any parameter.
600
982
 
601
- Name | Type | Description | Notes
602
- ------------- | ------------- | ------------- | -------------
603
- **via** | **String**| What to verify Currently only \&quot;email\&quot; is supported. |
983
+ ### Return type
984
+
985
+ [**RegistrationFlow**](RegistrationFlow.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_registration_via_browser_flow
998
+
999
+ > initialize_self_service_registration_via_browser_flow
1000
+
1001
+ Initialize Registration Flow for browsers
1002
+
1003
+ This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
1004
+
1005
+ ### Example
1006
+
1007
+ ```ruby
1008
+ # load the gem
1009
+ require 'ory-kratos-client'
1010
+
1011
+ api_instance = OryHydraClient::PublicApi.new
1012
+
1013
+ begin
1014
+ #Initialize Registration Flow for browsers
1015
+ api_instance.initialize_self_service_registration_via_browser_flow
1016
+ rescue OryHydraClient::ApiError => e
1017
+ puts "Exception when calling PublicApi->initialize_self_service_registration_via_browser_flow: #{e}"
1018
+ end
1019
+ ```
1020
+
1021
+ ### Parameters
1022
+
1023
+ This endpoint does not need any parameter.
604
1024
 
605
1025
  ### Return type
606
1026
 
@@ -616,27 +1036,169 @@ No authorization required
616
1036
  - **Accept**: application/json
617
1037
 
618
1038
 
619
- ## initialize_self_service_settings_flow
1039
+ ## initialize_self_service_settings_via_api_flow
620
1040
 
621
- > initialize_self_service_settings_flow
1041
+ > SettingsFlow initialize_self_service_settings_via_api_flow
622
1042
 
623
- Initialize browser-based settings flow
1043
+ Initialize Settings Flow for API Clients
624
1044
 
625
- This endpoint initializes a browser-based settings flow. Once initialized, the browser will be redirected to `urls.settings_ui` with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos User Settings & Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-settings-profile-management).
1045
+ This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid ORY Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
626
1046
 
627
1047
  ### Example
628
1048
 
629
1049
  ```ruby
630
1050
  # load the gem
631
1051
  require 'ory-kratos-client'
1052
+ # setup authorization
1053
+ OryHydraClient.configure do |config|
1054
+ # Configure API key authorization: sessionToken
1055
+ config.api_key['X-Session-Token'] = 'YOUR API KEY'
1056
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1057
+ #config.api_key_prefix['X-Session-Token'] = 'Bearer'
1058
+ end
632
1059
 
633
1060
  api_instance = OryHydraClient::PublicApi.new
634
1061
 
635
1062
  begin
636
- #Initialize browser-based settings flow
637
- api_instance.initialize_self_service_settings_flow
1063
+ #Initialize Settings Flow for API Clients
1064
+ result = api_instance.initialize_self_service_settings_via_api_flow
1065
+ p result
638
1066
  rescue OryHydraClient::ApiError => e
639
- puts "Exception when calling PublicApi->initialize_self_service_settings_flow: #{e}"
1067
+ puts "Exception when calling PublicApi->initialize_self_service_settings_via_api_flow: #{e}"
1068
+ end
1069
+ ```
1070
+
1071
+ ### Parameters
1072
+
1073
+ This endpoint does not need any parameter.
1074
+
1075
+ ### Return type
1076
+
1077
+ [**SettingsFlow**](SettingsFlow.md)
1078
+
1079
+ ### Authorization
1080
+
1081
+ [sessionToken](../README.md#sessionToken)
1082
+
1083
+ ### HTTP request headers
1084
+
1085
+ - **Content-Type**: Not defined
1086
+ - **Accept**: application/json
1087
+
1088
+
1089
+ ## initialize_self_service_settings_via_browser_flow
1090
+
1091
+ > initialize_self_service_settings_via_browser_flow
1092
+
1093
+ Initialize Settings Flow for Browsers
1094
+
1095
+ This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid ORY Kratos Session Cookie is included in the request, a login flow will be initialized. :::note This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). ::: More information can be found at [ORY Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
1096
+
1097
+ ### Example
1098
+
1099
+ ```ruby
1100
+ # load the gem
1101
+ require 'ory-kratos-client'
1102
+ # setup authorization
1103
+ OryHydraClient.configure do |config|
1104
+ # Configure API key authorization: sessionToken
1105
+ config.api_key['X-Session-Token'] = 'YOUR API KEY'
1106
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1107
+ #config.api_key_prefix['X-Session-Token'] = 'Bearer'
1108
+ end
1109
+
1110
+ api_instance = OryHydraClient::PublicApi.new
1111
+
1112
+ begin
1113
+ #Initialize Settings Flow for Browsers
1114
+ api_instance.initialize_self_service_settings_via_browser_flow
1115
+ rescue OryHydraClient::ApiError => e
1116
+ puts "Exception when calling PublicApi->initialize_self_service_settings_via_browser_flow: #{e}"
1117
+ end
1118
+ ```
1119
+
1120
+ ### Parameters
1121
+
1122
+ This endpoint does not need any parameter.
1123
+
1124
+ ### Return type
1125
+
1126
+ nil (empty response body)
1127
+
1128
+ ### Authorization
1129
+
1130
+ [sessionToken](../README.md#sessionToken)
1131
+
1132
+ ### HTTP request headers
1133
+
1134
+ - **Content-Type**: Not defined
1135
+ - **Accept**: application/json
1136
+
1137
+
1138
+ ## initialize_self_service_verification_via_api_flow
1139
+
1140
+ > VerificationFlow initialize_self_service_verification_via_api_flow
1141
+
1142
+ Initialize Verification Flow for API Clients
1143
+
1144
+ This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1145
+
1146
+ ### Example
1147
+
1148
+ ```ruby
1149
+ # load the gem
1150
+ require 'ory-kratos-client'
1151
+
1152
+ api_instance = OryHydraClient::PublicApi.new
1153
+
1154
+ begin
1155
+ #Initialize Verification Flow for API Clients
1156
+ result = api_instance.initialize_self_service_verification_via_api_flow
1157
+ p result
1158
+ rescue OryHydraClient::ApiError => e
1159
+ puts "Exception when calling PublicApi->initialize_self_service_verification_via_api_flow: #{e}"
1160
+ end
1161
+ ```
1162
+
1163
+ ### Parameters
1164
+
1165
+ This endpoint does not need any parameter.
1166
+
1167
+ ### Return type
1168
+
1169
+ [**VerificationFlow**](VerificationFlow.md)
1170
+
1171
+ ### Authorization
1172
+
1173
+ No authorization required
1174
+
1175
+ ### HTTP request headers
1176
+
1177
+ - **Content-Type**: Not defined
1178
+ - **Accept**: application/json
1179
+
1180
+
1181
+ ## initialize_self_service_verification_via_browser_flow
1182
+
1183
+ > initialize_self_service_verification_via_browser_flow
1184
+
1185
+ Initialize Verification Flow for Browser Clients
1186
+
1187
+ This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
1188
+
1189
+ ### Example
1190
+
1191
+ ```ruby
1192
+ # load the gem
1193
+ require 'ory-kratos-client'
1194
+
1195
+ api_instance = OryHydraClient::PublicApi.new
1196
+
1197
+ begin
1198
+ #Initialize Verification Flow for Browser Clients
1199
+ api_instance.initialize_self_service_verification_via_browser_flow
1200
+ rescue OryHydraClient::ApiError => e
1201
+ puts "Exception when calling PublicApi->initialize_self_service_verification_via_browser_flow: #{e}"
640
1202
  end
641
1203
  ```
642
1204
 
@@ -658,13 +1220,13 @@ No authorization required
658
1220
  - **Accept**: application/json
659
1221
 
660
1222
 
661
- ## self_service_browser_verify
1223
+ ## revoke_session
662
1224
 
663
- > self_service_browser_verify(code, via)
1225
+ > revoke_session(body)
664
1226
 
665
- Complete the browser-based verification flows
1227
+ Revoke and Invalidate a Session
666
1228
 
667
- This endpoint completes a browser-based verification flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. 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).
1229
+ Use this endpoint to revoke a session using its token. This endpoint is particularly useful for API clients such as mobile apps to log the user out of the system and invalidate the session. This endpoint does not remove any HTTP Cookies - use the Self-Service Logout Flow instead.
668
1230
 
669
1231
  ### Example
670
1232
 
@@ -673,14 +1235,13 @@ This endpoint completes a browser-based verification flow. > This endpoint is N
673
1235
  require 'ory-kratos-client'
674
1236
 
675
1237
  api_instance = OryHydraClient::PublicApi.new
676
- code = 'code_example' # String |
677
- via = 'via_example' # String | What to verify Currently only \"email\" is supported.
1238
+ body = OryHydraClient::RevokeSession.new # RevokeSession |
678
1239
 
679
1240
  begin
680
- #Complete the browser-based verification flows
681
- api_instance.self_service_browser_verify(code, via)
1241
+ #Revoke and Invalidate a Session
1242
+ api_instance.revoke_session(body)
682
1243
  rescue OryHydraClient::ApiError => e
683
- puts "Exception when calling PublicApi->self_service_browser_verify: #{e}"
1244
+ puts "Exception when calling PublicApi->revoke_session: #{e}"
684
1245
  end
685
1246
  ```
686
1247
 
@@ -689,8 +1250,7 @@ end
689
1250
 
690
1251
  Name | Type | Description | Notes
691
1252
  ------------- | ------------- | ------------- | -------------
692
- **code** | **String**| |
693
- **via** | **String**| What to verify Currently only \&quot;email\&quot; is supported. |
1253
+ **body** | [**RevokeSession**](RevokeSession.md)| |
694
1254
 
695
1255
  ### Return type
696
1256
 
@@ -702,29 +1262,40 @@ No authorization required
702
1262
 
703
1263
  ### HTTP request headers
704
1264
 
705
- - **Content-Type**: Not defined
1265
+ - **Content-Type**: application/json
706
1266
  - **Accept**: application/json
707
1267
 
708
1268
 
709
1269
  ## whoami
710
1270
 
711
- > Session whoami
1271
+ > Session whoami(opts)
712
1272
 
713
- Check who the current HTTP session belongs to
1273
+ Check Who the Current HTTP Session Belongs To
714
1274
 
715
- Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object or 401 if the credentials are invalid or no credentials were sent. This endpoint is useful for reverse proxies and API Gateways.
1275
+ Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response. This endpoint is useful for reverse proxies and API Gateways.
716
1276
 
717
1277
  ### Example
718
1278
 
719
1279
  ```ruby
720
1280
  # load the gem
721
1281
  require 'ory-kratos-client'
1282
+ # setup authorization
1283
+ OryHydraClient.configure do |config|
1284
+ # Configure API key authorization: sessionToken
1285
+ config.api_key['X-Session-Token'] = 'YOUR API KEY'
1286
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1287
+ #config.api_key_prefix['X-Session-Token'] = 'Bearer'
1288
+ end
722
1289
 
723
1290
  api_instance = OryHydraClient::PublicApi.new
1291
+ opts = {
1292
+ cookie: 'cookie_example', # String |
1293
+ authorization: 'authorization_example' # String | in: authorization
1294
+ }
724
1295
 
725
1296
  begin
726
- #Check who the current HTTP session belongs to
727
- result = api_instance.whoami
1297
+ #Check Who the Current HTTP Session Belongs To
1298
+ result = api_instance.whoami(opts)
728
1299
  p result
729
1300
  rescue OryHydraClient::ApiError => e
730
1301
  puts "Exception when calling PublicApi->whoami: #{e}"
@@ -733,7 +1304,11 @@ end
733
1304
 
734
1305
  ### Parameters
735
1306
 
736
- This endpoint does not need any parameter.
1307
+
1308
+ Name | Type | Description | Notes
1309
+ ------------- | ------------- | ------------- | -------------
1310
+ **cookie** | **String**| | [optional]
1311
+ **authorization** | **String**| in: authorization | [optional]
737
1312
 
738
1313
  ### Return type
739
1314
 
@@ -741,7 +1316,7 @@ This endpoint does not need any parameter.
741
1316
 
742
1317
  ### Authorization
743
1318
 
744
- No authorization required
1319
+ [sessionToken](../README.md#sessionToken)
745
1320
 
746
1321
  ### HTTP request headers
747
1322