ory-kratos-client 0.3.0.alpha1 → 0.5.3.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +84 -54
- data/docs/AdminApi.md +244 -86
- data/docs/CommonApi.md +53 -5
- data/docs/CompleteSelfServiceLoginFlowWithPasswordMethod.md +21 -0
- data/docs/CompleteSelfServiceRecoveryFlowWithLinkMethod.md +19 -0
- data/docs/CompleteSelfServiceSettingsFlowWithPasswordMethod.md +19 -0
- data/docs/CompleteSelfServiceVerificationFlowWithLinkMethod.md +19 -0
- data/docs/CreateIdentity.md +19 -0
- data/docs/CreateRecoveryLink.md +19 -0
- data/docs/ErrorContainer.md +2 -2
- data/docs/Form.md +2 -2
- data/docs/FormField.md +3 -3
- data/docs/GenericErrorPayload.md +1 -1
- data/docs/Identity.md +9 -7
- data/docs/LoginFlow.md +33 -0
- data/docs/LoginFlowMethod.md +19 -0
- data/docs/LoginFlowMethodConfig.md +25 -0
- data/docs/LoginRequest.md +2 -0
- data/docs/LoginRequestMethodConfig.md +2 -2
- data/docs/LoginViaApiResponse.md +19 -0
- data/docs/Message.md +23 -0
- data/docs/PublicApi.md +689 -157
- data/docs/RecoveryAddress.md +21 -0
- data/docs/RecoveryFlow.md +33 -0
- data/docs/RecoveryFlowMethod.md +19 -0
- data/docs/RecoveryFlowMethodConfig.md +23 -0
- data/docs/RecoveryLink.md +19 -0
- data/docs/RecoveryRequest.md +31 -0
- data/docs/RecoveryRequestMethod.md +19 -0
- data/docs/RegistrationFlow.md +31 -0
- data/docs/RegistrationFlowMethod.md +19 -0
- data/docs/RegistrationFlowMethodConfig.md +25 -0
- data/docs/RegistrationRequest.md +2 -0
- data/docs/RegistrationRequestMethodConfig.md +2 -2
- data/docs/RegistrationViaApiResponse.md +21 -0
- data/docs/RequestMethodConfig.md +2 -2
- data/docs/RevokeSession.md +17 -0
- data/docs/Session.md +6 -4
- data/docs/SettingsFlow.md +35 -0
- data/docs/SettingsFlowMethod.md +19 -0
- data/docs/SettingsFlowMethodConfig.md +23 -0
- data/docs/SettingsRequest.md +4 -2
- data/docs/SettingsViaApiResponse.md +19 -0
- data/docs/UpdateIdentity.md +19 -0
- data/docs/VerifiableAddress.md +3 -3
- data/docs/VerificationFlow.md +33 -0
- data/docs/VerificationFlowMethod.md +19 -0
- data/docs/VerificationFlowMethodConfig.md +23 -0
- data/docs/VerificationRequest.md +2 -0
- data/lib/ory-kratos-client.rb +31 -17
- data/lib/ory-kratos-client/api/admin_api.rb +321 -130
- data/lib/ory-kratos-client/api/common_api.rb +73 -10
- data/lib/ory-kratos-client/api/health_api.rb +2 -2
- data/lib/ory-kratos-client/api/public_api.rb +830 -236
- data/lib/ory-kratos-client/api/version_api.rb +2 -2
- data/lib/ory-kratos-client/api_client.rb +10 -7
- data/lib/ory-kratos-client/api_error.rb +2 -2
- data/lib/ory-kratos-client/configuration.rb +9 -2
- data/lib/ory-kratos-client/models/complete_self_service_browser_settings_strategy_profile_flow_payload.rb +2 -2
- data/lib/ory-kratos-client/models/complete_self_service_login_flow_with_password_method.rb +227 -0
- data/lib/ory-kratos-client/models/complete_self_service_recovery_flow_with_link_method.rb +217 -0
- data/lib/ory-kratos-client/models/complete_self_service_settings_flow_with_password_method.rb +222 -0
- data/lib/ory-kratos-client/models/complete_self_service_verification_flow_with_link_method.rb +217 -0
- data/lib/ory-kratos-client/models/create_identity.rb +227 -0
- data/lib/ory-kratos-client/models/create_recovery_link.rb +238 -0
- data/lib/ory-kratos-client/models/error_container.rb +13 -2
- data/lib/ory-kratos-client/models/form.rb +14 -15
- data/lib/ory-kratos-client/models/form_field.rb +11 -11
- data/lib/ory-kratos-client/models/generic_error.rb +2 -2
- data/lib/ory-kratos-client/models/generic_error_payload.rb +4 -6
- data/lib/ory-kratos-client/models/health_not_ready_status.rb +2 -2
- data/lib/ory-kratos-client/models/health_status.rb +2 -2
- data/lib/ory-kratos-client/models/identity.rb +53 -35
- data/lib/ory-kratos-client/models/login_flow.rb +315 -0
- data/lib/ory-kratos-client/models/login_flow_method.rb +226 -0
- data/lib/ory-kratos-client/models/login_flow_method_config.rb +267 -0
- data/lib/ory-kratos-client/models/login_request.rb +14 -3
- data/lib/ory-kratos-client/models/login_request_method.rb +2 -2
- data/lib/ory-kratos-client/models/login_request_method_config.rb +14 -15
- data/lib/ory-kratos-client/models/login_via_api_response.rb +227 -0
- data/lib/ory-kratos-client/models/message.rb +234 -0
- data/lib/ory-kratos-client/models/provider_credentials_config.rb +2 -2
- data/lib/ory-kratos-client/models/recovery_address.rb +239 -0
- data/lib/ory-kratos-client/models/recovery_flow.rb +319 -0
- data/lib/ory-kratos-client/models/recovery_flow_method.rb +226 -0
- data/lib/ory-kratos-client/models/recovery_flow_method_config.rb +255 -0
- data/lib/ory-kratos-client/models/recovery_link.rb +222 -0
- data/lib/ory-kratos-client/models/recovery_request.rb +309 -0
- data/lib/ory-kratos-client/models/recovery_request_method.rb +216 -0
- data/lib/ory-kratos-client/models/registration_flow.rb +304 -0
- data/lib/ory-kratos-client/models/registration_flow_method.rb +226 -0
- data/lib/ory-kratos-client/models/registration_flow_method_config.rb +267 -0
- data/lib/ory-kratos-client/models/registration_request.rb +14 -3
- data/lib/ory-kratos-client/models/registration_request_method.rb +2 -2
- data/lib/ory-kratos-client/models/registration_request_method_config.rb +14 -15
- data/lib/ory-kratos-client/models/registration_via_api_response.rb +236 -0
- data/lib/ory-kratos-client/models/request_method_config.rb +14 -15
- data/lib/ory-kratos-client/models/revoke_session.rb +212 -0
- data/lib/ory-kratos-client/models/session.rb +29 -20
- data/lib/ory-kratos-client/models/settings_flow.rb +333 -0
- data/lib/ory-kratos-client/models/settings_flow_method.rb +226 -0
- data/lib/ory-kratos-client/models/settings_flow_method_config.rb +255 -0
- data/lib/ory-kratos-client/models/settings_request.rb +23 -13
- data/lib/ory-kratos-client/models/settings_request_method.rb +2 -2
- data/lib/ory-kratos-client/models/settings_via_api_response.rb +226 -0
- data/lib/ory-kratos-client/models/update_identity.rb +222 -0
- data/lib/ory-kratos-client/models/verifiable_address.rb +17 -17
- data/lib/ory-kratos-client/models/verification_flow.rb +299 -0
- data/lib/ory-kratos-client/models/verification_flow_method.rb +226 -0
- data/lib/ory-kratos-client/models/verification_flow_method_config.rb +255 -0
- data/lib/ory-kratos-client/models/verification_request.rb +14 -3
- data/lib/ory-kratos-client/models/version.rb +2 -2
- data/lib/ory-kratos-client/version.rb +3 -3
- data/ory-kratos-client.gemspec +2 -2
- data/spec/models/complete_self_service_login_flow_with_password_method_spec.rb +53 -0
- data/spec/models/complete_self_service_recovery_flow_with_link_method_spec.rb +47 -0
- data/spec/models/complete_self_service_settings_flow_with_password_method_spec.rb +47 -0
- data/spec/models/complete_self_service_verification_flow_with_link_method_spec.rb +47 -0
- data/spec/models/create_identity_spec.rb +47 -0
- data/spec/models/create_recovery_link_spec.rb +47 -0
- data/spec/models/login_flow_method_config_spec.rb +65 -0
- data/spec/models/login_flow_method_spec.rb +47 -0
- data/spec/models/login_flow_spec.rb +89 -0
- data/spec/models/login_via_api_response_spec.rb +47 -0
- data/spec/models/message_spec.rb +59 -0
- data/spec/models/recovery_address_spec.rb +53 -0
- data/spec/models/recovery_flow_method_config_spec.rb +59 -0
- data/spec/models/recovery_flow_method_spec.rb +47 -0
- data/spec/models/recovery_flow_spec.rb +89 -0
- data/spec/models/recovery_link_spec.rb +47 -0
- data/spec/models/recovery_request_method_spec.rb +47 -0
- data/spec/models/recovery_request_spec.rb +83 -0
- data/spec/models/registration_flow_method_config_spec.rb +65 -0
- data/spec/models/registration_flow_method_spec.rb +47 -0
- data/spec/models/registration_flow_spec.rb +83 -0
- data/spec/models/registration_via_api_response_spec.rb +53 -0
- data/spec/models/revoke_session_spec.rb +41 -0
- data/spec/models/settings_flow_method_config_spec.rb +59 -0
- data/spec/models/settings_flow_method_spec.rb +47 -0
- data/spec/models/settings_flow_spec.rb +95 -0
- data/spec/models/settings_via_api_response_spec.rb +47 -0
- data/spec/models/update_identity_spec.rb +47 -0
- data/spec/models/verification_flow_method_config_spec.rb +59 -0
- data/spec/models/verification_flow_method_spec.rb +47 -0
- data/spec/models/verification_flow_spec.rb +89 -0
- metadata +147 -23
data/docs/Message.md
ADDED
@@ -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
|
+
|
data/docs/PublicApi.md
CHANGED
@@ -4,23 +4,33 @@ All URIs are relative to *http://localhost*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
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
|
8
|
-
[**
|
9
|
-
[**
|
10
|
-
[**
|
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
|
11
14
|
[**get_schema**](PublicApi.md#get_schema) | **GET** /schemas/{id} |
|
12
|
-
[**
|
13
|
-
[**
|
14
|
-
[**
|
15
|
-
[**
|
16
|
-
[**
|
17
|
-
[**
|
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
|
18
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
|
19
|
-
[**
|
20
|
-
[**
|
21
|
-
[**
|
22
|
-
[**
|
23
|
-
[**
|
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
|
24
34
|
|
25
35
|
|
26
36
|
|
@@ -28,7 +38,7 @@ Method | HTTP request | Description
|
|
28
38
|
|
29
39
|
> complete_self_service_browser_settings_oidc_settings_flow
|
30
40
|
|
31
|
-
Complete the
|
41
|
+
Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
|
32
42
|
|
33
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).
|
34
44
|
|
@@ -41,7 +51,7 @@ require 'ory-kratos-client'
|
|
41
51
|
api_instance = OryHydraClient::PublicApi.new
|
42
52
|
|
43
53
|
begin
|
44
|
-
#Complete the
|
54
|
+
#Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
|
45
55
|
api_instance.complete_self_service_browser_settings_oidc_settings_flow
|
46
56
|
rescue OryHydraClient::ApiError => e
|
47
57
|
puts "Exception when calling PublicApi->complete_self_service_browser_settings_oidc_settings_flow: #{e}"
|
@@ -66,13 +76,13 @@ No authorization required
|
|
66
76
|
- **Accept**: application/json
|
67
77
|
|
68
78
|
|
69
|
-
##
|
79
|
+
## complete_self_service_login_flow_with_password_method
|
70
80
|
|
71
|
-
>
|
81
|
+
> LoginViaApiResponse complete_self_service_login_flow_with_password_method(flow, opts)
|
72
82
|
|
73
|
-
Complete
|
83
|
+
Complete Login Flow with Username/Email Password Method
|
74
84
|
|
75
|
-
|
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).
|
76
86
|
|
77
87
|
### Example
|
78
88
|
|
@@ -81,22 +91,31 @@ This endpoint completes a browser-based settings flow. This is usually achieved
|
|
81
91
|
require 'ory-kratos-client'
|
82
92
|
|
83
93
|
api_instance = OryHydraClient::PublicApi.new
|
94
|
+
flow = 'flow_example' # String | The Flow ID
|
95
|
+
opts = {
|
96
|
+
body: OryHydraClient::CompleteSelfServiceLoginFlowWithPasswordMethod.new # CompleteSelfServiceLoginFlowWithPasswordMethod |
|
97
|
+
}
|
84
98
|
|
85
99
|
begin
|
86
|
-
#Complete
|
87
|
-
api_instance.
|
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
|
88
103
|
rescue OryHydraClient::ApiError => e
|
89
|
-
puts "Exception when calling PublicApi->
|
104
|
+
puts "Exception when calling PublicApi->complete_self_service_login_flow_with_password_method: #{e}"
|
90
105
|
end
|
91
106
|
```
|
92
107
|
|
93
108
|
### Parameters
|
94
109
|
|
95
|
-
|
110
|
+
|
111
|
+
Name | Type | Description | Notes
|
112
|
+
------------- | ------------- | ------------- | -------------
|
113
|
+
**flow** | **String**| The Flow ID |
|
114
|
+
**body** | [**CompleteSelfServiceLoginFlowWithPasswordMethod**](CompleteSelfServiceLoginFlowWithPasswordMethod.md)| | [optional]
|
96
115
|
|
97
116
|
### Return type
|
98
117
|
|
99
|
-
|
118
|
+
[**LoginViaApiResponse**](LoginViaApiResponse.md)
|
100
119
|
|
101
120
|
### Authorization
|
102
121
|
|
@@ -104,17 +123,17 @@ No authorization required
|
|
104
123
|
|
105
124
|
### HTTP request headers
|
106
125
|
|
107
|
-
- **Content-Type**:
|
126
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
108
127
|
- **Accept**: application/json
|
109
128
|
|
110
129
|
|
111
|
-
##
|
130
|
+
## complete_self_service_recovery_flow_with_link_method
|
112
131
|
|
113
|
-
>
|
132
|
+
> complete_self_service_recovery_flow_with_link_method(opts)
|
114
133
|
|
115
|
-
Complete
|
134
|
+
Complete Recovery Flow with Link Method
|
116
135
|
|
117
|
-
|
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).
|
118
137
|
|
119
138
|
### Example
|
120
139
|
|
@@ -123,14 +142,17 @@ This endpoint completes a browser-based settings flow. This is usually achieved
|
|
123
142
|
require 'ory-kratos-client'
|
124
143
|
|
125
144
|
api_instance = OryHydraClient::PublicApi.new
|
126
|
-
|
127
|
-
|
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
|
+
}
|
128
150
|
|
129
151
|
begin
|
130
|
-
#Complete
|
131
|
-
api_instance.
|
152
|
+
#Complete Recovery Flow with Link Method
|
153
|
+
api_instance.complete_self_service_recovery_flow_with_link_method(opts)
|
132
154
|
rescue OryHydraClient::ApiError => e
|
133
|
-
puts "Exception when calling PublicApi->
|
155
|
+
puts "Exception when calling PublicApi->complete_self_service_recovery_flow_with_link_method: #{e}"
|
134
156
|
end
|
135
157
|
```
|
136
158
|
|
@@ -139,8 +161,9 @@ end
|
|
139
161
|
|
140
162
|
Name | Type | Description | Notes
|
141
163
|
------------- | ------------- | ------------- | -------------
|
142
|
-
**
|
143
|
-
**
|
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]
|
144
167
|
|
145
168
|
### Return type
|
146
169
|
|
@@ -156,13 +179,13 @@ No authorization required
|
|
156
179
|
- **Accept**: application/json
|
157
180
|
|
158
181
|
|
159
|
-
##
|
182
|
+
## complete_self_service_registration_flow_with_password_method
|
160
183
|
|
161
|
-
>
|
184
|
+
> RegistrationViaApiResponse complete_self_service_registration_flow_with_password_method(opts)
|
162
185
|
|
163
|
-
Complete
|
186
|
+
Complete Registration Flow with Username/Email Password Method
|
164
187
|
|
165
|
-
|
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).
|
166
189
|
|
167
190
|
### Example
|
168
191
|
|
@@ -171,14 +194,17 @@ This endpoint completes a browser-based verification flow. This is usually achie
|
|
171
194
|
require 'ory-kratos-client'
|
172
195
|
|
173
196
|
api_instance = OryHydraClient::PublicApi.new
|
174
|
-
|
175
|
-
|
197
|
+
opts = {
|
198
|
+
flow: 'flow_example', # String | Flow is flow ID.
|
199
|
+
payload: nil # Object |
|
200
|
+
}
|
176
201
|
|
177
202
|
begin
|
178
|
-
#Complete
|
179
|
-
api_instance.
|
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
|
180
206
|
rescue OryHydraClient::ApiError => e
|
181
|
-
puts "Exception when calling PublicApi->
|
207
|
+
puts "Exception when calling PublicApi->complete_self_service_registration_flow_with_password_method: #{e}"
|
182
208
|
end
|
183
209
|
```
|
184
210
|
|
@@ -187,8 +213,176 @@ end
|
|
187
213
|
|
188
214
|
Name | Type | Description | Notes
|
189
215
|
------------- | ------------- | ------------- | -------------
|
190
|
-
**
|
191
|
-
**
|
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
|
234
|
+
|
235
|
+
> SettingsViaApiResponse complete_self_service_settings_flow_with_password_method(opts)
|
236
|
+
|
237
|
+
Complete Settings Flow with Username/Email Password Method
|
238
|
+
|
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).
|
240
|
+
|
241
|
+
### Example
|
242
|
+
|
243
|
+
```ruby
|
244
|
+
# load the gem
|
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
|
253
|
+
|
254
|
+
api_instance = OryHydraClient::PublicApi.new
|
255
|
+
opts = {
|
256
|
+
flow: 'flow_example', # String | Flow is flow ID.
|
257
|
+
body: OryHydraClient::CompleteSelfServiceSettingsFlowWithPasswordMethod.new # CompleteSelfServiceSettingsFlowWithPasswordMethod |
|
258
|
+
}
|
259
|
+
|
260
|
+
begin
|
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
|
264
|
+
rescue OryHydraClient::ApiError => e
|
265
|
+
puts "Exception when calling PublicApi->complete_self_service_settings_flow_with_password_method: #{e}"
|
266
|
+
end
|
267
|
+
```
|
268
|
+
|
269
|
+
### Parameters
|
270
|
+
|
271
|
+
|
272
|
+
Name | Type | Description | Notes
|
273
|
+
------------- | ------------- | ------------- | -------------
|
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]
|
192
386
|
|
193
387
|
### Return type
|
194
388
|
|
@@ -200,7 +394,7 @@ No authorization required
|
|
200
394
|
|
201
395
|
### HTTP request headers
|
202
396
|
|
203
|
-
- **Content-Type**:
|
397
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
204
398
|
- **Accept**: application/json
|
205
399
|
|
206
400
|
|
@@ -210,7 +404,7 @@ No authorization required
|
|
210
404
|
|
211
405
|
|
212
406
|
|
213
|
-
Get a
|
407
|
+
Get a Traits Schema Definition
|
214
408
|
|
215
409
|
### Example
|
216
410
|
|
@@ -250,13 +444,13 @@ No authorization required
|
|
250
444
|
- **Accept**: application/json
|
251
445
|
|
252
446
|
|
253
|
-
##
|
447
|
+
## get_self_service_error
|
254
448
|
|
255
|
-
>
|
449
|
+
> ErrorContainer get_self_service_error(error)
|
256
450
|
|
257
|
-
Get
|
451
|
+
Get User-Facing Self-Service Errors
|
258
452
|
|
259
|
-
This endpoint returns
|
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).
|
260
454
|
|
261
455
|
### Example
|
262
456
|
|
@@ -265,14 +459,14 @@ This endpoint returns a login request's context with, for example, error details
|
|
265
459
|
require 'ory-kratos-client'
|
266
460
|
|
267
461
|
api_instance = OryHydraClient::PublicApi.new
|
268
|
-
|
462
|
+
error = 'error_example' # String | Error is the container's ID
|
269
463
|
|
270
464
|
begin
|
271
|
-
#Get
|
272
|
-
result = api_instance.
|
465
|
+
#Get User-Facing Self-Service Errors
|
466
|
+
result = api_instance.get_self_service_error(error)
|
273
467
|
p result
|
274
468
|
rescue OryHydraClient::ApiError => e
|
275
|
-
puts "Exception when calling PublicApi->
|
469
|
+
puts "Exception when calling PublicApi->get_self_service_error: #{e}"
|
276
470
|
end
|
277
471
|
```
|
278
472
|
|
@@ -281,11 +475,11 @@ end
|
|
281
475
|
|
282
476
|
Name | Type | Description | Notes
|
283
477
|
------------- | ------------- | ------------- | -------------
|
284
|
-
**
|
478
|
+
**error** | **String**| Error is the container's ID |
|
285
479
|
|
286
480
|
### Return type
|
287
481
|
|
288
|
-
[**
|
482
|
+
[**ErrorContainer**](ErrorContainer.md)
|
289
483
|
|
290
484
|
### Authorization
|
291
485
|
|
@@ -297,13 +491,13 @@ No authorization required
|
|
297
491
|
- **Accept**: application/json
|
298
492
|
|
299
493
|
|
300
|
-
##
|
494
|
+
## get_self_service_login_flow
|
301
495
|
|
302
|
-
>
|
496
|
+
> LoginFlow get_self_service_login_flow(id)
|
303
497
|
|
304
|
-
Get
|
498
|
+
Get Login Flow
|
305
499
|
|
306
|
-
This endpoint returns a
|
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).
|
307
501
|
|
308
502
|
### Example
|
309
503
|
|
@@ -312,14 +506,14 @@ This endpoint returns a registration request's context with, for example, error
|
|
312
506
|
require 'ory-kratos-client'
|
313
507
|
|
314
508
|
api_instance = OryHydraClient::PublicApi.new
|
315
|
-
|
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`).
|
316
510
|
|
317
511
|
begin
|
318
|
-
#Get
|
319
|
-
result = api_instance.
|
512
|
+
#Get Login Flow
|
513
|
+
result = api_instance.get_self_service_login_flow(id)
|
320
514
|
p result
|
321
515
|
rescue OryHydraClient::ApiError => e
|
322
|
-
puts "Exception when calling PublicApi->
|
516
|
+
puts "Exception when calling PublicApi->get_self_service_login_flow: #{e}"
|
323
517
|
end
|
324
518
|
```
|
325
519
|
|
@@ -328,11 +522,11 @@ end
|
|
328
522
|
|
329
523
|
Name | Type | Description | Notes
|
330
524
|
------------- | ------------- | ------------- | -------------
|
331
|
-
**
|
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`). |
|
332
526
|
|
333
527
|
### Return type
|
334
528
|
|
335
|
-
[**
|
529
|
+
[**LoginFlow**](LoginFlow.md)
|
336
530
|
|
337
531
|
### Authorization
|
338
532
|
|
@@ -344,13 +538,13 @@ No authorization required
|
|
344
538
|
- **Accept**: application/json
|
345
539
|
|
346
540
|
|
347
|
-
##
|
541
|
+
## get_self_service_recovery_flow
|
348
542
|
|
349
|
-
>
|
543
|
+
> RecoveryFlow get_self_service_recovery_flow(id)
|
350
544
|
|
351
|
-
Get
|
545
|
+
Get information about a recovery flow
|
352
546
|
|
353
|
-
|
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).
|
354
548
|
|
355
549
|
### Example
|
356
550
|
|
@@ -359,14 +553,14 @@ When accessing this endpoint through ORY Kratos' Public API, ensure that cookies
|
|
359
553
|
require 'ory-kratos-client'
|
360
554
|
|
361
555
|
api_instance = OryHydraClient::PublicApi.new
|
362
|
-
|
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`).
|
363
557
|
|
364
558
|
begin
|
365
|
-
#Get
|
366
|
-
result = api_instance.
|
559
|
+
#Get information about a recovery flow
|
560
|
+
result = api_instance.get_self_service_recovery_flow(id)
|
367
561
|
p result
|
368
562
|
rescue OryHydraClient::ApiError => e
|
369
|
-
puts "Exception when calling PublicApi->
|
563
|
+
puts "Exception when calling PublicApi->get_self_service_recovery_flow: #{e}"
|
370
564
|
end
|
371
565
|
```
|
372
566
|
|
@@ -375,11 +569,11 @@ end
|
|
375
569
|
|
376
570
|
Name | Type | Description | Notes
|
377
571
|
------------- | ------------- | ------------- | -------------
|
378
|
-
**
|
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`). |
|
379
573
|
|
380
574
|
### Return type
|
381
575
|
|
382
|
-
[**
|
576
|
+
[**RecoveryFlow**](RecoveryFlow.md)
|
383
577
|
|
384
578
|
### Authorization
|
385
579
|
|
@@ -391,13 +585,13 @@ No authorization required
|
|
391
585
|
- **Accept**: application/json
|
392
586
|
|
393
587
|
|
394
|
-
##
|
588
|
+
## get_self_service_registration_flow
|
395
589
|
|
396
|
-
>
|
590
|
+
> RegistrationFlow get_self_service_registration_flow(id)
|
397
591
|
|
398
|
-
Get
|
592
|
+
Get Registration Flow
|
399
593
|
|
400
|
-
This endpoint returns
|
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).
|
401
595
|
|
402
596
|
### Example
|
403
597
|
|
@@ -406,16 +600,14 @@ This endpoint returns the error associated with a user-facing self service error
|
|
406
600
|
require 'ory-kratos-client'
|
407
601
|
|
408
602
|
api_instance = OryHydraClient::PublicApi.new
|
409
|
-
|
410
|
-
error: 'error_example' # String |
|
411
|
-
}
|
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`).
|
412
604
|
|
413
605
|
begin
|
414
|
-
#Get
|
415
|
-
result = api_instance.
|
606
|
+
#Get Registration Flow
|
607
|
+
result = api_instance.get_self_service_registration_flow(id)
|
416
608
|
p result
|
417
609
|
rescue OryHydraClient::ApiError => e
|
418
|
-
puts "Exception when calling PublicApi->
|
610
|
+
puts "Exception when calling PublicApi->get_self_service_registration_flow: #{e}"
|
419
611
|
end
|
420
612
|
```
|
421
613
|
|
@@ -424,11 +616,11 @@ end
|
|
424
616
|
|
425
617
|
Name | Type | Description | Notes
|
426
618
|
------------- | ------------- | ------------- | -------------
|
427
|
-
**
|
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`). |
|
428
620
|
|
429
621
|
### Return type
|
430
622
|
|
431
|
-
[**
|
623
|
+
[**RegistrationFlow**](RegistrationFlow.md)
|
432
624
|
|
433
625
|
### Authorization
|
434
626
|
|
@@ -440,29 +632,36 @@ No authorization required
|
|
440
632
|
- **Accept**: application/json
|
441
633
|
|
442
634
|
|
443
|
-
##
|
635
|
+
## get_self_service_settings_flow
|
444
636
|
|
445
|
-
>
|
637
|
+
> SettingsFlow get_self_service_settings_flow(id)
|
446
638
|
|
447
|
-
Get
|
639
|
+
Get Settings Flow
|
448
640
|
|
449
|
-
When accessing this endpoint through ORY Kratos' Public API
|
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).
|
450
642
|
|
451
643
|
### Example
|
452
644
|
|
453
645
|
```ruby
|
454
646
|
# load the gem
|
455
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
|
456
655
|
|
457
656
|
api_instance = OryHydraClient::PublicApi.new
|
458
|
-
|
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`).
|
459
658
|
|
460
659
|
begin
|
461
|
-
#Get
|
462
|
-
result = api_instance.
|
660
|
+
#Get Settings Flow
|
661
|
+
result = api_instance.get_self_service_settings_flow(id)
|
463
662
|
p result
|
464
663
|
rescue OryHydraClient::ApiError => e
|
465
|
-
puts "Exception when calling PublicApi->
|
664
|
+
puts "Exception when calling PublicApi->get_self_service_settings_flow: #{e}"
|
466
665
|
end
|
467
666
|
```
|
468
667
|
|
@@ -471,15 +670,15 @@ end
|
|
471
670
|
|
472
671
|
Name | Type | Description | Notes
|
473
672
|
------------- | ------------- | ------------- | -------------
|
474
|
-
**
|
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`). |
|
475
674
|
|
476
675
|
### Return type
|
477
676
|
|
478
|
-
[**
|
677
|
+
[**SettingsFlow**](SettingsFlow.md)
|
479
678
|
|
480
679
|
### Authorization
|
481
680
|
|
482
|
-
|
681
|
+
[sessionToken](../README.md#sessionToken)
|
483
682
|
|
484
683
|
### HTTP request headers
|
485
684
|
|
@@ -487,13 +686,13 @@ No authorization required
|
|
487
686
|
- **Accept**: application/json
|
488
687
|
|
489
688
|
|
490
|
-
##
|
689
|
+
## get_self_service_verification_flow
|
491
690
|
|
492
|
-
>
|
691
|
+
> VerificationFlow get_self_service_verification_flow(id)
|
493
692
|
|
494
|
-
|
693
|
+
Get Verification Flow
|
495
694
|
|
496
|
-
This endpoint
|
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).
|
497
696
|
|
498
697
|
### Example
|
499
698
|
|
@@ -502,22 +701,27 @@ This endpoint initializes a browser-based user login flow. Once initialized, the
|
|
502
701
|
require 'ory-kratos-client'
|
503
702
|
|
504
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`).
|
505
705
|
|
506
706
|
begin
|
507
|
-
#
|
508
|
-
api_instance.
|
707
|
+
#Get Verification Flow
|
708
|
+
result = api_instance.get_self_service_verification_flow(id)
|
709
|
+
p result
|
509
710
|
rescue OryHydraClient::ApiError => e
|
510
|
-
puts "Exception when calling PublicApi->
|
711
|
+
puts "Exception when calling PublicApi->get_self_service_verification_flow: #{e}"
|
511
712
|
end
|
512
713
|
```
|
513
714
|
|
514
715
|
### Parameters
|
515
716
|
|
516
|
-
|
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`). |
|
517
721
|
|
518
722
|
### Return type
|
519
723
|
|
520
|
-
|
724
|
+
[**VerificationFlow**](VerificationFlow.md)
|
521
725
|
|
522
726
|
### Authorization
|
523
727
|
|
@@ -571,13 +775,62 @@ No authorization required
|
|
571
775
|
- **Accept**: application/json
|
572
776
|
|
573
777
|
|
574
|
-
##
|
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
|
575
828
|
|
576
|
-
>
|
829
|
+
> initialize_self_service_login_via_browser_flow
|
577
830
|
|
578
|
-
Initialize
|
831
|
+
Initialize Login Flow for browsers
|
579
832
|
|
580
|
-
This endpoint initializes a browser-based user
|
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).
|
581
834
|
|
582
835
|
### Example
|
583
836
|
|
@@ -588,10 +841,10 @@ require 'ory-kratos-client'
|
|
588
841
|
api_instance = OryHydraClient::PublicApi.new
|
589
842
|
|
590
843
|
begin
|
591
|
-
#Initialize
|
592
|
-
api_instance.
|
844
|
+
#Initialize Login Flow for browsers
|
845
|
+
api_instance.initialize_self_service_login_via_browser_flow
|
593
846
|
rescue OryHydraClient::ApiError => e
|
594
|
-
puts "Exception when calling PublicApi->
|
847
|
+
puts "Exception when calling PublicApi->initialize_self_service_login_via_browser_flow: #{e}"
|
595
848
|
end
|
596
849
|
```
|
597
850
|
|
@@ -613,13 +866,13 @@ No authorization required
|
|
613
866
|
- **Accept**: application/json
|
614
867
|
|
615
868
|
|
616
|
-
##
|
869
|
+
## initialize_self_service_recovery_via_api_flow
|
617
870
|
|
618
|
-
>
|
871
|
+
> RecoveryFlow initialize_self_service_recovery_via_api_flow
|
619
872
|
|
620
|
-
Initialize
|
873
|
+
Initialize Recovery Flow for API Clients
|
621
874
|
|
622
|
-
This endpoint
|
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).
|
623
876
|
|
624
877
|
### Example
|
625
878
|
|
@@ -628,22 +881,61 @@ This endpoint initializes a browser-based verification flow. Once initialized, t
|
|
628
881
|
require 'ory-kratos-client'
|
629
882
|
|
630
883
|
api_instance = OryHydraClient::PublicApi.new
|
631
|
-
via = 'via_example' # String | What to verify Currently only \"email\" is supported.
|
632
884
|
|
633
885
|
begin
|
634
|
-
#Initialize
|
635
|
-
api_instance.
|
886
|
+
#Initialize Recovery Flow for API Clients
|
887
|
+
result = api_instance.initialize_self_service_recovery_via_api_flow
|
888
|
+
p result
|
636
889
|
rescue OryHydraClient::ApiError => e
|
637
|
-
puts "Exception when calling PublicApi->
|
890
|
+
puts "Exception when calling PublicApi->initialize_self_service_recovery_via_api_flow: #{e}"
|
638
891
|
end
|
639
892
|
```
|
640
893
|
|
641
894
|
### Parameters
|
642
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
|
643
910
|
|
644
|
-
|
645
|
-
|
646
|
-
|
911
|
+
|
912
|
+
## initialize_self_service_recovery_via_browser_flow
|
913
|
+
|
914
|
+
> initialize_self_service_recovery_via_browser_flow
|
915
|
+
|
916
|
+
Initialize Recovery Flow for Browser Clients
|
917
|
+
|
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).
|
919
|
+
|
920
|
+
### Example
|
921
|
+
|
922
|
+
```ruby
|
923
|
+
# load the gem
|
924
|
+
require 'ory-kratos-client'
|
925
|
+
|
926
|
+
api_instance = OryHydraClient::PublicApi.new
|
927
|
+
|
928
|
+
begin
|
929
|
+
#Initialize Recovery Flow for Browser Clients
|
930
|
+
api_instance.initialize_self_service_recovery_via_browser_flow
|
931
|
+
rescue OryHydraClient::ApiError => e
|
932
|
+
puts "Exception when calling PublicApi->initialize_self_service_recovery_via_browser_flow: #{e}"
|
933
|
+
end
|
934
|
+
```
|
935
|
+
|
936
|
+
### Parameters
|
937
|
+
|
938
|
+
This endpoint does not need any parameter.
|
647
939
|
|
648
940
|
### Return type
|
649
941
|
|
@@ -659,13 +951,13 @@ No authorization required
|
|
659
951
|
- **Accept**: application/json
|
660
952
|
|
661
953
|
|
662
|
-
##
|
954
|
+
## initialize_self_service_registration_via_api_flow
|
663
955
|
|
664
|
-
>
|
956
|
+
> RegistrationFlow initialize_self_service_registration_via_api_flow
|
665
957
|
|
666
|
-
Initialize
|
958
|
+
Initialize Registration Flow for API clients
|
667
959
|
|
668
|
-
This endpoint
|
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).
|
669
961
|
|
670
962
|
### Example
|
671
963
|
|
@@ -676,10 +968,53 @@ require 'ory-kratos-client'
|
|
676
968
|
api_instance = OryHydraClient::PublicApi.new
|
677
969
|
|
678
970
|
begin
|
679
|
-
#Initialize
|
680
|
-
api_instance.
|
971
|
+
#Initialize Registration Flow for API clients
|
972
|
+
result = api_instance.initialize_self_service_registration_via_api_flow
|
973
|
+
p result
|
681
974
|
rescue OryHydraClient::ApiError => e
|
682
|
-
puts "Exception when calling PublicApi->
|
975
|
+
puts "Exception when calling PublicApi->initialize_self_service_registration_via_api_flow: #{e}"
|
976
|
+
end
|
977
|
+
```
|
978
|
+
|
979
|
+
### Parameters
|
980
|
+
|
981
|
+
This endpoint does not need any parameter.
|
982
|
+
|
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}"
|
683
1018
|
end
|
684
1019
|
```
|
685
1020
|
|
@@ -701,29 +1036,212 @@ No authorization required
|
|
701
1036
|
- **Accept**: application/json
|
702
1037
|
|
703
1038
|
|
704
|
-
##
|
1039
|
+
## initialize_self_service_settings_via_api_flow
|
705
1040
|
|
706
|
-
>
|
1041
|
+
> SettingsFlow initialize_self_service_settings_via_api_flow
|
707
1042
|
|
708
|
-
|
1043
|
+
Initialize Settings Flow for API Clients
|
709
1044
|
|
710
|
-
This endpoint
|
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).
|
711
1046
|
|
712
1047
|
### Example
|
713
1048
|
|
714
1049
|
```ruby
|
715
1050
|
# load the gem
|
716
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
|
717
1059
|
|
718
1060
|
api_instance = OryHydraClient::PublicApi.new
|
719
|
-
code = 'code_example' # String |
|
720
|
-
via = 'via_example' # String | What to verify Currently only \"email\" is supported.
|
721
1061
|
|
722
1062
|
begin
|
723
|
-
#
|
724
|
-
api_instance.
|
1063
|
+
#Initialize Settings Flow for API Clients
|
1064
|
+
result = api_instance.initialize_self_service_settings_via_api_flow
|
1065
|
+
p result
|
725
1066
|
rescue OryHydraClient::ApiError => e
|
726
|
-
puts "Exception when calling PublicApi->
|
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}"
|
1202
|
+
end
|
1203
|
+
```
|
1204
|
+
|
1205
|
+
### Parameters
|
1206
|
+
|
1207
|
+
This endpoint does not need any parameter.
|
1208
|
+
|
1209
|
+
### Return type
|
1210
|
+
|
1211
|
+
nil (empty response body)
|
1212
|
+
|
1213
|
+
### Authorization
|
1214
|
+
|
1215
|
+
No authorization required
|
1216
|
+
|
1217
|
+
### HTTP request headers
|
1218
|
+
|
1219
|
+
- **Content-Type**: Not defined
|
1220
|
+
- **Accept**: application/json
|
1221
|
+
|
1222
|
+
|
1223
|
+
## revoke_session
|
1224
|
+
|
1225
|
+
> revoke_session(body)
|
1226
|
+
|
1227
|
+
Revoke and Invalidate a Session
|
1228
|
+
|
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.
|
1230
|
+
|
1231
|
+
### Example
|
1232
|
+
|
1233
|
+
```ruby
|
1234
|
+
# load the gem
|
1235
|
+
require 'ory-kratos-client'
|
1236
|
+
|
1237
|
+
api_instance = OryHydraClient::PublicApi.new
|
1238
|
+
body = OryHydraClient::RevokeSession.new # RevokeSession |
|
1239
|
+
|
1240
|
+
begin
|
1241
|
+
#Revoke and Invalidate a Session
|
1242
|
+
api_instance.revoke_session(body)
|
1243
|
+
rescue OryHydraClient::ApiError => e
|
1244
|
+
puts "Exception when calling PublicApi->revoke_session: #{e}"
|
727
1245
|
end
|
728
1246
|
```
|
729
1247
|
|
@@ -732,8 +1250,7 @@ end
|
|
732
1250
|
|
733
1251
|
Name | Type | Description | Notes
|
734
1252
|
------------- | ------------- | ------------- | -------------
|
735
|
-
**
|
736
|
-
**via** | **String**| What to verify Currently only \"email\" is supported. |
|
1253
|
+
**body** | [**RevokeSession**](RevokeSession.md)| |
|
737
1254
|
|
738
1255
|
### Return type
|
739
1256
|
|
@@ -745,29 +1262,40 @@ No authorization required
|
|
745
1262
|
|
746
1263
|
### HTTP request headers
|
747
1264
|
|
748
|
-
- **Content-Type**:
|
1265
|
+
- **Content-Type**: application/json
|
749
1266
|
- **Accept**: application/json
|
750
1267
|
|
751
1268
|
|
752
1269
|
## whoami
|
753
1270
|
|
754
|
-
> Session whoami
|
1271
|
+
> Session whoami(opts)
|
755
1272
|
|
756
|
-
Check
|
1273
|
+
Check Who the Current HTTP Session Belongs To
|
757
1274
|
|
758
|
-
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.
|
759
1276
|
|
760
1277
|
### Example
|
761
1278
|
|
762
1279
|
```ruby
|
763
1280
|
# load the gem
|
764
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
|
765
1289
|
|
766
1290
|
api_instance = OryHydraClient::PublicApi.new
|
1291
|
+
opts = {
|
1292
|
+
cookie: 'cookie_example', # String |
|
1293
|
+
authorization: 'authorization_example' # String | in: authorization
|
1294
|
+
}
|
767
1295
|
|
768
1296
|
begin
|
769
|
-
#Check
|
770
|
-
result = api_instance.whoami
|
1297
|
+
#Check Who the Current HTTP Session Belongs To
|
1298
|
+
result = api_instance.whoami(opts)
|
771
1299
|
p result
|
772
1300
|
rescue OryHydraClient::ApiError => e
|
773
1301
|
puts "Exception when calling PublicApi->whoami: #{e}"
|
@@ -776,7 +1304,11 @@ end
|
|
776
1304
|
|
777
1305
|
### Parameters
|
778
1306
|
|
779
|
-
|
1307
|
+
|
1308
|
+
Name | Type | Description | Notes
|
1309
|
+
------------- | ------------- | ------------- | -------------
|
1310
|
+
**cookie** | **String**| | [optional]
|
1311
|
+
**authorization** | **String**| in: authorization | [optional]
|
780
1312
|
|
781
1313
|
### Return type
|
782
1314
|
|
@@ -784,7 +1316,7 @@ This endpoint does not need any parameter.
|
|
784
1316
|
|
785
1317
|
### Authorization
|
786
1318
|
|
787
|
-
|
1319
|
+
[sessionToken](../README.md#sessionToken)
|
788
1320
|
|
789
1321
|
### HTTP request headers
|
790
1322
|
|