ory-kratos-client 0.4.6.alpha1 → 0.5.4.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +82 -60
- data/docs/AdminApi.md +208 -98
- 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/Identity.md +1 -1
- data/docs/LoginFlow.md +33 -0
- data/docs/LoginFlowMethod.md +19 -0
- data/docs/LoginFlowMethodConfig.md +25 -0
- data/docs/LoginViaApiResponse.md +19 -0
- data/docs/Message.md +1 -1
- data/docs/PublicApi.md +589 -197
- 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/RegistrationFlow.md +31 -0
- data/docs/RegistrationFlowMethod.md +19 -0
- data/docs/RegistrationFlowMethodConfig.md +25 -0
- data/docs/RegistrationViaApiResponse.md +21 -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/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/lib/ory-kratos-client.rb +28 -17
- data/lib/ory-kratos-client/api/admin_api.rb +277 -149
- data/lib/ory-kratos-client/api/health_api.rb +1 -1
- data/lib/ory-kratos-client/api/public_api.rb +713 -297
- data/lib/ory-kratos-client/api/version_api.rb +1 -1
- data/lib/ory-kratos-client/api_client.rb +2 -1
- data/lib/ory-kratos-client/api_error.rb +1 -1
- data/lib/ory-kratos-client/configuration.rb +8 -1
- 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 +12 -1
- data/lib/ory-kratos-client/models/form_field.rb +1 -1
- data/lib/ory-kratos-client/models/generic_error.rb +1 -1
- data/lib/ory-kratos-client/models/generic_error_payload.rb +1 -1
- data/lib/ory-kratos-client/models/health_not_ready_status.rb +1 -1
- data/lib/ory-kratos-client/models/health_status.rb +1 -1
- data/lib/ory-kratos-client/models/identity.rb +6 -1
- 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_via_api_response.rb +227 -0
- data/lib/ory-kratos-client/models/message.rb +2 -1
- data/lib/ory-kratos-client/models/recovery_address.rb +1 -1
- 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/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_via_api_response.rb +236 -0
- data/lib/ory-kratos-client/models/revoke_session.rb +212 -0
- data/lib/ory-kratos-client/models/session.rb +28 -19
- 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_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 +16 -16
- 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/version.rb +1 -1
- data/lib/ory-kratos-client/version.rb +2 -2
- data/ory-kratos-client.gemspec +1 -1
- 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/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/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 +137 -29
@@ -0,0 +1,21 @@
|
|
1
|
+
# OryHydraClient::CompleteSelfServiceLoginFlowWithPasswordMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**csrf_token** | **String** | Sending the anti-csrf token is only required for browser login flows. | [optional]
|
8
|
+
**identifier** | **String** | Identifier is the email or username of the user trying to log in. | [optional]
|
9
|
+
**password** | **String** | The user's password. | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'OryHydraClient'
|
15
|
+
|
16
|
+
instance = OryHydraClient::CompleteSelfServiceLoginFlowWithPasswordMethod.new(csrf_token: null,
|
17
|
+
identifier: null,
|
18
|
+
password: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::CompleteSelfServiceRecoveryFlowWithLinkMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**csrf_token** | **String** | Sending the anti-csrf token is only required for browser login flows. | [optional]
|
8
|
+
**email** | **String** | Email to Recover Needs to be set when initiating the flow. If the email is a registered recovery email, a recovery link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email in: body | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::CompleteSelfServiceRecoveryFlowWithLinkMethod.new(csrf_token: null,
|
16
|
+
email: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::CompleteSelfServiceSettingsFlowWithPasswordMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**csrf_token** | **String** | CSRFToken is the anti-CSRF token type: string | [optional]
|
8
|
+
**password** | **String** | Password is the updated password type: string |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::CompleteSelfServiceSettingsFlowWithPasswordMethod.new(csrf_token: null,
|
16
|
+
password: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::CompleteSelfServiceVerificationFlowWithLinkMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**csrf_token** | **String** | Sending the anti-csrf token is only required for browser login flows. | [optional]
|
8
|
+
**email** | **String** | Email to Verify Needs to be set when initiating the flow. If the email is a registered verification email, a verification link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email in: body | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::CompleteSelfServiceVerificationFlowWithLinkMethod.new(csrf_token: null,
|
16
|
+
email: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::CreateIdentity
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**schema_id** | **String** | SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. |
|
8
|
+
**traits** | [**Object**](.md) | Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`. |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::CreateIdentity.new(schema_id: null,
|
16
|
+
traits: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::CreateRecoveryLink
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**expires_in** | **String** | Link Expires In The recovery link will expire at that point in time. Defaults to the configuration value of `selfservice.flows.recovery.request_lifespan`. | [optional]
|
8
|
+
**identity_id** | **String** | |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::CreateRecoveryLink.new(expires_in: null,
|
16
|
+
identity_id: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/ErrorContainer.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**errors** | [**Object**](.md) |
|
8
|
-
**id** | **String** | |
|
7
|
+
**errors** | [**Object**](.md) | Errors in the container |
|
8
|
+
**id** | **String** | |
|
9
9
|
|
10
10
|
## Code Sample
|
11
11
|
|
data/docs/Identity.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**id** | **String** | |
|
8
8
|
**recovery_addresses** | [**Array<RecoveryAddress>**](RecoveryAddress.md) | RecoveryAddresses contains all the addresses that can be used to recover an identity. | [optional]
|
9
9
|
**schema_id** | **String** | SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. |
|
10
|
-
**schema_url** | **String** | SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url |
|
10
|
+
**schema_url** | **String** | SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url |
|
11
11
|
**traits** | [**Object**](.md) | |
|
12
12
|
**verifiable_addresses** | [**Array<VerifiableAddress>**](VerifiableAddress.md) | VerifiableAddresses contains all the addresses that can be verified by the user. | [optional]
|
13
13
|
|
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
|
+
|
@@ -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
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**context** | [**Object**](.md) | | [optional]
|
8
8
|
**id** | **Integer** | | [optional]
|
9
9
|
**text** | **String** | | [optional]
|
10
|
-
**type** | **String** |
|
10
|
+
**type** | **String** | The flow type can either be `api` or `browser`. | [optional]
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
data/docs/PublicApi.md
CHANGED
@@ -4,36 +4,43 @@ All URIs are relative to *http://localhost*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**
|
8
|
-
[**
|
9
|
-
[**
|
10
|
-
[**
|
11
|
-
[**
|
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
|
12
14
|
[**get_schema**](PublicApi.md#get_schema) | **GET** /schemas/{id} |
|
13
|
-
[**
|
14
|
-
[**
|
15
|
-
[**
|
16
|
-
[**
|
17
|
-
[**
|
18
|
-
[**
|
19
|
-
[**initialize_self_service_browser_login_flow**](PublicApi.md#initialize_self_service_browser_login_flow) | **GET** /self-service/browser/flows/login | Initialize browser-based login user flow
|
15
|
+
[**get_self_service_error**](PublicApi.md#get_self_service_error) | **GET** /self-service/errors | Get User-Facing Self-Service Errors
|
16
|
+
[**get_self_service_login_flow**](PublicApi.md#get_self_service_login_flow) | **GET** /self-service/login/flows | Get Login Flow
|
17
|
+
[**get_self_service_recovery_flow**](PublicApi.md#get_self_service_recovery_flow) | **GET** /self-service/recovery/flows | Get information about a recovery flow
|
18
|
+
[**get_self_service_registration_flow**](PublicApi.md#get_self_service_registration_flow) | **GET** /self-service/registration/flows | Get Registration Flow
|
19
|
+
[**get_self_service_settings_flow**](PublicApi.md#get_self_service_settings_flow) | **GET** /self-service/settings/flows | Get Settings Flow
|
20
|
+
[**get_self_service_verification_flow**](PublicApi.md#get_self_service_verification_flow) | **GET** /self-service/verification/flows | Get Verification Flow
|
20
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
|
21
|
-
[**
|
22
|
-
[**
|
23
|
-
[**
|
24
|
-
[**
|
25
|
-
[**
|
26
|
-
[**
|
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
|
27
34
|
|
28
35
|
|
29
36
|
|
30
|
-
##
|
37
|
+
## complete_self_service_browser_settings_oidc_settings_flow
|
31
38
|
|
32
|
-
>
|
39
|
+
> complete_self_service_browser_settings_oidc_settings_flow
|
33
40
|
|
34
|
-
Complete the
|
41
|
+
Complete the Browser-Based Settings Flow for the OpenID Connect Strategy
|
35
42
|
|
36
|
-
> 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
|
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).
|
37
44
|
|
38
45
|
### Example
|
39
46
|
|
@@ -44,10 +51,10 @@ require 'ory-kratos-client'
|
|
44
51
|
api_instance = OryHydraClient::PublicApi.new
|
45
52
|
|
46
53
|
begin
|
47
|
-
#Complete the
|
48
|
-
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
|
49
56
|
rescue OryHydraClient::ApiError => e
|
50
|
-
puts "Exception when calling PublicApi->
|
57
|
+
puts "Exception when calling PublicApi->complete_self_service_browser_settings_oidc_settings_flow: #{e}"
|
51
58
|
end
|
52
59
|
```
|
53
60
|
|
@@ -69,13 +76,13 @@ No authorization required
|
|
69
76
|
- **Accept**: application/json
|
70
77
|
|
71
78
|
|
72
|
-
##
|
79
|
+
## complete_self_service_login_flow_with_password_method
|
73
80
|
|
74
|
-
>
|
81
|
+
> LoginViaApiResponse complete_self_service_login_flow_with_password_method(flow, opts)
|
75
82
|
|
76
|
-
Complete
|
83
|
+
Complete Login Flow with Username/Email Password Method
|
77
84
|
|
78
|
-
|
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).
|
79
86
|
|
80
87
|
### Example
|
81
88
|
|
@@ -84,22 +91,31 @@ This endpoint completes a browser-based settings flow. This is usually achieved
|
|
84
91
|
require 'ory-kratos-client'
|
85
92
|
|
86
93
|
api_instance = OryHydraClient::PublicApi.new
|
94
|
+
flow = 'flow_example' # String | The Flow ID
|
95
|
+
opts = {
|
96
|
+
body: OryHydraClient::CompleteSelfServiceLoginFlowWithPasswordMethod.new # CompleteSelfServiceLoginFlowWithPasswordMethod |
|
97
|
+
}
|
87
98
|
|
88
99
|
begin
|
89
|
-
#Complete
|
90
|
-
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
|
91
103
|
rescue OryHydraClient::ApiError => e
|
92
|
-
puts "Exception when calling PublicApi->
|
104
|
+
puts "Exception when calling PublicApi->complete_self_service_login_flow_with_password_method: #{e}"
|
93
105
|
end
|
94
106
|
```
|
95
107
|
|
96
108
|
### Parameters
|
97
109
|
|
98
|
-
|
110
|
+
|
111
|
+
Name | Type | Description | Notes
|
112
|
+
------------- | ------------- | ------------- | -------------
|
113
|
+
**flow** | **String**| The Flow ID |
|
114
|
+
**body** | [**CompleteSelfServiceLoginFlowWithPasswordMethod**](CompleteSelfServiceLoginFlowWithPasswordMethod.md)| | [optional]
|
99
115
|
|
100
116
|
### Return type
|
101
117
|
|
102
|
-
|
118
|
+
[**LoginViaApiResponse**](LoginViaApiResponse.md)
|
103
119
|
|
104
120
|
### Authorization
|
105
121
|
|
@@ -107,17 +123,17 @@ No authorization required
|
|
107
123
|
|
108
124
|
### HTTP request headers
|
109
125
|
|
110
|
-
- **Content-Type**:
|
126
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
111
127
|
- **Accept**: application/json
|
112
128
|
|
113
129
|
|
114
|
-
##
|
130
|
+
## complete_self_service_recovery_flow_with_link_method
|
115
131
|
|
116
|
-
>
|
132
|
+
> complete_self_service_recovery_flow_with_link_method(opts)
|
117
133
|
|
118
|
-
Complete
|
134
|
+
Complete Recovery Flow with Link Method
|
119
135
|
|
120
|
-
|
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).
|
121
137
|
|
122
138
|
### Example
|
123
139
|
|
@@ -126,18 +142,28 @@ This endpoint completes a browser-based settings flow. This is usually achieved
|
|
126
142
|
require 'ory-kratos-client'
|
127
143
|
|
128
144
|
api_instance = OryHydraClient::PublicApi.new
|
145
|
+
opts = {
|
146
|
+
token: 'token_example', # String | Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user.
|
147
|
+
flow: 'flow_example', # String | The Flow ID format: uuid
|
148
|
+
body: OryHydraClient::CompleteSelfServiceRecoveryFlowWithLinkMethod.new # CompleteSelfServiceRecoveryFlowWithLinkMethod |
|
149
|
+
}
|
129
150
|
|
130
151
|
begin
|
131
|
-
#Complete
|
132
|
-
api_instance.
|
152
|
+
#Complete Recovery Flow with Link Method
|
153
|
+
api_instance.complete_self_service_recovery_flow_with_link_method(opts)
|
133
154
|
rescue OryHydraClient::ApiError => e
|
134
|
-
puts "Exception when calling PublicApi->
|
155
|
+
puts "Exception when calling PublicApi->complete_self_service_recovery_flow_with_link_method: #{e}"
|
135
156
|
end
|
136
157
|
```
|
137
158
|
|
138
159
|
### Parameters
|
139
160
|
|
140
|
-
|
161
|
+
|
162
|
+
Name | Type | Description | Notes
|
163
|
+
------------- | ------------- | ------------- | -------------
|
164
|
+
**token** | **String**| Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. | [optional]
|
165
|
+
**flow** | **String**| The Flow ID format: uuid | [optional]
|
166
|
+
**body** | [**CompleteSelfServiceRecoveryFlowWithLinkMethod**](CompleteSelfServiceRecoveryFlowWithLinkMethod.md)| | [optional]
|
141
167
|
|
142
168
|
### Return type
|
143
169
|
|
@@ -149,17 +175,17 @@ No authorization required
|
|
149
175
|
|
150
176
|
### HTTP request headers
|
151
177
|
|
152
|
-
- **Content-Type**:
|
178
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
153
179
|
- **Accept**: application/json
|
154
180
|
|
155
181
|
|
156
|
-
##
|
182
|
+
## complete_self_service_registration_flow_with_password_method
|
157
183
|
|
158
|
-
>
|
184
|
+
> RegistrationViaApiResponse complete_self_service_registration_flow_with_password_method(opts)
|
159
185
|
|
160
|
-
Complete
|
186
|
+
Complete Registration Flow with Username/Email Password Method
|
161
187
|
|
162
|
-
|
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).
|
163
189
|
|
164
190
|
### Example
|
165
191
|
|
@@ -168,14 +194,17 @@ This endpoint completes a browser-based settings flow. This is usually achieved
|
|
168
194
|
require 'ory-kratos-client'
|
169
195
|
|
170
196
|
api_instance = OryHydraClient::PublicApi.new
|
171
|
-
|
172
|
-
|
197
|
+
opts = {
|
198
|
+
flow: 'flow_example', # String | Flow is flow ID.
|
199
|
+
payload: nil # Object |
|
200
|
+
}
|
173
201
|
|
174
202
|
begin
|
175
|
-
#Complete
|
176
|
-
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
|
177
206
|
rescue OryHydraClient::ApiError => e
|
178
|
-
puts "Exception when calling PublicApi->
|
207
|
+
puts "Exception when calling PublicApi->complete_self_service_registration_flow_with_password_method: #{e}"
|
179
208
|
end
|
180
209
|
```
|
181
210
|
|
@@ -184,12 +213,12 @@ end
|
|
184
213
|
|
185
214
|
Name | Type | Description | Notes
|
186
215
|
------------- | ------------- | ------------- | -------------
|
187
|
-
**
|
188
|
-
**
|
216
|
+
**flow** | **String**| Flow is flow ID. | [optional]
|
217
|
+
**payload** | **Object**| | [optional]
|
189
218
|
|
190
219
|
### Return type
|
191
220
|
|
192
|
-
|
221
|
+
[**RegistrationViaApiResponse**](RegistrationViaApiResponse.md)
|
193
222
|
|
194
223
|
### Authorization
|
195
224
|
|
@@ -201,13 +230,129 @@ No authorization required
|
|
201
230
|
- **Accept**: application/json
|
202
231
|
|
203
232
|
|
204
|
-
##
|
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
|
205
350
|
|
206
|
-
>
|
351
|
+
> complete_self_service_verification_flow_with_link_method(opts)
|
207
352
|
|
208
|
-
Complete
|
353
|
+
Complete Verification Flow with Link Method
|
209
354
|
|
210
|
-
|
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).
|
211
356
|
|
212
357
|
### Example
|
213
358
|
|
@@ -216,14 +361,17 @@ This endpoint completes a browser-based verification flow. This is usually achie
|
|
216
361
|
require 'ory-kratos-client'
|
217
362
|
|
218
363
|
api_instance = OryHydraClient::PublicApi.new
|
219
|
-
|
220
|
-
|
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
|
+
}
|
221
369
|
|
222
370
|
begin
|
223
|
-
#Complete
|
224
|
-
api_instance.
|
371
|
+
#Complete Verification Flow with Link Method
|
372
|
+
api_instance.complete_self_service_verification_flow_with_link_method(opts)
|
225
373
|
rescue OryHydraClient::ApiError => e
|
226
|
-
puts "Exception when calling PublicApi->
|
374
|
+
puts "Exception when calling PublicApi->complete_self_service_verification_flow_with_link_method: #{e}"
|
227
375
|
end
|
228
376
|
```
|
229
377
|
|
@@ -232,8 +380,9 @@ end
|
|
232
380
|
|
233
381
|
Name | Type | Description | Notes
|
234
382
|
------------- | ------------- | ------------- | -------------
|
235
|
-
**
|
236
|
-
**
|
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]
|
237
386
|
|
238
387
|
### Return type
|
239
388
|
|
@@ -245,7 +394,7 @@ No authorization required
|
|
245
394
|
|
246
395
|
### HTTP request headers
|
247
396
|
|
248
|
-
- **Content-Type**:
|
397
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
249
398
|
- **Accept**: application/json
|
250
399
|
|
251
400
|
|
@@ -255,7 +404,7 @@ No authorization required
|
|
255
404
|
|
256
405
|
|
257
406
|
|
258
|
-
Get a
|
407
|
+
Get a Traits Schema Definition
|
259
408
|
|
260
409
|
### Example
|
261
410
|
|
@@ -295,13 +444,13 @@ No authorization required
|
|
295
444
|
- **Accept**: application/json
|
296
445
|
|
297
446
|
|
298
|
-
##
|
447
|
+
## get_self_service_error
|
299
448
|
|
300
|
-
>
|
449
|
+
> ErrorContainer get_self_service_error(error)
|
301
450
|
|
302
|
-
Get
|
451
|
+
Get User-Facing Self-Service Errors
|
303
452
|
|
304
|
-
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).
|
305
454
|
|
306
455
|
### Example
|
307
456
|
|
@@ -310,14 +459,14 @@ This endpoint returns a login request's context with, for example, error details
|
|
310
459
|
require 'ory-kratos-client'
|
311
460
|
|
312
461
|
api_instance = OryHydraClient::PublicApi.new
|
313
|
-
|
462
|
+
error = 'error_example' # String | Error is the container's ID
|
314
463
|
|
315
464
|
begin
|
316
|
-
#Get
|
317
|
-
result = api_instance.
|
465
|
+
#Get User-Facing Self-Service Errors
|
466
|
+
result = api_instance.get_self_service_error(error)
|
318
467
|
p result
|
319
468
|
rescue OryHydraClient::ApiError => e
|
320
|
-
puts "Exception when calling PublicApi->
|
469
|
+
puts "Exception when calling PublicApi->get_self_service_error: #{e}"
|
321
470
|
end
|
322
471
|
```
|
323
472
|
|
@@ -326,11 +475,11 @@ end
|
|
326
475
|
|
327
476
|
Name | Type | Description | Notes
|
328
477
|
------------- | ------------- | ------------- | -------------
|
329
|
-
**
|
478
|
+
**error** | **String**| Error is the container's ID |
|
330
479
|
|
331
480
|
### Return type
|
332
481
|
|
333
|
-
[**
|
482
|
+
[**ErrorContainer**](ErrorContainer.md)
|
334
483
|
|
335
484
|
### Authorization
|
336
485
|
|
@@ -342,13 +491,13 @@ No authorization required
|
|
342
491
|
- **Accept**: application/json
|
343
492
|
|
344
493
|
|
345
|
-
##
|
494
|
+
## get_self_service_login_flow
|
346
495
|
|
347
|
-
>
|
496
|
+
> LoginFlow get_self_service_login_flow(id)
|
348
497
|
|
349
|
-
Get
|
498
|
+
Get Login Flow
|
350
499
|
|
351
|
-
|
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).
|
352
501
|
|
353
502
|
### Example
|
354
503
|
|
@@ -357,14 +506,14 @@ When accessing this endpoint through ORY Kratos' Public API, ensure that cookies
|
|
357
506
|
require 'ory-kratos-client'
|
358
507
|
|
359
508
|
api_instance = OryHydraClient::PublicApi.new
|
360
|
-
|
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`).
|
361
510
|
|
362
511
|
begin
|
363
|
-
#Get
|
364
|
-
result = api_instance.
|
512
|
+
#Get Login Flow
|
513
|
+
result = api_instance.get_self_service_login_flow(id)
|
365
514
|
p result
|
366
515
|
rescue OryHydraClient::ApiError => e
|
367
|
-
puts "Exception when calling PublicApi->
|
516
|
+
puts "Exception when calling PublicApi->get_self_service_login_flow: #{e}"
|
368
517
|
end
|
369
518
|
```
|
370
519
|
|
@@ -373,11 +522,11 @@ end
|
|
373
522
|
|
374
523
|
Name | Type | Description | Notes
|
375
524
|
------------- | ------------- | ------------- | -------------
|
376
|
-
**
|
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`). |
|
377
526
|
|
378
527
|
### Return type
|
379
528
|
|
380
|
-
[**
|
529
|
+
[**LoginFlow**](LoginFlow.md)
|
381
530
|
|
382
531
|
### Authorization
|
383
532
|
|
@@ -389,13 +538,13 @@ No authorization required
|
|
389
538
|
- **Accept**: application/json
|
390
539
|
|
391
540
|
|
392
|
-
##
|
541
|
+
## get_self_service_recovery_flow
|
393
542
|
|
394
|
-
>
|
543
|
+
> RecoveryFlow get_self_service_recovery_flow(id)
|
395
544
|
|
396
|
-
Get
|
545
|
+
Get information about a recovery flow
|
397
546
|
|
398
|
-
This endpoint returns a
|
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).
|
399
548
|
|
400
549
|
### Example
|
401
550
|
|
@@ -404,14 +553,14 @@ This endpoint returns a registration request's context with, for example, error
|
|
404
553
|
require 'ory-kratos-client'
|
405
554
|
|
406
555
|
api_instance = OryHydraClient::PublicApi.new
|
407
|
-
|
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`).
|
408
557
|
|
409
558
|
begin
|
410
|
-
#Get
|
411
|
-
result = api_instance.
|
559
|
+
#Get information about a recovery flow
|
560
|
+
result = api_instance.get_self_service_recovery_flow(id)
|
412
561
|
p result
|
413
562
|
rescue OryHydraClient::ApiError => e
|
414
|
-
puts "Exception when calling PublicApi->
|
563
|
+
puts "Exception when calling PublicApi->get_self_service_recovery_flow: #{e}"
|
415
564
|
end
|
416
565
|
```
|
417
566
|
|
@@ -420,11 +569,11 @@ end
|
|
420
569
|
|
421
570
|
Name | Type | Description | Notes
|
422
571
|
------------- | ------------- | ------------- | -------------
|
423
|
-
**
|
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`). |
|
424
573
|
|
425
574
|
### Return type
|
426
575
|
|
427
|
-
[**
|
576
|
+
[**RecoveryFlow**](RecoveryFlow.md)
|
428
577
|
|
429
578
|
### Authorization
|
430
579
|
|
@@ -436,13 +585,13 @@ No authorization required
|
|
436
585
|
- **Accept**: application/json
|
437
586
|
|
438
587
|
|
439
|
-
##
|
588
|
+
## get_self_service_registration_flow
|
440
589
|
|
441
|
-
>
|
590
|
+
> RegistrationFlow get_self_service_registration_flow(id)
|
442
591
|
|
443
|
-
Get
|
592
|
+
Get Registration Flow
|
444
593
|
|
445
|
-
|
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).
|
446
595
|
|
447
596
|
### Example
|
448
597
|
|
@@ -451,14 +600,14 @@ When accessing this endpoint through ORY Kratos' Public API, ensure that cookies
|
|
451
600
|
require 'ory-kratos-client'
|
452
601
|
|
453
602
|
api_instance = OryHydraClient::PublicApi.new
|
454
|
-
|
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`).
|
455
604
|
|
456
605
|
begin
|
457
|
-
#Get
|
458
|
-
result = api_instance.
|
606
|
+
#Get Registration Flow
|
607
|
+
result = api_instance.get_self_service_registration_flow(id)
|
459
608
|
p result
|
460
609
|
rescue OryHydraClient::ApiError => e
|
461
|
-
puts "Exception when calling PublicApi->
|
610
|
+
puts "Exception when calling PublicApi->get_self_service_registration_flow: #{e}"
|
462
611
|
end
|
463
612
|
```
|
464
613
|
|
@@ -467,11 +616,11 @@ end
|
|
467
616
|
|
468
617
|
Name | Type | Description | Notes
|
469
618
|
------------- | ------------- | ------------- | -------------
|
470
|
-
**
|
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`). |
|
471
620
|
|
472
621
|
### Return type
|
473
622
|
|
474
|
-
[**
|
623
|
+
[**RegistrationFlow**](RegistrationFlow.md)
|
475
624
|
|
476
625
|
### Authorization
|
477
626
|
|
@@ -483,31 +632,36 @@ No authorization required
|
|
483
632
|
- **Accept**: application/json
|
484
633
|
|
485
634
|
|
486
|
-
##
|
635
|
+
## get_self_service_settings_flow
|
487
636
|
|
488
|
-
>
|
637
|
+
> SettingsFlow get_self_service_settings_flow(id)
|
489
638
|
|
490
|
-
Get
|
639
|
+
Get Settings Flow
|
491
640
|
|
492
|
-
|
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).
|
493
642
|
|
494
643
|
### Example
|
495
644
|
|
496
645
|
```ruby
|
497
646
|
# load the gem
|
498
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
|
499
655
|
|
500
656
|
api_instance = OryHydraClient::PublicApi.new
|
501
|
-
|
502
|
-
error: 'error_example' # String |
|
503
|
-
}
|
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`).
|
504
658
|
|
505
659
|
begin
|
506
|
-
#Get
|
507
|
-
result = api_instance.
|
660
|
+
#Get Settings Flow
|
661
|
+
result = api_instance.get_self_service_settings_flow(id)
|
508
662
|
p result
|
509
663
|
rescue OryHydraClient::ApiError => e
|
510
|
-
puts "Exception when calling PublicApi->
|
664
|
+
puts "Exception when calling PublicApi->get_self_service_settings_flow: #{e}"
|
511
665
|
end
|
512
666
|
```
|
513
667
|
|
@@ -516,15 +670,15 @@ end
|
|
516
670
|
|
517
671
|
Name | Type | Description | Notes
|
518
672
|
------------- | ------------- | ------------- | -------------
|
519
|
-
**
|
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`). |
|
520
674
|
|
521
675
|
### Return type
|
522
676
|
|
523
|
-
[**
|
677
|
+
[**SettingsFlow**](SettingsFlow.md)
|
524
678
|
|
525
679
|
### Authorization
|
526
680
|
|
527
|
-
|
681
|
+
[sessionToken](../README.md#sessionToken)
|
528
682
|
|
529
683
|
### HTTP request headers
|
530
684
|
|
@@ -532,13 +686,13 @@ No authorization required
|
|
532
686
|
- **Accept**: application/json
|
533
687
|
|
534
688
|
|
535
|
-
##
|
689
|
+
## get_self_service_verification_flow
|
536
690
|
|
537
|
-
>
|
691
|
+
> VerificationFlow get_self_service_verification_flow(id)
|
538
692
|
|
539
|
-
Get
|
693
|
+
Get Verification Flow
|
540
694
|
|
541
|
-
|
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).
|
542
696
|
|
543
697
|
### Example
|
544
698
|
|
@@ -547,14 +701,14 @@ When accessing this endpoint through ORY Kratos' Public API, ensure that cookies
|
|
547
701
|
require 'ory-kratos-client'
|
548
702
|
|
549
703
|
api_instance = OryHydraClient::PublicApi.new
|
550
|
-
|
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`).
|
551
705
|
|
552
706
|
begin
|
553
|
-
#Get
|
554
|
-
result = api_instance.
|
707
|
+
#Get Verification Flow
|
708
|
+
result = api_instance.get_self_service_verification_flow(id)
|
555
709
|
p result
|
556
710
|
rescue OryHydraClient::ApiError => e
|
557
|
-
puts "Exception when calling PublicApi->
|
711
|
+
puts "Exception when calling PublicApi->get_self_service_verification_flow: #{e}"
|
558
712
|
end
|
559
713
|
```
|
560
714
|
|
@@ -563,11 +717,11 @@ end
|
|
563
717
|
|
564
718
|
Name | Type | Description | Notes
|
565
719
|
------------- | ------------- | ------------- | -------------
|
566
|
-
**
|
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`). |
|
567
721
|
|
568
722
|
### Return type
|
569
723
|
|
570
|
-
[**
|
724
|
+
[**VerificationFlow**](VerificationFlow.md)
|
571
725
|
|
572
726
|
### Authorization
|
573
727
|
|
@@ -579,13 +733,55 @@ No authorization required
|
|
579
733
|
- **Accept**: application/json
|
580
734
|
|
581
735
|
|
582
|
-
##
|
736
|
+
## initialize_self_service_browser_logout_flow
|
583
737
|
|
584
|
-
>
|
738
|
+
> initialize_self_service_browser_logout_flow
|
585
739
|
|
586
|
-
Initialize
|
740
|
+
Initialize Browser-Based Logout User Flow
|
587
741
|
|
588
|
-
This endpoint initializes a
|
742
|
+
This endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, the browser will be redirected (HTTP 302 Found) to `urls.default_return_to`. More information can be found at [ORY Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
|
743
|
+
|
744
|
+
### Example
|
745
|
+
|
746
|
+
```ruby
|
747
|
+
# load the gem
|
748
|
+
require 'ory-kratos-client'
|
749
|
+
|
750
|
+
api_instance = OryHydraClient::PublicApi.new
|
751
|
+
|
752
|
+
begin
|
753
|
+
#Initialize Browser-Based Logout User Flow
|
754
|
+
api_instance.initialize_self_service_browser_logout_flow
|
755
|
+
rescue OryHydraClient::ApiError => e
|
756
|
+
puts "Exception when calling PublicApi->initialize_self_service_browser_logout_flow: #{e}"
|
757
|
+
end
|
758
|
+
```
|
759
|
+
|
760
|
+
### Parameters
|
761
|
+
|
762
|
+
This endpoint does not need any parameter.
|
763
|
+
|
764
|
+
### Return type
|
765
|
+
|
766
|
+
nil (empty response body)
|
767
|
+
|
768
|
+
### Authorization
|
769
|
+
|
770
|
+
No authorization required
|
771
|
+
|
772
|
+
### HTTP request headers
|
773
|
+
|
774
|
+
- **Content-Type**: Not defined
|
775
|
+
- **Accept**: application/json
|
776
|
+
|
777
|
+
|
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).
|
589
785
|
|
590
786
|
### Example
|
591
787
|
|
@@ -599,10 +795,11 @@ opts = {
|
|
599
795
|
}
|
600
796
|
|
601
797
|
begin
|
602
|
-
#Initialize
|
603
|
-
api_instance.
|
798
|
+
#Initialize Login Flow for API clients
|
799
|
+
result = api_instance.initialize_self_service_login_via_api_flow(opts)
|
800
|
+
p result
|
604
801
|
rescue OryHydraClient::ApiError => e
|
605
|
-
puts "Exception when calling PublicApi->
|
802
|
+
puts "Exception when calling PublicApi->initialize_self_service_login_via_api_flow: #{e}"
|
606
803
|
end
|
607
804
|
```
|
608
805
|
|
@@ -615,7 +812,7 @@ Name | Type | Description | Notes
|
|
615
812
|
|
616
813
|
### Return type
|
617
814
|
|
618
|
-
|
815
|
+
[**LoginFlow**](LoginFlow.md)
|
619
816
|
|
620
817
|
### Authorization
|
621
818
|
|
@@ -627,13 +824,13 @@ No authorization required
|
|
627
824
|
- **Accept**: application/json
|
628
825
|
|
629
826
|
|
630
|
-
##
|
827
|
+
## initialize_self_service_login_via_browser_flow
|
631
828
|
|
632
|
-
>
|
829
|
+
> initialize_self_service_login_via_browser_flow
|
633
830
|
|
634
|
-
Initialize
|
831
|
+
Initialize Login Flow for browsers
|
635
832
|
|
636
|
-
This endpoint initializes a
|
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).
|
637
834
|
|
638
835
|
### Example
|
639
836
|
|
@@ -644,10 +841,10 @@ require 'ory-kratos-client'
|
|
644
841
|
api_instance = OryHydraClient::PublicApi.new
|
645
842
|
|
646
843
|
begin
|
647
|
-
#Initialize
|
648
|
-
api_instance.
|
844
|
+
#Initialize Login Flow for browsers
|
845
|
+
api_instance.initialize_self_service_login_via_browser_flow
|
649
846
|
rescue OryHydraClient::ApiError => e
|
650
|
-
puts "Exception when calling PublicApi->
|
847
|
+
puts "Exception when calling PublicApi->initialize_self_service_login_via_browser_flow: #{e}"
|
651
848
|
end
|
652
849
|
```
|
653
850
|
|
@@ -669,13 +866,56 @@ No authorization required
|
|
669
866
|
- **Accept**: application/json
|
670
867
|
|
671
868
|
|
672
|
-
##
|
869
|
+
## initialize_self_service_recovery_via_api_flow
|
870
|
+
|
871
|
+
> RecoveryFlow initialize_self_service_recovery_via_api_flow
|
872
|
+
|
873
|
+
Initialize Recovery Flow for API Clients
|
874
|
+
|
875
|
+
This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. :::warning You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). ::: More information can be found at [ORY Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
|
876
|
+
|
877
|
+
### Example
|
878
|
+
|
879
|
+
```ruby
|
880
|
+
# load the gem
|
881
|
+
require 'ory-kratos-client'
|
882
|
+
|
883
|
+
api_instance = OryHydraClient::PublicApi.new
|
884
|
+
|
885
|
+
begin
|
886
|
+
#Initialize Recovery Flow for API Clients
|
887
|
+
result = api_instance.initialize_self_service_recovery_via_api_flow
|
888
|
+
p result
|
889
|
+
rescue OryHydraClient::ApiError => e
|
890
|
+
puts "Exception when calling PublicApi->initialize_self_service_recovery_via_api_flow: #{e}"
|
891
|
+
end
|
892
|
+
```
|
893
|
+
|
894
|
+
### Parameters
|
895
|
+
|
896
|
+
This endpoint does not need any parameter.
|
897
|
+
|
898
|
+
### Return type
|
899
|
+
|
900
|
+
[**RecoveryFlow**](RecoveryFlow.md)
|
901
|
+
|
902
|
+
### Authorization
|
903
|
+
|
904
|
+
No authorization required
|
905
|
+
|
906
|
+
### HTTP request headers
|
907
|
+
|
908
|
+
- **Content-Type**: Not defined
|
909
|
+
- **Accept**: application/json
|
910
|
+
|
911
|
+
|
912
|
+
## initialize_self_service_recovery_via_browser_flow
|
673
913
|
|
674
|
-
>
|
914
|
+
> initialize_self_service_recovery_via_browser_flow
|
675
915
|
|
676
|
-
Initialize
|
916
|
+
Initialize Recovery Flow for Browser Clients
|
677
917
|
|
678
|
-
This endpoint initializes a browser-based
|
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).
|
679
919
|
|
680
920
|
### Example
|
681
921
|
|
@@ -686,10 +926,10 @@ require 'ory-kratos-client'
|
|
686
926
|
api_instance = OryHydraClient::PublicApi.new
|
687
927
|
|
688
928
|
begin
|
689
|
-
#Initialize
|
690
|
-
api_instance.
|
929
|
+
#Initialize Recovery Flow for Browser Clients
|
930
|
+
api_instance.initialize_self_service_recovery_via_browser_flow
|
691
931
|
rescue OryHydraClient::ApiError => e
|
692
|
-
puts "Exception when calling PublicApi->
|
932
|
+
puts "Exception when calling PublicApi->initialize_self_service_recovery_via_browser_flow: #{e}"
|
693
933
|
end
|
694
934
|
```
|
695
935
|
|
@@ -711,13 +951,13 @@ No authorization required
|
|
711
951
|
- **Accept**: application/json
|
712
952
|
|
713
953
|
|
714
|
-
##
|
954
|
+
## initialize_self_service_registration_via_api_flow
|
715
955
|
|
716
|
-
>
|
956
|
+
> RegistrationFlow initialize_self_service_registration_via_api_flow
|
717
957
|
|
718
|
-
Initialize
|
958
|
+
Initialize Registration Flow for API clients
|
719
959
|
|
720
|
-
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).
|
721
961
|
|
722
962
|
### Example
|
723
963
|
|
@@ -726,22 +966,61 @@ This endpoint initializes a browser-based verification flow. Once initialized, t
|
|
726
966
|
require 'ory-kratos-client'
|
727
967
|
|
728
968
|
api_instance = OryHydraClient::PublicApi.new
|
729
|
-
via = 'via_example' # String | What to verify Currently only \"email\" is supported.
|
730
969
|
|
731
970
|
begin
|
732
|
-
#Initialize
|
733
|
-
api_instance.
|
971
|
+
#Initialize Registration Flow for API clients
|
972
|
+
result = api_instance.initialize_self_service_registration_via_api_flow
|
973
|
+
p result
|
734
974
|
rescue OryHydraClient::ApiError => e
|
735
|
-
puts "Exception when calling PublicApi->
|
975
|
+
puts "Exception when calling PublicApi->initialize_self_service_registration_via_api_flow: #{e}"
|
736
976
|
end
|
737
977
|
```
|
738
978
|
|
739
979
|
### Parameters
|
740
980
|
|
981
|
+
This endpoint does not need any parameter.
|
741
982
|
|
742
|
-
|
743
|
-
|
744
|
-
|
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.
|
745
1024
|
|
746
1025
|
### Return type
|
747
1026
|
|
@@ -757,27 +1036,84 @@ No authorization required
|
|
757
1036
|
- **Accept**: application/json
|
758
1037
|
|
759
1038
|
|
760
|
-
##
|
1039
|
+
## initialize_self_service_settings_via_api_flow
|
761
1040
|
|
762
|
-
>
|
1041
|
+
> SettingsFlow initialize_self_service_settings_via_api_flow
|
763
1042
|
|
764
|
-
Initialize
|
1043
|
+
Initialize Settings Flow for API Clients
|
765
1044
|
|
766
|
-
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).
|
767
1046
|
|
768
1047
|
### Example
|
769
1048
|
|
770
1049
|
```ruby
|
771
1050
|
# load the gem
|
772
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
|
773
1059
|
|
774
1060
|
api_instance = OryHydraClient::PublicApi.new
|
775
1061
|
|
776
1062
|
begin
|
777
|
-
#Initialize
|
778
|
-
api_instance.
|
1063
|
+
#Initialize Settings Flow for API Clients
|
1064
|
+
result = api_instance.initialize_self_service_settings_via_api_flow
|
1065
|
+
p result
|
779
1066
|
rescue OryHydraClient::ApiError => e
|
780
|
-
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}"
|
781
1117
|
end
|
782
1118
|
```
|
783
1119
|
|
@@ -791,6 +1127,49 @@ nil (empty response body)
|
|
791
1127
|
|
792
1128
|
### Authorization
|
793
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
|
+
|
794
1173
|
No authorization required
|
795
1174
|
|
796
1175
|
### HTTP request headers
|
@@ -799,13 +1178,13 @@ No authorization required
|
|
799
1178
|
- **Accept**: application/json
|
800
1179
|
|
801
1180
|
|
802
|
-
##
|
1181
|
+
## initialize_self_service_verification_via_browser_flow
|
803
1182
|
|
804
|
-
>
|
1183
|
+
> initialize_self_service_verification_via_browser_flow
|
805
1184
|
|
806
|
-
Initialize
|
1185
|
+
Initialize Verification Flow for Browser Clients
|
807
1186
|
|
808
|
-
This endpoint initializes a browser-based
|
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).
|
809
1188
|
|
810
1189
|
### Example
|
811
1190
|
|
@@ -816,10 +1195,10 @@ require 'ory-kratos-client'
|
|
816
1195
|
api_instance = OryHydraClient::PublicApi.new
|
817
1196
|
|
818
1197
|
begin
|
819
|
-
#Initialize
|
820
|
-
api_instance.
|
1198
|
+
#Initialize Verification Flow for Browser Clients
|
1199
|
+
api_instance.initialize_self_service_verification_via_browser_flow
|
821
1200
|
rescue OryHydraClient::ApiError => e
|
822
|
-
puts "Exception when calling PublicApi->
|
1201
|
+
puts "Exception when calling PublicApi->initialize_self_service_verification_via_browser_flow: #{e}"
|
823
1202
|
end
|
824
1203
|
```
|
825
1204
|
|
@@ -841,13 +1220,13 @@ No authorization required
|
|
841
1220
|
- **Accept**: application/json
|
842
1221
|
|
843
1222
|
|
844
|
-
##
|
1223
|
+
## revoke_session
|
845
1224
|
|
846
|
-
>
|
1225
|
+
> revoke_session(body)
|
847
1226
|
|
848
|
-
|
1227
|
+
Revoke and Invalidate a Session
|
849
1228
|
|
850
|
-
|
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.
|
851
1230
|
|
852
1231
|
### Example
|
853
1232
|
|
@@ -856,14 +1235,13 @@ This endpoint completes a browser-based verification flow. > This endpoint is N
|
|
856
1235
|
require 'ory-kratos-client'
|
857
1236
|
|
858
1237
|
api_instance = OryHydraClient::PublicApi.new
|
859
|
-
|
860
|
-
via = 'via_example' # String | What to verify Currently only \"email\" is supported.
|
1238
|
+
body = OryHydraClient::RevokeSession.new # RevokeSession |
|
861
1239
|
|
862
1240
|
begin
|
863
|
-
#
|
864
|
-
api_instance.
|
1241
|
+
#Revoke and Invalidate a Session
|
1242
|
+
api_instance.revoke_session(body)
|
865
1243
|
rescue OryHydraClient::ApiError => e
|
866
|
-
puts "Exception when calling PublicApi->
|
1244
|
+
puts "Exception when calling PublicApi->revoke_session: #{e}"
|
867
1245
|
end
|
868
1246
|
```
|
869
1247
|
|
@@ -872,8 +1250,7 @@ end
|
|
872
1250
|
|
873
1251
|
Name | Type | Description | Notes
|
874
1252
|
------------- | ------------- | ------------- | -------------
|
875
|
-
**
|
876
|
-
**via** | **String**| What to verify Currently only \"email\" is supported. |
|
1253
|
+
**body** | [**RevokeSession**](RevokeSession.md)| |
|
877
1254
|
|
878
1255
|
### Return type
|
879
1256
|
|
@@ -885,15 +1262,15 @@ No authorization required
|
|
885
1262
|
|
886
1263
|
### HTTP request headers
|
887
1264
|
|
888
|
-
- **Content-Type**:
|
1265
|
+
- **Content-Type**: application/json
|
889
1266
|
- **Accept**: application/json
|
890
1267
|
|
891
1268
|
|
892
1269
|
## whoami
|
893
1270
|
|
894
|
-
> Session whoami
|
1271
|
+
> Session whoami(opts)
|
895
1272
|
|
896
|
-
Check
|
1273
|
+
Check Who the Current HTTP Session Belongs To
|
897
1274
|
|
898
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.
|
899
1276
|
|
@@ -902,12 +1279,23 @@ Uses the HTTP Headers in the GET request to determine (e.g. by using checking th
|
|
902
1279
|
```ruby
|
903
1280
|
# load the gem
|
904
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
|
905
1289
|
|
906
1290
|
api_instance = OryHydraClient::PublicApi.new
|
1291
|
+
opts = {
|
1292
|
+
cookie: 'cookie_example', # String |
|
1293
|
+
authorization: 'authorization_example' # String | in: authorization
|
1294
|
+
}
|
907
1295
|
|
908
1296
|
begin
|
909
|
-
#Check
|
910
|
-
result = api_instance.whoami
|
1297
|
+
#Check Who the Current HTTP Session Belongs To
|
1298
|
+
result = api_instance.whoami(opts)
|
911
1299
|
p result
|
912
1300
|
rescue OryHydraClient::ApiError => e
|
913
1301
|
puts "Exception when calling PublicApi->whoami: #{e}"
|
@@ -916,7 +1304,11 @@ end
|
|
916
1304
|
|
917
1305
|
### Parameters
|
918
1306
|
|
919
|
-
|
1307
|
+
|
1308
|
+
Name | Type | Description | Notes
|
1309
|
+
------------- | ------------- | ------------- | -------------
|
1310
|
+
**cookie** | **String**| | [optional]
|
1311
|
+
**authorization** | **String**| in: authorization | [optional]
|
920
1312
|
|
921
1313
|
### Return type
|
922
1314
|
|
@@ -924,7 +1316,7 @@ This endpoint does not need any parameter.
|
|
924
1316
|
|
925
1317
|
### Authorization
|
926
1318
|
|
927
|
-
|
1319
|
+
[sessionToken](../README.md#sessionToken)
|
928
1320
|
|
929
1321
|
### HTTP request headers
|
930
1322
|
|