ory-kratos-client 0.1.1.alpha1 → 0.5.0.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 +86 -48
- data/docs/AdminApi.md +290 -85
- data/docs/CommonApi.md +111 -16
- data/docs/CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload.md +19 -0
- 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 +3 -3
- data/docs/FormField.md +8 -8
- 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 +4 -0
- data/docs/LoginRequestMethodConfig.md +3 -3
- data/docs/LoginViaApiResponse.md +19 -0
- data/docs/Message.md +23 -0
- data/docs/ProviderCredentialsConfig.md +19 -0
- data/docs/PublicApi.md +806 -141
- 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 +3 -1
- data/docs/RegistrationRequestMethodConfig.md +3 -3
- data/docs/RegistrationViaApiResponse.md +21 -0
- data/docs/RequestMethodConfig.md +23 -0
- 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 +33 -0
- data/docs/SettingsRequestMethod.md +19 -0
- data/docs/SettingsViaApiResponse.md +19 -0
- data/docs/UpdateIdentity.md +19 -0
- data/docs/VerifiableAddress.md +4 -4
- data/docs/VerificationFlow.md +33 -0
- data/docs/VerificationFlowMethod.md +19 -0
- data/docs/VerificationFlowMethodConfig.md +23 -0
- data/docs/VerificationRequest.md +3 -1
- data/lib/ory-kratos-client.rb +31 -14
- data/lib/ory-kratos-client/api/admin_api.rb +379 -128
- data/lib/ory-kratos-client/api/common_api.rb +150 -27
- data/lib/ory-kratos-client/api/health_api.rb +2 -2
- data/lib/ory-kratos-client/api/public_api.rb +1000 -234
- 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 +222 -0
- 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 +15 -16
- data/lib/ory-kratos-client/models/form_field.rb +16 -22
- data/lib/ory-kratos-client/models/generic_error.rb +2 -2
- data/lib/ory-kratos-client/models/generic_error_payload.rb +4 -7
- 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 +24 -3
- data/lib/ory-kratos-client/models/login_request_method.rb +2 -2
- data/lib/ory-kratos-client/models/login_request_method_config.rb +15 -16
- 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 +215 -0
- 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 -8
- data/lib/ory-kratos-client/models/registration_request_method.rb +2 -2
- data/lib/ory-kratos-client/models/registration_request_method_config.rb +15 -16
- data/lib/ory-kratos-client/models/registration_via_api_response.rb +236 -0
- data/lib/ory-kratos-client/models/request_method_config.rb +255 -0
- 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 +323 -0
- data/lib/ory-kratos-client/models/settings_request_method.rb +216 -0
- 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 -22
- 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 +15 -4
- 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_browser_settings_strategy_profile_flow_payload_spec.rb +47 -0
- 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/provider_credentials_config_spec.rb +47 -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/request_method_config_spec.rb +59 -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_request_method_spec.rb +47 -0
- data/spec/models/settings_request_spec.rb +83 -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 +161 -17
data/docs/LoginFlow.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# OryHydraClient::LoginFlow
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**active** | **String** | and so on. | [optional]
|
8
|
+
**expires_at** | **DateTime** | ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. |
|
9
|
+
**forced** | **Boolean** | Forced stores whether this login flow should enforce re-authentication. | [optional]
|
10
|
+
**id** | **String** | |
|
11
|
+
**issued_at** | **DateTime** | IssuedAt is the time (UTC) when the flow started. |
|
12
|
+
**messages** | [**Array<Message>**](Message.md) | | [optional]
|
13
|
+
**methods** | [**Hash<String, LoginFlowMethod>**](LoginFlowMethod.md) | List of login methods This is the list of available login methods with their required form fields, such as `identifier` and `password` for the password login method. This will also contain error messages such as \"password can not be empty\". |
|
14
|
+
**request_url** | **String** | RequestURL is the initial URL that was requested from ORY Kratos. It can be used to forward information contained in the URL's path or query for example. |
|
15
|
+
**type** | **String** | The flow type can either be `api` or `browser`. | [optional]
|
16
|
+
|
17
|
+
## Code Sample
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'OryHydraClient'
|
21
|
+
|
22
|
+
instance = OryHydraClient::LoginFlow.new(active: null,
|
23
|
+
expires_at: null,
|
24
|
+
forced: null,
|
25
|
+
id: null,
|
26
|
+
issued_at: null,
|
27
|
+
messages: null,
|
28
|
+
methods: null,
|
29
|
+
request_url: null,
|
30
|
+
type: null)
|
31
|
+
```
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::LoginFlowMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**config** | [**LoginFlowMethodConfig**](LoginFlowMethodConfig.md) | |
|
8
|
+
**method** | **String** | and so on. |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::LoginFlowMethod.new(config: null,
|
16
|
+
method: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# OryHydraClient::LoginFlowMethodConfig
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**action** | **String** | Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`. |
|
8
|
+
**fields** | [**Array<FormField>**](FormField.md) | Fields contains multiple fields |
|
9
|
+
**messages** | [**Array<Message>**](Message.md) | | [optional]
|
10
|
+
**method** | **String** | Method is the form method (e.g. POST) |
|
11
|
+
**providers** | [**Array<FormField>**](FormField.md) | Providers is set for the \"oidc\" flow method. | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'OryHydraClient'
|
17
|
+
|
18
|
+
instance = OryHydraClient::LoginFlowMethodConfig.new(action: null,
|
19
|
+
fields: null,
|
20
|
+
messages: null,
|
21
|
+
method: null,
|
22
|
+
providers: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/docs/LoginRequest.md
CHANGED
@@ -6,8 +6,10 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**active** | **String** | and so on. | [optional]
|
8
8
|
**expires_at** | **DateTime** | ExpiresAt is the time (UTC) when the request expires. If the user still wishes to log in, a new request has to be initiated. |
|
9
|
+
**forced** | **Boolean** | Forced stores whether this login request should enforce reauthentication. | [optional]
|
9
10
|
**id** | **String** | |
|
10
11
|
**issued_at** | **DateTime** | IssuedAt is the time (UTC) when the request occurred. |
|
12
|
+
**messages** | [**Array<Message>**](Message.md) | | [optional]
|
11
13
|
**methods** | [**Hash<String, LoginRequestMethod>**](LoginRequestMethod.md) | Methods contains context for all enabled login methods. If a login request has been processed, but for example the password is incorrect, this will contain error messages. |
|
12
14
|
**request_url** | **String** | RequestURL is the initial URL that was requested from ORY Kratos. It can be used to forward information contained in the URL's path or query for example. |
|
13
15
|
|
@@ -18,8 +20,10 @@ require 'OryHydraClient'
|
|
18
20
|
|
19
21
|
instance = OryHydraClient::LoginRequest.new(active: null,
|
20
22
|
expires_at: null,
|
23
|
+
forced: null,
|
21
24
|
id: null,
|
22
25
|
issued_at: null,
|
26
|
+
messages: null,
|
23
27
|
methods: null,
|
24
28
|
request_url: null)
|
25
29
|
```
|
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**action** | **String** | Action should be used as the form action URL
|
8
|
-
**errors** | [**Array<Error>**](Error.md) | Errors contains all form errors. These will be duplicates of the individual field errors. | [optional]
|
7
|
+
**action** | **String** | Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`. |
|
9
8
|
**fields** | [**Array<FormField>**](FormField.md) | Fields contains multiple fields |
|
9
|
+
**messages** | [**Array<Message>**](Message.md) | | [optional]
|
10
10
|
**method** | **String** | Method is the form method (e.g. POST) |
|
11
11
|
**providers** | [**Array<FormField>**](FormField.md) | Providers is set for the \"oidc\" request method. | [optional]
|
12
12
|
|
@@ -16,8 +16,8 @@ Name | Type | Description | Notes
|
|
16
16
|
require 'OryHydraClient'
|
17
17
|
|
18
18
|
instance = OryHydraClient::LoginRequestMethodConfig.new(action: null,
|
19
|
-
errors: null,
|
20
19
|
fields: null,
|
20
|
+
messages: null,
|
21
21
|
method: null,
|
22
22
|
providers: null)
|
23
23
|
```
|
@@ -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
|
+
|
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
|
+
|
@@ -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
|
+
|
data/docs/PublicApi.md
CHANGED
@@ -4,30 +4,43 @@ All URIs are relative to *http://localhost*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**
|
8
|
-
[**
|
9
|
-
[**
|
10
|
-
[**
|
11
|
-
[**
|
12
|
-
[**
|
13
|
-
[**
|
14
|
-
[**
|
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
|
14
|
+
[**get_schema**](PublicApi.md#get_schema) | **GET** /schemas/{id} |
|
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
|
15
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
|
16
|
-
[**
|
17
|
-
[**
|
18
|
-
[**
|
19
|
-
[**
|
20
|
-
[**
|
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
|
21
34
|
|
22
35
|
|
23
36
|
|
24
|
-
##
|
37
|
+
## complete_self_service_browser_settings_oidc_settings_flow
|
25
38
|
|
26
|
-
>
|
39
|
+
> complete_self_service_browser_settings_oidc_settings_flow
|
27
40
|
|
28
|
-
Complete the
|
41
|
+
Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
|
29
42
|
|
30
|
-
This endpoint completes a browser-based
|
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).
|
31
44
|
|
32
45
|
### Example
|
33
46
|
|
@@ -36,14 +49,59 @@ This endpoint completes a browser-based profile management flow. This is usually
|
|
36
49
|
require 'ory-kratos-client'
|
37
50
|
|
38
51
|
api_instance = OryHydraClient::PublicApi.new
|
39
|
-
request = 'request_example' # String | Request is the request ID.
|
40
|
-
body = OryHydraClient::CompleteSelfServiceBrowserProfileManagementFlowPayload.new # CompleteSelfServiceBrowserProfileManagementFlowPayload |
|
41
52
|
|
42
53
|
begin
|
43
|
-
#Complete the
|
44
|
-
api_instance.
|
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->
|
57
|
+
puts "Exception when calling PublicApi->complete_self_service_browser_settings_oidc_settings_flow: #{e}"
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
### Parameters
|
62
|
+
|
63
|
+
This endpoint does not need any parameter.
|
64
|
+
|
65
|
+
### Return type
|
66
|
+
|
67
|
+
nil (empty response body)
|
68
|
+
|
69
|
+
### Authorization
|
70
|
+
|
71
|
+
No authorization required
|
72
|
+
|
73
|
+
### HTTP request headers
|
74
|
+
|
75
|
+
- **Content-Type**: Not defined
|
76
|
+
- **Accept**: application/json
|
77
|
+
|
78
|
+
|
79
|
+
## complete_self_service_login_flow_with_password_method
|
80
|
+
|
81
|
+
> LoginViaApiResponse complete_self_service_login_flow_with_password_method(flow, opts)
|
82
|
+
|
83
|
+
Complete Login Flow with Username/Email Password Method
|
84
|
+
|
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).
|
86
|
+
|
87
|
+
### Example
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
# load the gem
|
91
|
+
require 'ory-kratos-client'
|
92
|
+
|
93
|
+
api_instance = OryHydraClient::PublicApi.new
|
94
|
+
flow = 'flow_example' # String | The Flow ID
|
95
|
+
opts = {
|
96
|
+
body: OryHydraClient::CompleteSelfServiceLoginFlowWithPasswordMethod.new # CompleteSelfServiceLoginFlowWithPasswordMethod |
|
97
|
+
}
|
98
|
+
|
99
|
+
begin
|
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
|
103
|
+
rescue OryHydraClient::ApiError => e
|
104
|
+
puts "Exception when calling PublicApi->complete_self_service_login_flow_with_password_method: #{e}"
|
47
105
|
end
|
48
106
|
```
|
49
107
|
|
@@ -52,12 +110,12 @@ end
|
|
52
110
|
|
53
111
|
Name | Type | Description | Notes
|
54
112
|
------------- | ------------- | ------------- | -------------
|
55
|
-
**
|
56
|
-
**body** | [**
|
113
|
+
**flow** | **String**| The Flow ID |
|
114
|
+
**body** | [**CompleteSelfServiceLoginFlowWithPasswordMethod**](CompleteSelfServiceLoginFlowWithPasswordMethod.md)| | [optional]
|
57
115
|
|
58
116
|
### Return type
|
59
117
|
|
60
|
-
|
118
|
+
[**LoginViaApiResponse**](LoginViaApiResponse.md)
|
61
119
|
|
62
120
|
### Authorization
|
63
121
|
|
@@ -69,13 +127,13 @@ No authorization required
|
|
69
127
|
- **Accept**: application/json
|
70
128
|
|
71
129
|
|
72
|
-
##
|
130
|
+
## complete_self_service_recovery_flow_with_link_method
|
73
131
|
|
74
|
-
>
|
132
|
+
> complete_self_service_recovery_flow_with_link_method(opts)
|
75
133
|
|
76
|
-
Complete
|
134
|
+
Complete Recovery Flow with Link Method
|
77
135
|
|
78
|
-
|
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).
|
79
137
|
|
80
138
|
### Example
|
81
139
|
|
@@ -84,14 +142,17 @@ This endpoint completes a browser-based profile management flow. This is usually
|
|
84
142
|
require 'ory-kratos-client'
|
85
143
|
|
86
144
|
api_instance = OryHydraClient::PublicApi.new
|
87
|
-
|
88
|
-
|
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
|
+
}
|
89
150
|
|
90
151
|
begin
|
91
|
-
#Complete
|
92
|
-
api_instance.
|
152
|
+
#Complete Recovery Flow with Link Method
|
153
|
+
api_instance.complete_self_service_recovery_flow_with_link_method(opts)
|
93
154
|
rescue OryHydraClient::ApiError => e
|
94
|
-
puts "Exception when calling PublicApi->
|
155
|
+
puts "Exception when calling PublicApi->complete_self_service_recovery_flow_with_link_method: #{e}"
|
95
156
|
end
|
96
157
|
```
|
97
158
|
|
@@ -100,8 +161,9 @@ end
|
|
100
161
|
|
101
162
|
Name | Type | Description | Notes
|
102
163
|
------------- | ------------- | ------------- | -------------
|
103
|
-
**
|
104
|
-
**
|
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]
|
105
167
|
|
106
168
|
### Return type
|
107
169
|
|
@@ -113,17 +175,17 @@ No authorization required
|
|
113
175
|
|
114
176
|
### HTTP request headers
|
115
177
|
|
116
|
-
- **Content-Type**:
|
178
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
117
179
|
- **Accept**: application/json
|
118
180
|
|
119
181
|
|
120
|
-
##
|
182
|
+
## complete_self_service_registration_flow_with_password_method
|
121
183
|
|
122
|
-
>
|
184
|
+
> RegistrationViaApiResponse complete_self_service_registration_flow_with_password_method(opts)
|
123
185
|
|
124
|
-
|
186
|
+
Complete Registration Flow with Username/Email Password Method
|
125
187
|
|
126
|
-
|
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).
|
127
189
|
|
128
190
|
### Example
|
129
191
|
|
@@ -132,14 +194,17 @@ This endpoint returns a login request's context with, for example, error details
|
|
132
194
|
require 'ory-kratos-client'
|
133
195
|
|
134
196
|
api_instance = OryHydraClient::PublicApi.new
|
135
|
-
|
197
|
+
opts = {
|
198
|
+
flow: 'flow_example', # String | Flow is flow ID.
|
199
|
+
payload: nil # Object |
|
200
|
+
}
|
136
201
|
|
137
202
|
begin
|
138
|
-
#
|
139
|
-
result = api_instance.
|
203
|
+
#Complete Registration Flow with Username/Email Password Method
|
204
|
+
result = api_instance.complete_self_service_registration_flow_with_password_method(opts)
|
140
205
|
p result
|
141
206
|
rescue OryHydraClient::ApiError => e
|
142
|
-
puts "Exception when calling PublicApi->
|
207
|
+
puts "Exception when calling PublicApi->complete_self_service_registration_flow_with_password_method: #{e}"
|
143
208
|
end
|
144
209
|
```
|
145
210
|
|
@@ -148,11 +213,12 @@ end
|
|
148
213
|
|
149
214
|
Name | Type | Description | Notes
|
150
215
|
------------- | ------------- | ------------- | -------------
|
151
|
-
**
|
216
|
+
**flow** | **String**| Flow is flow ID. | [optional]
|
217
|
+
**payload** | **Object**| | [optional]
|
152
218
|
|
153
219
|
### Return type
|
154
220
|
|
155
|
-
[**
|
221
|
+
[**RegistrationViaApiResponse**](RegistrationViaApiResponse.md)
|
156
222
|
|
157
223
|
### Authorization
|
158
224
|
|
@@ -160,33 +226,152 @@ No authorization required
|
|
160
226
|
|
161
227
|
### HTTP request headers
|
162
228
|
|
163
|
-
- **Content-Type**:
|
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
|
164
288
|
- **Accept**: application/json
|
165
289
|
|
166
290
|
|
167
|
-
##
|
291
|
+
## complete_self_service_settings_flow_with_profile_method
|
168
292
|
|
169
|
-
>
|
293
|
+
> SettingsFlow complete_self_service_settings_flow_with_profile_method(opts)
|
170
294
|
|
171
|
-
|
295
|
+
Complete Settings Flow with Profile Method
|
172
296
|
|
173
|
-
|
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).
|
174
298
|
|
175
299
|
### Example
|
176
300
|
|
177
301
|
```ruby
|
178
302
|
# load the gem
|
179
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
|
180
311
|
|
181
312
|
api_instance = OryHydraClient::PublicApi.new
|
182
|
-
|
313
|
+
opts = {
|
314
|
+
flow: 'flow_example', # String | Flow is flow ID.
|
315
|
+
payload: nil # Object |
|
316
|
+
}
|
183
317
|
|
184
318
|
begin
|
185
|
-
#
|
186
|
-
result = api_instance.
|
319
|
+
#Complete Settings Flow with Profile Method
|
320
|
+
result = api_instance.complete_self_service_settings_flow_with_profile_method(opts)
|
187
321
|
p result
|
188
322
|
rescue OryHydraClient::ApiError => e
|
189
|
-
puts "Exception when calling PublicApi->
|
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}"
|
190
375
|
end
|
191
376
|
```
|
192
377
|
|
@@ -195,11 +380,13 @@ end
|
|
195
380
|
|
196
381
|
Name | Type | Description | Notes
|
197
382
|
------------- | ------------- | ------------- | -------------
|
198
|
-
**
|
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]
|
199
386
|
|
200
387
|
### Return type
|
201
388
|
|
202
|
-
|
389
|
+
nil (empty response body)
|
203
390
|
|
204
391
|
### Authorization
|
205
392
|
|
@@ -207,17 +394,17 @@ No authorization required
|
|
207
394
|
|
208
395
|
### HTTP request headers
|
209
396
|
|
210
|
-
- **Content-Type**:
|
397
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
211
398
|
- **Accept**: application/json
|
212
399
|
|
213
400
|
|
214
|
-
##
|
401
|
+
## get_schema
|
402
|
+
|
403
|
+
> Object get_schema(id)
|
215
404
|
|
216
|
-
> RegistrationRequest get_self_service_browser_registration_request(request)
|
217
405
|
|
218
|
-
Get the request context of browser-based registration user flows
|
219
406
|
|
220
|
-
|
407
|
+
Get a Traits Schema Definition
|
221
408
|
|
222
409
|
### Example
|
223
410
|
|
@@ -226,14 +413,13 @@ This endpoint returns a registration request's context with, for example, error
|
|
226
413
|
require 'ory-kratos-client'
|
227
414
|
|
228
415
|
api_instance = OryHydraClient::PublicApi.new
|
229
|
-
|
416
|
+
id = 'id_example' # String | ID must be set to the ID of schema you want to get
|
230
417
|
|
231
418
|
begin
|
232
|
-
|
233
|
-
result = api_instance.get_self_service_browser_registration_request(request)
|
419
|
+
result = api_instance.get_schema(id)
|
234
420
|
p result
|
235
421
|
rescue OryHydraClient::ApiError => e
|
236
|
-
puts "Exception when calling PublicApi->
|
422
|
+
puts "Exception when calling PublicApi->get_schema: #{e}"
|
237
423
|
end
|
238
424
|
```
|
239
425
|
|
@@ -242,11 +428,11 @@ end
|
|
242
428
|
|
243
429
|
Name | Type | Description | Notes
|
244
430
|
------------- | ------------- | ------------- | -------------
|
245
|
-
**
|
431
|
+
**id** | **String**| ID must be set to the ID of schema you want to get |
|
246
432
|
|
247
433
|
### Return type
|
248
434
|
|
249
|
-
|
435
|
+
**Object**
|
250
436
|
|
251
437
|
### Authorization
|
252
438
|
|
@@ -260,11 +446,11 @@ No authorization required
|
|
260
446
|
|
261
447
|
## get_self_service_error
|
262
448
|
|
263
|
-
> ErrorContainer get_self_service_error(
|
449
|
+
> ErrorContainer get_self_service_error(error)
|
264
450
|
|
265
|
-
Get
|
451
|
+
Get User-Facing Self-Service Errors
|
266
452
|
|
267
|
-
This endpoint returns the error associated with a user-facing self service errors.
|
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).
|
268
454
|
|
269
455
|
### Example
|
270
456
|
|
@@ -273,13 +459,11 @@ This endpoint returns the error associated with a user-facing self service error
|
|
273
459
|
require 'ory-kratos-client'
|
274
460
|
|
275
461
|
api_instance = OryHydraClient::PublicApi.new
|
276
|
-
|
277
|
-
id: 'id_example' # String |
|
278
|
-
}
|
462
|
+
error = 'error_example' # String | Error is the container's ID
|
279
463
|
|
280
464
|
begin
|
281
|
-
#Get
|
282
|
-
result = api_instance.get_self_service_error(
|
465
|
+
#Get User-Facing Self-Service Errors
|
466
|
+
result = api_instance.get_self_service_error(error)
|
283
467
|
p result
|
284
468
|
rescue OryHydraClient::ApiError => e
|
285
469
|
puts "Exception when calling PublicApi->get_self_service_error: #{e}"
|
@@ -291,7 +475,7 @@ end
|
|
291
475
|
|
292
476
|
Name | Type | Description | Notes
|
293
477
|
------------- | ------------- | ------------- | -------------
|
294
|
-
**
|
478
|
+
**error** | **String**| Error is the container's ID |
|
295
479
|
|
296
480
|
### Return type
|
297
481
|
|
@@ -307,13 +491,13 @@ No authorization required
|
|
307
491
|
- **Accept**: application/json
|
308
492
|
|
309
493
|
|
310
|
-
##
|
494
|
+
## get_self_service_login_flow
|
311
495
|
|
312
|
-
>
|
496
|
+
> LoginFlow get_self_service_login_flow(id)
|
313
497
|
|
314
|
-
Get
|
498
|
+
Get Login Flow
|
315
499
|
|
316
|
-
|
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).
|
317
501
|
|
318
502
|
### Example
|
319
503
|
|
@@ -322,14 +506,14 @@ When accessing this endpoint through ORY Kratos' Public API, ensure that cookies
|
|
322
506
|
require 'ory-kratos-client'
|
323
507
|
|
324
508
|
api_instance = OryHydraClient::PublicApi.new
|
325
|
-
|
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`).
|
326
510
|
|
327
511
|
begin
|
328
|
-
#Get
|
329
|
-
result = api_instance.
|
512
|
+
#Get Login Flow
|
513
|
+
result = api_instance.get_self_service_login_flow(id)
|
330
514
|
p result
|
331
515
|
rescue OryHydraClient::ApiError => e
|
332
|
-
puts "Exception when calling PublicApi->
|
516
|
+
puts "Exception when calling PublicApi->get_self_service_login_flow: #{e}"
|
333
517
|
end
|
334
518
|
```
|
335
519
|
|
@@ -338,11 +522,11 @@ end
|
|
338
522
|
|
339
523
|
Name | Type | Description | Notes
|
340
524
|
------------- | ------------- | ------------- | -------------
|
341
|
-
**
|
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`). |
|
342
526
|
|
343
527
|
### Return type
|
344
528
|
|
345
|
-
[**
|
529
|
+
[**LoginFlow**](LoginFlow.md)
|
346
530
|
|
347
531
|
### Authorization
|
348
532
|
|
@@ -354,13 +538,13 @@ No authorization required
|
|
354
538
|
- **Accept**: application/json
|
355
539
|
|
356
540
|
|
357
|
-
##
|
541
|
+
## get_self_service_recovery_flow
|
358
542
|
|
359
|
-
>
|
543
|
+
> RecoveryFlow get_self_service_recovery_flow(id)
|
360
544
|
|
361
|
-
|
545
|
+
Get information about a recovery flow
|
362
546
|
|
363
|
-
This endpoint
|
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).
|
364
548
|
|
365
549
|
### Example
|
366
550
|
|
@@ -369,22 +553,175 @@ This endpoint initializes a browser-based user login flow. Once initialized, the
|
|
369
553
|
require 'ory-kratos-client'
|
370
554
|
|
371
555
|
api_instance = OryHydraClient::PublicApi.new
|
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`).
|
372
557
|
|
373
558
|
begin
|
374
|
-
#
|
375
|
-
api_instance.
|
559
|
+
#Get information about a recovery flow
|
560
|
+
result = api_instance.get_self_service_recovery_flow(id)
|
561
|
+
p result
|
376
562
|
rescue OryHydraClient::ApiError => e
|
377
|
-
puts "Exception when calling PublicApi->
|
563
|
+
puts "Exception when calling PublicApi->get_self_service_recovery_flow: #{e}"
|
378
564
|
end
|
379
565
|
```
|
380
566
|
|
381
567
|
### Parameters
|
382
568
|
|
383
|
-
|
569
|
+
|
570
|
+
Name | Type | Description | Notes
|
571
|
+
------------- | ------------- | ------------- | -------------
|
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`). |
|
384
573
|
|
385
574
|
### Return type
|
386
575
|
|
387
|
-
|
576
|
+
[**RecoveryFlow**](RecoveryFlow.md)
|
577
|
+
|
578
|
+
### Authorization
|
579
|
+
|
580
|
+
No authorization required
|
581
|
+
|
582
|
+
### HTTP request headers
|
583
|
+
|
584
|
+
- **Content-Type**: Not defined
|
585
|
+
- **Accept**: application/json
|
586
|
+
|
587
|
+
|
588
|
+
## get_self_service_registration_flow
|
589
|
+
|
590
|
+
> RegistrationFlow get_self_service_registration_flow(id)
|
591
|
+
|
592
|
+
Get Registration Flow
|
593
|
+
|
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).
|
595
|
+
|
596
|
+
### Example
|
597
|
+
|
598
|
+
```ruby
|
599
|
+
# load the gem
|
600
|
+
require 'ory-kratos-client'
|
601
|
+
|
602
|
+
api_instance = OryHydraClient::PublicApi.new
|
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`).
|
604
|
+
|
605
|
+
begin
|
606
|
+
#Get Registration Flow
|
607
|
+
result = api_instance.get_self_service_registration_flow(id)
|
608
|
+
p result
|
609
|
+
rescue OryHydraClient::ApiError => e
|
610
|
+
puts "Exception when calling PublicApi->get_self_service_registration_flow: #{e}"
|
611
|
+
end
|
612
|
+
```
|
613
|
+
|
614
|
+
### Parameters
|
615
|
+
|
616
|
+
|
617
|
+
Name | Type | Description | Notes
|
618
|
+
------------- | ------------- | ------------- | -------------
|
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`). |
|
620
|
+
|
621
|
+
### Return type
|
622
|
+
|
623
|
+
[**RegistrationFlow**](RegistrationFlow.md)
|
624
|
+
|
625
|
+
### Authorization
|
626
|
+
|
627
|
+
No authorization required
|
628
|
+
|
629
|
+
### HTTP request headers
|
630
|
+
|
631
|
+
- **Content-Type**: Not defined
|
632
|
+
- **Accept**: application/json
|
633
|
+
|
634
|
+
|
635
|
+
## get_self_service_settings_flow
|
636
|
+
|
637
|
+
> SettingsFlow get_self_service_settings_flow(id)
|
638
|
+
|
639
|
+
Get Settings Flow
|
640
|
+
|
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).
|
642
|
+
|
643
|
+
### Example
|
644
|
+
|
645
|
+
```ruby
|
646
|
+
# load the gem
|
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
|
655
|
+
|
656
|
+
api_instance = OryHydraClient::PublicApi.new
|
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`).
|
658
|
+
|
659
|
+
begin
|
660
|
+
#Get Settings Flow
|
661
|
+
result = api_instance.get_self_service_settings_flow(id)
|
662
|
+
p result
|
663
|
+
rescue OryHydraClient::ApiError => e
|
664
|
+
puts "Exception when calling PublicApi->get_self_service_settings_flow: #{e}"
|
665
|
+
end
|
666
|
+
```
|
667
|
+
|
668
|
+
### Parameters
|
669
|
+
|
670
|
+
|
671
|
+
Name | Type | Description | Notes
|
672
|
+
------------- | ------------- | ------------- | -------------
|
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`). |
|
674
|
+
|
675
|
+
### Return type
|
676
|
+
|
677
|
+
[**SettingsFlow**](SettingsFlow.md)
|
678
|
+
|
679
|
+
### Authorization
|
680
|
+
|
681
|
+
[sessionToken](../README.md#sessionToken)
|
682
|
+
|
683
|
+
### HTTP request headers
|
684
|
+
|
685
|
+
- **Content-Type**: Not defined
|
686
|
+
- **Accept**: application/json
|
687
|
+
|
688
|
+
|
689
|
+
## get_self_service_verification_flow
|
690
|
+
|
691
|
+
> VerificationFlow get_self_service_verification_flow(id)
|
692
|
+
|
693
|
+
Get Verification Flow
|
694
|
+
|
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).
|
696
|
+
|
697
|
+
### Example
|
698
|
+
|
699
|
+
```ruby
|
700
|
+
# load the gem
|
701
|
+
require 'ory-kratos-client'
|
702
|
+
|
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`).
|
705
|
+
|
706
|
+
begin
|
707
|
+
#Get Verification Flow
|
708
|
+
result = api_instance.get_self_service_verification_flow(id)
|
709
|
+
p result
|
710
|
+
rescue OryHydraClient::ApiError => e
|
711
|
+
puts "Exception when calling PublicApi->get_self_service_verification_flow: #{e}"
|
712
|
+
end
|
713
|
+
```
|
714
|
+
|
715
|
+
### Parameters
|
716
|
+
|
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`). |
|
721
|
+
|
722
|
+
### Return type
|
723
|
+
|
724
|
+
[**VerificationFlow**](VerificationFlow.md)
|
388
725
|
|
389
726
|
### Authorization
|
390
727
|
|
@@ -438,13 +775,13 @@ No authorization required
|
|
438
775
|
- **Accept**: application/json
|
439
776
|
|
440
777
|
|
441
|
-
##
|
778
|
+
## initialize_self_service_login_via_api_flow
|
442
779
|
|
443
|
-
>
|
780
|
+
> LoginFlow initialize_self_service_login_via_api_flow(opts)
|
444
781
|
|
445
|
-
Initialize
|
782
|
+
Initialize Login Flow for API clients
|
446
783
|
|
447
|
-
This endpoint
|
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).
|
448
785
|
|
449
786
|
### Example
|
450
787
|
|
@@ -453,12 +790,61 @@ This endpoint initializes a browser-based user registration flow. Once initializ
|
|
453
790
|
require 'ory-kratos-client'
|
454
791
|
|
455
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
|
+
}
|
456
796
|
|
457
797
|
begin
|
458
|
-
#Initialize
|
459
|
-
api_instance.
|
798
|
+
#Initialize Login Flow for API clients
|
799
|
+
result = api_instance.initialize_self_service_login_via_api_flow(opts)
|
800
|
+
p result
|
460
801
|
rescue OryHydraClient::ApiError => e
|
461
|
-
puts "Exception when calling PublicApi->
|
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}"
|
462
848
|
end
|
463
849
|
```
|
464
850
|
|
@@ -480,13 +866,13 @@ No authorization required
|
|
480
866
|
- **Accept**: application/json
|
481
867
|
|
482
868
|
|
483
|
-
##
|
869
|
+
## initialize_self_service_recovery_via_api_flow
|
484
870
|
|
485
|
-
>
|
871
|
+
> RecoveryFlow initialize_self_service_recovery_via_api_flow
|
486
872
|
|
487
|
-
Initialize
|
873
|
+
Initialize Recovery Flow for API Clients
|
488
874
|
|
489
|
-
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).
|
490
876
|
|
491
877
|
### Example
|
492
878
|
|
@@ -495,22 +881,146 @@ This endpoint initializes a browser-based profile management flow. Once initiali
|
|
495
881
|
require 'ory-kratos-client'
|
496
882
|
|
497
883
|
api_instance = OryHydraClient::PublicApi.new
|
498
|
-
via = 'via_example' # String | What to verify Currently only \"email\" is supported.
|
499
884
|
|
500
885
|
begin
|
501
|
-
#Initialize
|
502
|
-
api_instance.
|
886
|
+
#Initialize Recovery Flow for API Clients
|
887
|
+
result = api_instance.initialize_self_service_recovery_via_api_flow
|
888
|
+
p result
|
503
889
|
rescue OryHydraClient::ApiError => e
|
504
|
-
puts "Exception when calling PublicApi->
|
890
|
+
puts "Exception when calling PublicApi->initialize_self_service_recovery_via_api_flow: #{e}"
|
505
891
|
end
|
506
892
|
```
|
507
893
|
|
508
894
|
### Parameters
|
509
895
|
|
896
|
+
This endpoint does not need any parameter.
|
510
897
|
|
511
|
-
|
512
|
-
|
513
|
-
|
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
|
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.
|
939
|
+
|
940
|
+
### Return type
|
941
|
+
|
942
|
+
nil (empty response body)
|
943
|
+
|
944
|
+
### Authorization
|
945
|
+
|
946
|
+
No authorization required
|
947
|
+
|
948
|
+
### HTTP request headers
|
949
|
+
|
950
|
+
- **Content-Type**: Not defined
|
951
|
+
- **Accept**: application/json
|
952
|
+
|
953
|
+
|
954
|
+
## initialize_self_service_registration_via_api_flow
|
955
|
+
|
956
|
+
> RegistrationFlow initialize_self_service_registration_via_api_flow
|
957
|
+
|
958
|
+
Initialize Registration Flow for API clients
|
959
|
+
|
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).
|
961
|
+
|
962
|
+
### Example
|
963
|
+
|
964
|
+
```ruby
|
965
|
+
# load the gem
|
966
|
+
require 'ory-kratos-client'
|
967
|
+
|
968
|
+
api_instance = OryHydraClient::PublicApi.new
|
969
|
+
|
970
|
+
begin
|
971
|
+
#Initialize Registration Flow for API clients
|
972
|
+
result = api_instance.initialize_self_service_registration_via_api_flow
|
973
|
+
p result
|
974
|
+
rescue OryHydraClient::ApiError => e
|
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}"
|
1018
|
+
end
|
1019
|
+
```
|
1020
|
+
|
1021
|
+
### Parameters
|
1022
|
+
|
1023
|
+
This endpoint does not need any parameter.
|
514
1024
|
|
515
1025
|
### Return type
|
516
1026
|
|
@@ -526,27 +1036,84 @@ No authorization required
|
|
526
1036
|
- **Accept**: application/json
|
527
1037
|
|
528
1038
|
|
529
|
-
##
|
1039
|
+
## initialize_self_service_settings_via_api_flow
|
1040
|
+
|
1041
|
+
> SettingsFlow initialize_self_service_settings_via_api_flow
|
1042
|
+
|
1043
|
+
Initialize Settings Flow for API Clients
|
1044
|
+
|
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).
|
1046
|
+
|
1047
|
+
### Example
|
1048
|
+
|
1049
|
+
```ruby
|
1050
|
+
# load the gem
|
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
|
1059
|
+
|
1060
|
+
api_instance = OryHydraClient::PublicApi.new
|
1061
|
+
|
1062
|
+
begin
|
1063
|
+
#Initialize Settings Flow for API Clients
|
1064
|
+
result = api_instance.initialize_self_service_settings_via_api_flow
|
1065
|
+
p result
|
1066
|
+
rescue OryHydraClient::ApiError => 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
|
530
1090
|
|
531
|
-
>
|
1091
|
+
> initialize_self_service_settings_via_browser_flow
|
532
1092
|
|
533
|
-
Initialize
|
1093
|
+
Initialize Settings Flow for Browsers
|
534
1094
|
|
535
|
-
This endpoint initializes a browser-based
|
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).
|
536
1096
|
|
537
1097
|
### Example
|
538
1098
|
|
539
1099
|
```ruby
|
540
1100
|
# load the gem
|
541
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
|
542
1109
|
|
543
1110
|
api_instance = OryHydraClient::PublicApi.new
|
544
1111
|
|
545
1112
|
begin
|
546
|
-
#Initialize
|
547
|
-
api_instance.
|
1113
|
+
#Initialize Settings Flow for Browsers
|
1114
|
+
api_instance.initialize_self_service_settings_via_browser_flow
|
548
1115
|
rescue OryHydraClient::ApiError => e
|
549
|
-
puts "Exception when calling PublicApi->
|
1116
|
+
puts "Exception when calling PublicApi->initialize_self_service_settings_via_browser_flow: #{e}"
|
550
1117
|
end
|
551
1118
|
```
|
552
1119
|
|
@@ -560,6 +1127,49 @@ nil (empty response body)
|
|
560
1127
|
|
561
1128
|
### Authorization
|
562
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
|
+
|
563
1173
|
No authorization required
|
564
1174
|
|
565
1175
|
### HTTP request headers
|
@@ -568,13 +1178,13 @@ No authorization required
|
|
568
1178
|
- **Accept**: application/json
|
569
1179
|
|
570
1180
|
|
571
|
-
##
|
1181
|
+
## initialize_self_service_verification_via_browser_flow
|
572
1182
|
|
573
|
-
>
|
1183
|
+
> initialize_self_service_verification_via_browser_flow
|
574
1184
|
|
575
|
-
|
1185
|
+
Initialize Verification Flow for Browser Clients
|
576
1186
|
|
577
|
-
This endpoint
|
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).
|
578
1188
|
|
579
1189
|
### Example
|
580
1190
|
|
@@ -583,14 +1193,55 @@ This endpoint completes a browser-based verification flow. > This endpoint is N
|
|
583
1193
|
require 'ory-kratos-client'
|
584
1194
|
|
585
1195
|
api_instance = OryHydraClient::PublicApi.new
|
586
|
-
code = 'code_example' # String |
|
587
|
-
via = 'via_example' # String | What to verify Currently only \"email\" is supported.
|
588
1196
|
|
589
1197
|
begin
|
590
|
-
#
|
591
|
-
api_instance.
|
1198
|
+
#Initialize Verification Flow for Browser Clients
|
1199
|
+
api_instance.initialize_self_service_verification_via_browser_flow
|
592
1200
|
rescue OryHydraClient::ApiError => e
|
593
|
-
puts "Exception when calling PublicApi->
|
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}"
|
594
1245
|
end
|
595
1246
|
```
|
596
1247
|
|
@@ -599,8 +1250,7 @@ end
|
|
599
1250
|
|
600
1251
|
Name | Type | Description | Notes
|
601
1252
|
------------- | ------------- | ------------- | -------------
|
602
|
-
**
|
603
|
-
**via** | **String**| What to verify Currently only \"email\" is supported. |
|
1253
|
+
**body** | [**RevokeSession**](RevokeSession.md)| |
|
604
1254
|
|
605
1255
|
### Return type
|
606
1256
|
|
@@ -612,29 +1262,40 @@ No authorization required
|
|
612
1262
|
|
613
1263
|
### HTTP request headers
|
614
1264
|
|
615
|
-
- **Content-Type**:
|
1265
|
+
- **Content-Type**: application/json
|
616
1266
|
- **Accept**: application/json
|
617
1267
|
|
618
1268
|
|
619
1269
|
## whoami
|
620
1270
|
|
621
|
-
> Session whoami
|
1271
|
+
> Session whoami(opts)
|
622
1272
|
|
623
|
-
Check
|
1273
|
+
Check Who the Current HTTP Session Belongs To
|
624
1274
|
|
625
|
-
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.
|
626
1276
|
|
627
1277
|
### Example
|
628
1278
|
|
629
1279
|
```ruby
|
630
1280
|
# load the gem
|
631
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
|
632
1289
|
|
633
1290
|
api_instance = OryHydraClient::PublicApi.new
|
1291
|
+
opts = {
|
1292
|
+
cookie: 'cookie_example', # String |
|
1293
|
+
authorization: 'authorization_example' # String | in: authorization
|
1294
|
+
}
|
634
1295
|
|
635
1296
|
begin
|
636
|
-
#Check
|
637
|
-
result = api_instance.whoami
|
1297
|
+
#Check Who the Current HTTP Session Belongs To
|
1298
|
+
result = api_instance.whoami(opts)
|
638
1299
|
p result
|
639
1300
|
rescue OryHydraClient::ApiError => e
|
640
1301
|
puts "Exception when calling PublicApi->whoami: #{e}"
|
@@ -643,7 +1304,11 @@ end
|
|
643
1304
|
|
644
1305
|
### Parameters
|
645
1306
|
|
646
|
-
|
1307
|
+
|
1308
|
+
Name | Type | Description | Notes
|
1309
|
+
------------- | ------------- | ------------- | -------------
|
1310
|
+
**cookie** | **String**| | [optional]
|
1311
|
+
**authorization** | **String**| in: authorization | [optional]
|
647
1312
|
|
648
1313
|
### Return type
|
649
1314
|
|
@@ -651,7 +1316,7 @@ This endpoint does not need any parameter.
|
|
651
1316
|
|
652
1317
|
### Authorization
|
653
1318
|
|
654
|
-
|
1319
|
+
[sessionToken](../README.md#sessionToken)
|
655
1320
|
|
656
1321
|
### HTTP request headers
|
657
1322
|
|