ory-kratos-client 0.6.0.alpha17 → 0.7.0.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 -95
- data/docs/AdminApi.md +15 -13
- data/docs/AdminCreateIdentityBody.md +20 -0
- data/docs/AdminCreateSelfServiceRecoveryLinkBody.md +20 -0
- data/docs/AdminUpdateIdentityBody.md +22 -0
- data/docs/GenericError.md +14 -2
- data/docs/Identity.md +12 -4
- data/docs/IdentityCredentials.md +5 -1
- data/docs/JsonError.md +18 -0
- data/docs/LoginFlow.md +5 -1
- data/docs/MetadataApi.md +254 -0
- data/docs/PublicApi.md +216 -210
- data/docs/RecoveryAddress.md +4 -0
- data/docs/SelfServiceError.md +24 -0
- data/docs/SelfServiceErrorContainer.md +24 -0
- data/docs/SelfServiceLoginFlow.md +36 -0
- data/docs/SelfServiceLogoutUrl.md +18 -0
- data/docs/SelfServiceRecoveryFlow.md +32 -0
- data/docs/SelfServiceRecoveryFlowState.md +15 -0
- data/docs/SelfServiceRecoveryLink.md +20 -0
- data/docs/SelfServiceRegistrationFlow.md +30 -0
- data/docs/SelfServiceSettingsFlow.md +34 -0
- data/docs/SelfServiceSettingsFlowState.md +15 -0
- data/docs/SelfServiceVerificationFlow.md +32 -0
- data/docs/SelfServiceVerificationFlowState.md +15 -0
- data/docs/Session.md +4 -4
- data/docs/SubmitSelfServiceLoginFlowBody.md +76 -0
- data/docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md +24 -0
- data/docs/SubmitSelfServiceLogoutFlowWithoutBrowserBody.md +18 -0
- data/docs/SubmitSelfServiceRecoveryFlowBody.md +75 -0
- data/docs/SubmitSelfServiceRecoveryFlowWithLinkMethodBody.md +22 -0
- data/docs/SubmitSelfServiceRegistrationFlowBody.md +76 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md +22 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowBody.md +79 -0
- data/docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethodBody.md +22 -0
- data/docs/SubmitSelfServiceSettingsFlowWithProfileMethodBody.md +22 -0
- data/docs/SubmitSelfServiceVerificationFlowBody.md +75 -0
- data/docs/SubmitSelfServiceVerificationFlowWithLinkMethodBody.md +22 -0
- data/docs/SuccessfulSelfServiceLoginWithoutBrowser.md +20 -0
- data/docs/SuccessfulSelfServiceRegistrationWithoutBrowser.md +22 -0
- data/docs/SuccessfulSelfServiceSettingsWithoutBrowser.md +20 -0
- data/docs/UiNodeInputAttributes.md +1 -1
- data/docs/V0alpha1Api.md +2167 -0
- data/docs/VerifiableIdentityAddress.md +32 -0
- data/lib/ory-kratos-client.rb +37 -30
- data/lib/ory-kratos-client/api/admin_api.rb +7 -4
- data/lib/ory-kratos-client/api/metadata_api.rb +248 -0
- data/lib/ory-kratos-client/api/public_api.rb +171 -162
- data/lib/ory-kratos-client/api/v0alpha1_api.rb +2054 -0
- data/lib/ory-kratos-client/api_client.rb +1 -1
- data/lib/ory-kratos-client/api_error.rb +1 -1
- data/lib/ory-kratos-client/configuration.rb +9 -30
- data/lib/ory-kratos-client/models/admin_create_identity_body.rb +239 -0
- data/lib/ory-kratos-client/models/admin_create_self_service_recovery_link_body.rb +250 -0
- data/lib/ory-kratos-client/models/admin_update_identity_body.rb +245 -0
- data/lib/ory-kratos-client/models/authenticate_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_change_response_item.rb +1 -1
- data/lib/ory-kratos-client/models/container_create_created_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_top_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_update_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_wait_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_wait_ok_body_error.rb +1 -1
- data/lib/ory-kratos-client/models/create_identity.rb +1 -1
- data/lib/ory-kratos-client/models/create_recovery_link.rb +1 -1
- data/lib/ory-kratos-client/models/error_container.rb +1 -1
- data/lib/ory-kratos-client/models/error_response.rb +1 -1
- data/lib/ory-kratos-client/models/generic_error.rb +76 -9
- data/lib/ory-kratos-client/models/generic_error_payload.rb +1 -1
- data/lib/ory-kratos-client/models/graph_driver_data.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/id_response.rb +1 -1
- data/lib/ory-kratos-client/models/identity.rb +56 -15
- data/lib/ory-kratos-client/models/identity_credentials.rb +25 -5
- data/lib/ory-kratos-client/models/image_delete_response_item.rb +1 -1
- data/lib/ory-kratos-client/models/image_summary.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response200.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response2001.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response503.rb +1 -1
- data/lib/ory-kratos-client/models/json_error.rb +224 -0
- data/lib/ory-kratos-client/models/login_flow.rb +25 -5
- data/lib/ory-kratos-client/models/login_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/meta.rb +1 -1
- data/lib/ory-kratos-client/models/plugin.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_args.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_interface.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_linux.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_network.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_rootfs.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_user.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_device.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_env.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_interface_type.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_mount.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_settings.rb +1 -1
- data/lib/ory-kratos-client/models/port.rb +1 -1
- data/lib/ory-kratos-client/models/recovery_address.rb +22 -2
- data/lib/ory-kratos-client/models/recovery_flow.rb +1 -1
- data/lib/ory-kratos-client/models/recovery_link.rb +1 -1
- data/lib/ory-kratos-client/models/registration_flow.rb +1 -1
- data/lib/ory-kratos-client/models/registration_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/revoke_session.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_error.rb +252 -0
- data/lib/ory-kratos-client/models/self_service_error_container.rb +260 -0
- data/lib/ory-kratos-client/models/self_service_login_flow.rb +338 -0
- data/lib/ory-kratos-client/models/self_service_logout_url.rb +219 -0
- data/lib/ory-kratos-client/models/self_service_recovery_flow.rb +317 -0
- data/lib/ory-kratos-client/models/self_service_recovery_flow_state.rb +38 -0
- data/lib/ory-kratos-client/models/self_service_recovery_link.rb +234 -0
- data/lib/ory-kratos-client/models/self_service_registration_flow.rb +302 -0
- data/lib/ory-kratos-client/models/self_service_settings_flow.rb +331 -0
- data/lib/ory-kratos-client/models/self_service_settings_flow_state.rb +37 -0
- data/lib/ory-kratos-client/models/self_service_verification_flow.rb +307 -0
- data/lib/ory-kratos-client/models/self_service_verification_flow_state.rb +38 -0
- data/lib/ory-kratos-client/models/service_update_response.rb +1 -1
- data/lib/ory-kratos-client/models/session.rb +6 -16
- data/lib/ory-kratos-client/models/settings_flow.rb +1 -1
- data/lib/ory-kratos-client/models/settings_profile_form_config.rb +1 -1
- data/lib/ory-kratos-client/models/settings_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_browser_settings_oidc_flow_payload.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_password_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_password_method_body.rb +298 -0
- data/lib/ory-kratos-client/models/submit_self_service_logout_flow_without_browser_body.rb +225 -0
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_body.rb +53 -0
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_with_link_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_password_method.rb +22 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_password_method_body.rb +299 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_body.rb +56 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +255 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_password_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_password_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_profile_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_with_link_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_with_link_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/successful_self_service_login_without_browser.rb +234 -0
- data/lib/ory-kratos-client/models/successful_self_service_registration_without_browser.rb +243 -0
- data/lib/ory-kratos-client/models/successful_self_service_settings_without_browser.rb +238 -0
- data/lib/ory-kratos-client/models/ui_container.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_anchor_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_image_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_input_attributes.rb +4 -2
- data/lib/ory-kratos-client/models/ui_node_input_attributes_value.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_text_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_text.rb +1 -1
- data/lib/ory-kratos-client/models/update_identity.rb +1 -1
- data/lib/ory-kratos-client/models/verifiable_address.rb +1 -1
- data/lib/ory-kratos-client/models/verifiable_identity_address.rb +313 -0
- data/lib/ory-kratos-client/models/verification_flow.rb +1 -1
- data/lib/ory-kratos-client/models/version.rb +1 -1
- data/lib/ory-kratos-client/models/volume.rb +1 -1
- data/lib/ory-kratos-client/models/volume_usage_data.rb +1 -1
- data/lib/ory-kratos-client/version.rb +2 -2
- data/ory-kratos-client.gemspec +1 -1
- data/spec/api/metadata_api_spec.rb +79 -0
- data/spec/api/v0alpha1_api_spec.rb +429 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/admin_create_identity_body_spec.rb +40 -0
- data/spec/models/admin_create_self_service_recovery_link_body_spec.rb +40 -0
- data/spec/models/admin_update_identity_body_spec.rb +46 -0
- data/spec/models/json_error_spec.rb +34 -0
- data/spec/models/self_service_error_container_spec.rb +52 -0
- data/spec/models/self_service_error_spec.rb +52 -0
- data/spec/models/self_service_login_flow_spec.rb +88 -0
- data/spec/models/self_service_logout_url_spec.rb +34 -0
- data/spec/models/self_service_recovery_flow_spec.rb +76 -0
- data/spec/models/self_service_recovery_flow_state_spec.rb +28 -0
- data/spec/models/self_service_recovery_link_spec.rb +40 -0
- data/spec/models/self_service_registration_flow_spec.rb +70 -0
- data/spec/models/self_service_settings_flow_spec.rb +82 -0
- data/spec/models/self_service_settings_flow_state_spec.rb +28 -0
- data/spec/models/self_service_verification_flow_spec.rb +76 -0
- data/spec/models/self_service_verification_flow_state_spec.rb +28 -0
- data/spec/models/submit_self_service_login_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_login_flow_with_oidc_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_login_flow_with_password_method_body_spec.rb +56 -0
- data/spec/models/submit_self_service_logout_flow_without_browser_body_spec.rb +34 -0
- data/spec/models/submit_self_service_recovery_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_recovery_flow_with_link_method_body_spec.rb +50 -0
- data/spec/models/submit_self_service_registration_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_registration_flow_with_oidc_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_registration_flow_with_password_method_body_spec.rb +56 -0
- data/spec/models/submit_self_service_settings_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_settings_flow_with_oidc_method_body_spec.rb +52 -0
- data/spec/models/submit_self_service_settings_flow_with_password_method_body_spec.rb +50 -0
- data/spec/models/submit_self_service_settings_flow_with_profile_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_verification_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_verification_flow_with_link_method_body_spec.rb +50 -0
- data/spec/models/successful_self_service_login_without_browser_spec.rb +40 -0
- data/spec/models/successful_self_service_registration_without_browser_spec.rb +46 -0
- data/spec/models/successful_self_service_settings_without_browser_spec.rb +40 -0
- data/spec/models/verifiable_identity_address_spec.rb +76 -0
- data/spec/spec_helper.rb +1 -1
- metadata +150 -2
data/docs/Identity.md
CHANGED
@@ -4,13 +4,17 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **created_at** | **Time** | CreatedAt is a helper struct field for gobuffalo.pop. | [optional] |
|
8
|
+
| **credentials** | [**Hash<String, IdentityCredentials>**](IdentityCredentials.md) | Credentials represents all credentials that can be used for authenticating this identity. | [optional] |
|
7
9
|
| **id** | **String** | | |
|
8
10
|
| **recovery_addresses** | [**Array<RecoveryAddress>**](RecoveryAddress.md) | RecoveryAddresses contains all the addresses that can be used to recover an identity. | [optional] |
|
9
11
|
| **schema_id** | **String** | SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. | |
|
10
12
|
| **schema_url** | **String** | SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url | |
|
11
|
-
| **
|
12
|
-
| **
|
13
|
-
| **
|
13
|
+
| **state** | [**AnyType**](.md) | State is the identity's state. | |
|
14
|
+
| **state_changed_at** | **Time** | | [optional] |
|
15
|
+
| **traits** | [**AnyType**](.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`. | |
|
16
|
+
| **updated_at** | **Time** | UpdatedAt is a helper struct field for gobuffalo.pop. | [optional] |
|
17
|
+
| **verifiable_addresses** | [**Array<VerifiableIdentityAddress>**](VerifiableIdentityAddress.md) | VerifiableAddresses contains all the addresses that can be verified by the user. | [optional] |
|
14
18
|
|
15
19
|
## Example
|
16
20
|
|
@@ -18,12 +22,16 @@
|
|
18
22
|
require 'ory-kratos-client'
|
19
23
|
|
20
24
|
instance = OryHydraClient::Identity.new(
|
25
|
+
created_at: null,
|
26
|
+
credentials: null,
|
21
27
|
id: null,
|
22
28
|
recovery_addresses: null,
|
23
29
|
schema_id: null,
|
24
30
|
schema_url: null,
|
31
|
+
state: null,
|
32
|
+
state_changed_at: null,
|
25
33
|
traits: null,
|
26
|
-
|
34
|
+
updated_at: null,
|
27
35
|
verifiable_addresses: null
|
28
36
|
)
|
29
37
|
```
|
data/docs/IdentityCredentials.md
CHANGED
@@ -5,8 +5,10 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **config** | **Object** | | [optional] |
|
8
|
+
| **created_at** | **Time** | CreatedAt is a helper struct field for gobuffalo.pop. | [optional] |
|
8
9
|
| **identifiers** | **Array<String>** | Identifiers represents a list of unique identifiers this credential type matches. | [optional] |
|
9
10
|
| **type** | **String** | and so on. | [optional] |
|
11
|
+
| **updated_at** | **Time** | UpdatedAt is a helper struct field for gobuffalo.pop. | [optional] |
|
10
12
|
|
11
13
|
## Example
|
12
14
|
|
@@ -15,8 +17,10 @@ require 'ory-kratos-client'
|
|
15
17
|
|
16
18
|
instance = OryHydraClient::IdentityCredentials.new(
|
17
19
|
config: null,
|
20
|
+
created_at: null,
|
18
21
|
identifiers: null,
|
19
|
-
type: null
|
22
|
+
type: null,
|
23
|
+
updated_at: null
|
20
24
|
)
|
21
25
|
```
|
22
26
|
|
data/docs/JsonError.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# OryHydraClient::JsonError
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **error** | [**GenericError**](GenericError.md) | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'ory-kratos-client'
|
13
|
+
|
14
|
+
instance = OryHydraClient::JsonError.new(
|
15
|
+
error: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/LoginFlow.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **active** | **String** | and so on. | [optional] |
|
8
|
+
| **created_at** | **Time** | CreatedAt is a helper struct field for gobuffalo.pop. | [optional] |
|
8
9
|
| **expires_at** | **Time** | 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
10
|
| **forced** | **Boolean** | Forced stores whether this login flow should enforce re-authentication. | [optional] |
|
10
11
|
| **id** | **String** | | |
|
@@ -12,6 +13,7 @@
|
|
12
13
|
| **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
14
|
| **type** | **String** | The flow type can either be `api` or `browser`. | |
|
14
15
|
| **ui** | [**UiContainer**](UiContainer.md) | | |
|
16
|
+
| **updated_at** | **Time** | UpdatedAt is a helper struct field for gobuffalo.pop. | [optional] |
|
15
17
|
|
16
18
|
## Example
|
17
19
|
|
@@ -20,13 +22,15 @@ require 'ory-kratos-client'
|
|
20
22
|
|
21
23
|
instance = OryHydraClient::LoginFlow.new(
|
22
24
|
active: null,
|
25
|
+
created_at: null,
|
23
26
|
expires_at: null,
|
24
27
|
forced: null,
|
25
28
|
id: null,
|
26
29
|
issued_at: null,
|
27
30
|
request_url: null,
|
28
31
|
type: null,
|
29
|
-
ui: null
|
32
|
+
ui: null,
|
33
|
+
updated_at: null
|
30
34
|
)
|
31
35
|
```
|
32
36
|
|
data/docs/MetadataApi.md
ADDED
@@ -0,0 +1,254 @@
|
|
1
|
+
# OryHydraClient::MetadataApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_version**](MetadataApi.md#get_version) | **GET** /version | Return Running Software Version. |
|
8
|
+
| [**is_alive**](MetadataApi.md#is_alive) | **GET** /health/alive | Check HTTP Server Status |
|
9
|
+
| [**is_ready**](MetadataApi.md#is_ready) | **GET** /health/ready | Check HTTP Server and Database Status |
|
10
|
+
| [**prometheus**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: |
|
11
|
+
|
12
|
+
|
13
|
+
## get_version
|
14
|
+
|
15
|
+
> <InlineResponse2001> get_version
|
16
|
+
|
17
|
+
Return Running Software Version.
|
18
|
+
|
19
|
+
This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
|
20
|
+
|
21
|
+
### Examples
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'time'
|
25
|
+
require 'ory-kratos-client'
|
26
|
+
|
27
|
+
api_instance = OryHydraClient::MetadataApi.new
|
28
|
+
|
29
|
+
begin
|
30
|
+
# Return Running Software Version.
|
31
|
+
result = api_instance.get_version
|
32
|
+
p result
|
33
|
+
rescue OryHydraClient::ApiError => e
|
34
|
+
puts "Error when calling MetadataApi->get_version: #{e}"
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Using the get_version_with_http_info variant
|
39
|
+
|
40
|
+
This returns an Array which contains the response data, status code and headers.
|
41
|
+
|
42
|
+
> <Array(<InlineResponse2001>, Integer, Hash)> get_version_with_http_info
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
begin
|
46
|
+
# Return Running Software Version.
|
47
|
+
data, status_code, headers = api_instance.get_version_with_http_info
|
48
|
+
p status_code # => 2xx
|
49
|
+
p headers # => { ... }
|
50
|
+
p data # => <InlineResponse2001>
|
51
|
+
rescue OryHydraClient::ApiError => e
|
52
|
+
puts "Error when calling MetadataApi->get_version_with_http_info: #{e}"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
### Parameters
|
57
|
+
|
58
|
+
This endpoint does not need any parameter.
|
59
|
+
|
60
|
+
### Return type
|
61
|
+
|
62
|
+
[**InlineResponse2001**](InlineResponse2001.md)
|
63
|
+
|
64
|
+
### Authorization
|
65
|
+
|
66
|
+
No authorization required
|
67
|
+
|
68
|
+
### HTTP request headers
|
69
|
+
|
70
|
+
- **Content-Type**: Not defined
|
71
|
+
- **Accept**: application/json
|
72
|
+
|
73
|
+
|
74
|
+
## is_alive
|
75
|
+
|
76
|
+
> <InlineResponse200> is_alive
|
77
|
+
|
78
|
+
Check HTTP Server Status
|
79
|
+
|
80
|
+
This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
81
|
+
|
82
|
+
### Examples
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
require 'time'
|
86
|
+
require 'ory-kratos-client'
|
87
|
+
|
88
|
+
api_instance = OryHydraClient::MetadataApi.new
|
89
|
+
|
90
|
+
begin
|
91
|
+
# Check HTTP Server Status
|
92
|
+
result = api_instance.is_alive
|
93
|
+
p result
|
94
|
+
rescue OryHydraClient::ApiError => e
|
95
|
+
puts "Error when calling MetadataApi->is_alive: #{e}"
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
#### Using the is_alive_with_http_info variant
|
100
|
+
|
101
|
+
This returns an Array which contains the response data, status code and headers.
|
102
|
+
|
103
|
+
> <Array(<InlineResponse200>, Integer, Hash)> is_alive_with_http_info
|
104
|
+
|
105
|
+
```ruby
|
106
|
+
begin
|
107
|
+
# Check HTTP Server Status
|
108
|
+
data, status_code, headers = api_instance.is_alive_with_http_info
|
109
|
+
p status_code # => 2xx
|
110
|
+
p headers # => { ... }
|
111
|
+
p data # => <InlineResponse200>
|
112
|
+
rescue OryHydraClient::ApiError => e
|
113
|
+
puts "Error when calling MetadataApi->is_alive_with_http_info: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
### Parameters
|
118
|
+
|
119
|
+
This endpoint does not need any parameter.
|
120
|
+
|
121
|
+
### Return type
|
122
|
+
|
123
|
+
[**InlineResponse200**](InlineResponse200.md)
|
124
|
+
|
125
|
+
### Authorization
|
126
|
+
|
127
|
+
No authorization required
|
128
|
+
|
129
|
+
### HTTP request headers
|
130
|
+
|
131
|
+
- **Content-Type**: Not defined
|
132
|
+
- **Accept**: application/json
|
133
|
+
|
134
|
+
|
135
|
+
## is_ready
|
136
|
+
|
137
|
+
> <InlineResponse200> is_ready
|
138
|
+
|
139
|
+
Check HTTP Server and Database Status
|
140
|
+
|
141
|
+
This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance.
|
142
|
+
|
143
|
+
### Examples
|
144
|
+
|
145
|
+
```ruby
|
146
|
+
require 'time'
|
147
|
+
require 'ory-kratos-client'
|
148
|
+
|
149
|
+
api_instance = OryHydraClient::MetadataApi.new
|
150
|
+
|
151
|
+
begin
|
152
|
+
# Check HTTP Server and Database Status
|
153
|
+
result = api_instance.is_ready
|
154
|
+
p result
|
155
|
+
rescue OryHydraClient::ApiError => e
|
156
|
+
puts "Error when calling MetadataApi->is_ready: #{e}"
|
157
|
+
end
|
158
|
+
```
|
159
|
+
|
160
|
+
#### Using the is_ready_with_http_info variant
|
161
|
+
|
162
|
+
This returns an Array which contains the response data, status code and headers.
|
163
|
+
|
164
|
+
> <Array(<InlineResponse200>, Integer, Hash)> is_ready_with_http_info
|
165
|
+
|
166
|
+
```ruby
|
167
|
+
begin
|
168
|
+
# Check HTTP Server and Database Status
|
169
|
+
data, status_code, headers = api_instance.is_ready_with_http_info
|
170
|
+
p status_code # => 2xx
|
171
|
+
p headers # => { ... }
|
172
|
+
p data # => <InlineResponse200>
|
173
|
+
rescue OryHydraClient::ApiError => e
|
174
|
+
puts "Error when calling MetadataApi->is_ready_with_http_info: #{e}"
|
175
|
+
end
|
176
|
+
```
|
177
|
+
|
178
|
+
### Parameters
|
179
|
+
|
180
|
+
This endpoint does not need any parameter.
|
181
|
+
|
182
|
+
### Return type
|
183
|
+
|
184
|
+
[**InlineResponse200**](InlineResponse200.md)
|
185
|
+
|
186
|
+
### Authorization
|
187
|
+
|
188
|
+
No authorization required
|
189
|
+
|
190
|
+
### HTTP request headers
|
191
|
+
|
192
|
+
- **Content-Type**: Not defined
|
193
|
+
- **Accept**: application/json
|
194
|
+
|
195
|
+
|
196
|
+
## prometheus
|
197
|
+
|
198
|
+
> prometheus
|
199
|
+
|
200
|
+
Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so:
|
201
|
+
|
202
|
+
``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ```
|
203
|
+
|
204
|
+
### Examples
|
205
|
+
|
206
|
+
```ruby
|
207
|
+
require 'time'
|
208
|
+
require 'ory-kratos-client'
|
209
|
+
|
210
|
+
api_instance = OryHydraClient::MetadataApi.new
|
211
|
+
|
212
|
+
begin
|
213
|
+
# Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so:
|
214
|
+
api_instance.prometheus
|
215
|
+
rescue OryHydraClient::ApiError => e
|
216
|
+
puts "Error when calling MetadataApi->prometheus: #{e}"
|
217
|
+
end
|
218
|
+
```
|
219
|
+
|
220
|
+
#### Using the prometheus_with_http_info variant
|
221
|
+
|
222
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
223
|
+
|
224
|
+
> <Array(nil, Integer, Hash)> prometheus_with_http_info
|
225
|
+
|
226
|
+
```ruby
|
227
|
+
begin
|
228
|
+
# Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so:
|
229
|
+
data, status_code, headers = api_instance.prometheus_with_http_info
|
230
|
+
p status_code # => 2xx
|
231
|
+
p headers # => { ... }
|
232
|
+
p data # => nil
|
233
|
+
rescue OryHydraClient::ApiError => e
|
234
|
+
puts "Error when calling MetadataApi->prometheus_with_http_info: #{e}"
|
235
|
+
end
|
236
|
+
```
|
237
|
+
|
238
|
+
### Parameters
|
239
|
+
|
240
|
+
This endpoint does not need any parameter.
|
241
|
+
|
242
|
+
### Return type
|
243
|
+
|
244
|
+
nil (empty response body)
|
245
|
+
|
246
|
+
### Authorization
|
247
|
+
|
248
|
+
No authorization required
|
249
|
+
|
250
|
+
### HTTP request headers
|
251
|
+
|
252
|
+
- **Content-Type**: Not defined
|
253
|
+
- **Accept**: Not defined
|
254
|
+
|
data/docs/PublicApi.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# OryHydraClient::PublicApi
|
2
2
|
|
3
|
-
All URIs are relative to *
|
3
|
+
All URIs are relative to *http://localhost*
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
@@ -12,16 +12,16 @@ All URIs are relative to *https://demo.tenants.oryapis.com/api/kratos/public*
|
|
12
12
|
| [**get_self_service_settings_flow**](PublicApi.md#get_self_service_settings_flow) | **GET** /self-service/settings/flows | Get Settings Flow |
|
13
13
|
| [**get_self_service_verification_flow**](PublicApi.md#get_self_service_verification_flow) | **GET** /self-service/verification/flows | Get Verification Flow |
|
14
14
|
| [**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 |
|
15
|
-
| [**
|
16
|
-
| [**
|
17
|
-
| [**
|
18
|
-
| [**
|
19
|
-
| [**
|
20
|
-
| [**
|
21
|
-
| [**
|
22
|
-
| [**
|
23
|
-
| [**
|
24
|
-
| [**
|
15
|
+
| [**initialize_self_service_login_for_browsers**](PublicApi.md#initialize_self_service_login_for_browsers) | **GET** /self-service/login/browser | Initialize Login Flow for browsers |
|
16
|
+
| [**initialize_self_service_login_for_native_apps**](PublicApi.md#initialize_self_service_login_for_native_apps) | **GET** /self-service/login/api | Initialize Login Flow for Native Apps and API clients |
|
17
|
+
| [**initialize_self_service_recovery_for_browsers**](PublicApi.md#initialize_self_service_recovery_for_browsers) | **GET** /self-service/recovery/browser | Initialize Recovery Flow for Browser Clients |
|
18
|
+
| [**initialize_self_service_recovery_for_native_apps**](PublicApi.md#initialize_self_service_recovery_for_native_apps) | **GET** /self-service/recovery/api | Initialize Recovery Flow for Native Apps and API clients |
|
19
|
+
| [**initialize_self_service_registration_for_browsers**](PublicApi.md#initialize_self_service_registration_for_browsers) | **GET** /self-service/registration/browser | Initialize Registration Flow for browsers |
|
20
|
+
| [**initialize_self_service_registration_for_native_apps**](PublicApi.md#initialize_self_service_registration_for_native_apps) | **GET** /self-service/registration/api | Initialize Registration Flow for Native Apps and API clients |
|
21
|
+
| [**initialize_self_service_settings_for_browsers**](PublicApi.md#initialize_self_service_settings_for_browsers) | **GET** /self-service/settings/browser | Initialize Settings Flow for Browsers |
|
22
|
+
| [**initialize_self_service_settings_for_native_apps**](PublicApi.md#initialize_self_service_settings_for_native_apps) | **GET** /self-service/settings/api | Initialize Settings Flow for Native Apps and API clients |
|
23
|
+
| [**initialize_self_service_verification_for_browsers**](PublicApi.md#initialize_self_service_verification_for_browsers) | **GET** /self-service/verification/browser | Initialize Verification Flow for Browser Clients |
|
24
|
+
| [**initialize_self_service_verification_for_native_apps**](PublicApi.md#initialize_self_service_verification_for_native_apps) | **GET** /self-service/verification/api | Initialize Verification Flow for Native Apps and API clients |
|
25
25
|
| [**revoke_session**](PublicApi.md#revoke_session) | **DELETE** /sessions | Initialize Logout Flow for API Clients - Revoke a Session |
|
26
26
|
| [**submit_self_service_login_flow**](PublicApi.md#submit_self_service_login_flow) | **POST** /self-service/login | Submit a Login Flow |
|
27
27
|
| [**submit_self_service_recovery_flow**](PublicApi.md#submit_self_service_recovery_flow) | **POST** /self-service/recovery | Complete Recovery Flow |
|
@@ -29,7 +29,7 @@ All URIs are relative to *https://demo.tenants.oryapis.com/api/kratos/public*
|
|
29
29
|
| [**submit_self_service_registration_flow**](PublicApi.md#submit_self_service_registration_flow) | **POST** /self-service/registration | Submit a Registration Flow |
|
30
30
|
| [**submit_self_service_settings_flow**](PublicApi.md#submit_self_service_settings_flow) | **POST** /self-service/settings | Complete Settings Flow |
|
31
31
|
| [**submit_self_service_verification_flow**](PublicApi.md#submit_self_service_verification_flow) | **POST** /self-service/verification/methods/link | Complete Verification Flow |
|
32
|
-
| [**
|
32
|
+
| [**to_session**](PublicApi.md#to_session) | **GET** /sessions/whoami | Check Who the Current HTTP Session Belongs To |
|
33
33
|
|
34
34
|
|
35
35
|
## get_schema
|
@@ -98,7 +98,7 @@ No authorization required
|
|
98
98
|
|
99
99
|
## get_self_service_error
|
100
100
|
|
101
|
-
> <
|
101
|
+
> <SelfServiceErrorContainer> get_self_service_error(error)
|
102
102
|
|
103
103
|
Get User-Facing Self-Service Errors
|
104
104
|
|
@@ -126,7 +126,7 @@ end
|
|
126
126
|
|
127
127
|
This returns an Array which contains the response data, status code and headers.
|
128
128
|
|
129
|
-
> <Array(<
|
129
|
+
> <Array(<SelfServiceErrorContainer>, Integer, Hash)> get_self_service_error_with_http_info(error)
|
130
130
|
|
131
131
|
```ruby
|
132
132
|
begin
|
@@ -134,7 +134,7 @@ begin
|
|
134
134
|
data, status_code, headers = api_instance.get_self_service_error_with_http_info(error)
|
135
135
|
p status_code # => 2xx
|
136
136
|
p headers # => { ... }
|
137
|
-
p data # => <
|
137
|
+
p data # => <SelfServiceErrorContainer>
|
138
138
|
rescue OryHydraClient::ApiError => e
|
139
139
|
puts "Error when calling PublicApi->get_self_service_error_with_http_info: #{e}"
|
140
140
|
end
|
@@ -148,7 +148,7 @@ end
|
|
148
148
|
|
149
149
|
### Return type
|
150
150
|
|
151
|
-
[**
|
151
|
+
[**SelfServiceErrorContainer**](SelfServiceErrorContainer.md)
|
152
152
|
|
153
153
|
### Authorization
|
154
154
|
|
@@ -354,7 +354,7 @@ No authorization required
|
|
354
354
|
|
355
355
|
## get_self_service_settings_flow
|
356
356
|
|
357
|
-
> <SettingsFlow> get_self_service_settings_flow(id)
|
357
|
+
> <SettingsFlow> get_self_service_settings_flow(id, opts)
|
358
358
|
|
359
359
|
Get Settings Flow
|
360
360
|
|
@@ -367,18 +367,19 @@ require 'time'
|
|
367
367
|
require 'ory-kratos-client'
|
368
368
|
# setup authorization
|
369
369
|
OryHydraClient.configure do |config|
|
370
|
-
# Configure
|
371
|
-
config.
|
372
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
373
|
-
# config.api_key_prefix['sessionToken'] = 'Bearer'
|
370
|
+
# Configure Bearer authorization: sessionToken
|
371
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
374
372
|
end
|
375
373
|
|
376
374
|
api_instance = OryHydraClient::PublicApi.new
|
377
375
|
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`).
|
376
|
+
opts = {
|
377
|
+
x_session_token: 'x_session_token_example' # String | The Session Token of the Identity performing the settings flow.
|
378
|
+
}
|
378
379
|
|
379
380
|
begin
|
380
381
|
# Get Settings Flow
|
381
|
-
result = api_instance.get_self_service_settings_flow(id)
|
382
|
+
result = api_instance.get_self_service_settings_flow(id, opts)
|
382
383
|
p result
|
383
384
|
rescue OryHydraClient::ApiError => e
|
384
385
|
puts "Error when calling PublicApi->get_self_service_settings_flow: #{e}"
|
@@ -389,12 +390,12 @@ end
|
|
389
390
|
|
390
391
|
This returns an Array which contains the response data, status code and headers.
|
391
392
|
|
392
|
-
> <Array(<SettingsFlow>, Integer, Hash)> get_self_service_settings_flow_with_http_info(id)
|
393
|
+
> <Array(<SettingsFlow>, Integer, Hash)> get_self_service_settings_flow_with_http_info(id, opts)
|
393
394
|
|
394
395
|
```ruby
|
395
396
|
begin
|
396
397
|
# Get Settings Flow
|
397
|
-
data, status_code, headers = api_instance.get_self_service_settings_flow_with_http_info(id)
|
398
|
+
data, status_code, headers = api_instance.get_self_service_settings_flow_with_http_info(id, opts)
|
398
399
|
p status_code # => 2xx
|
399
400
|
p headers # => { ... }
|
400
401
|
p data # => <SettingsFlow>
|
@@ -408,6 +409,7 @@ end
|
|
408
409
|
| Name | Type | Description | Notes |
|
409
410
|
| ---- | ---- | ----------- | ----- |
|
410
411
|
| **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`). | |
|
412
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
411
413
|
|
412
414
|
### Return type
|
413
415
|
|
@@ -547,13 +549,13 @@ No authorization required
|
|
547
549
|
- **Accept**: application/json
|
548
550
|
|
549
551
|
|
550
|
-
##
|
552
|
+
## initialize_self_service_login_for_browsers
|
551
553
|
|
552
|
-
>
|
554
|
+
> initialize_self_service_login_for_browsers(opts)
|
553
555
|
|
554
|
-
Initialize Login Flow for
|
556
|
+
Initialize Login Flow for browsers
|
555
557
|
|
556
|
-
This endpoint
|
558
|
+
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).
|
557
559
|
|
558
560
|
### Examples
|
559
561
|
|
@@ -567,29 +569,28 @@ opts = {
|
|
567
569
|
}
|
568
570
|
|
569
571
|
begin
|
570
|
-
# Initialize Login Flow for
|
571
|
-
|
572
|
-
p result
|
572
|
+
# Initialize Login Flow for browsers
|
573
|
+
api_instance.initialize_self_service_login_for_browsers(opts)
|
573
574
|
rescue OryHydraClient::ApiError => e
|
574
|
-
puts "Error when calling PublicApi->
|
575
|
+
puts "Error when calling PublicApi->initialize_self_service_login_for_browsers: #{e}"
|
575
576
|
end
|
576
577
|
```
|
577
578
|
|
578
|
-
#### Using the
|
579
|
+
#### Using the initialize_self_service_login_for_browsers_with_http_info variant
|
579
580
|
|
580
|
-
This returns an Array which contains the response data, status code and headers.
|
581
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
581
582
|
|
582
|
-
> <Array(
|
583
|
+
> <Array(nil, Integer, Hash)> initialize_self_service_login_for_browsers_with_http_info(opts)
|
583
584
|
|
584
585
|
```ruby
|
585
586
|
begin
|
586
|
-
# Initialize Login Flow for
|
587
|
-
data, status_code, headers = api_instance.
|
587
|
+
# Initialize Login Flow for browsers
|
588
|
+
data, status_code, headers = api_instance.initialize_self_service_login_for_browsers_with_http_info(opts)
|
588
589
|
p status_code # => 2xx
|
589
590
|
p headers # => { ... }
|
590
|
-
p data # =>
|
591
|
+
p data # => nil
|
591
592
|
rescue OryHydraClient::ApiError => e
|
592
|
-
puts "Error when calling PublicApi->
|
593
|
+
puts "Error when calling PublicApi->initialize_self_service_login_for_browsers_with_http_info: #{e}"
|
593
594
|
end
|
594
595
|
```
|
595
596
|
|
@@ -601,7 +602,7 @@ end
|
|
601
602
|
|
602
603
|
### Return type
|
603
604
|
|
604
|
-
|
605
|
+
nil (empty response body)
|
605
606
|
|
606
607
|
### Authorization
|
607
608
|
|
@@ -613,13 +614,13 @@ No authorization required
|
|
613
614
|
- **Accept**: application/json
|
614
615
|
|
615
616
|
|
616
|
-
##
|
617
|
+
## initialize_self_service_login_for_native_apps
|
617
618
|
|
618
|
-
>
|
619
|
+
> <LoginFlow> initialize_self_service_login_for_native_apps(opts)
|
619
620
|
|
620
|
-
Initialize Login Flow for
|
621
|
+
Initialize Login Flow for Native Apps and API clients
|
621
622
|
|
622
|
-
This endpoint
|
623
|
+
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).
|
623
624
|
|
624
625
|
### Examples
|
625
626
|
|
@@ -628,40 +629,46 @@ require 'time'
|
|
628
629
|
require 'ory-kratos-client'
|
629
630
|
|
630
631
|
api_instance = OryHydraClient::PublicApi.new
|
632
|
+
opts = {
|
633
|
+
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.
|
634
|
+
}
|
631
635
|
|
632
636
|
begin
|
633
|
-
# Initialize Login Flow for
|
634
|
-
api_instance.
|
637
|
+
# Initialize Login Flow for Native Apps and API clients
|
638
|
+
result = api_instance.initialize_self_service_login_for_native_apps(opts)
|
639
|
+
p result
|
635
640
|
rescue OryHydraClient::ApiError => e
|
636
|
-
puts "Error when calling PublicApi->
|
641
|
+
puts "Error when calling PublicApi->initialize_self_service_login_for_native_apps: #{e}"
|
637
642
|
end
|
638
643
|
```
|
639
644
|
|
640
|
-
#### Using the
|
645
|
+
#### Using the initialize_self_service_login_for_native_apps_with_http_info variant
|
641
646
|
|
642
|
-
This returns an Array which contains the response data
|
647
|
+
This returns an Array which contains the response data, status code and headers.
|
643
648
|
|
644
|
-
> <Array(
|
649
|
+
> <Array(<LoginFlow>, Integer, Hash)> initialize_self_service_login_for_native_apps_with_http_info(opts)
|
645
650
|
|
646
651
|
```ruby
|
647
652
|
begin
|
648
|
-
# Initialize Login Flow for
|
649
|
-
data, status_code, headers = api_instance.
|
653
|
+
# Initialize Login Flow for Native Apps and API clients
|
654
|
+
data, status_code, headers = api_instance.initialize_self_service_login_for_native_apps_with_http_info(opts)
|
650
655
|
p status_code # => 2xx
|
651
656
|
p headers # => { ... }
|
652
|
-
p data # =>
|
657
|
+
p data # => <LoginFlow>
|
653
658
|
rescue OryHydraClient::ApiError => e
|
654
|
-
puts "Error when calling PublicApi->
|
659
|
+
puts "Error when calling PublicApi->initialize_self_service_login_for_native_apps_with_http_info: #{e}"
|
655
660
|
end
|
656
661
|
```
|
657
662
|
|
658
663
|
### Parameters
|
659
664
|
|
660
|
-
|
665
|
+
| Name | Type | Description | Notes |
|
666
|
+
| ---- | ---- | ----------- | ----- |
|
667
|
+
| **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] |
|
661
668
|
|
662
669
|
### Return type
|
663
670
|
|
664
|
-
|
671
|
+
[**LoginFlow**](LoginFlow.md)
|
665
672
|
|
666
673
|
### Authorization
|
667
674
|
|
@@ -673,13 +680,13 @@ No authorization required
|
|
673
680
|
- **Accept**: application/json
|
674
681
|
|
675
682
|
|
676
|
-
##
|
683
|
+
## initialize_self_service_recovery_for_browsers
|
677
684
|
|
678
|
-
>
|
685
|
+
> initialize_self_service_recovery_for_browsers
|
679
686
|
|
680
|
-
Initialize Recovery Flow for
|
687
|
+
Initialize Recovery Flow for Browser Clients
|
681
688
|
|
682
|
-
This endpoint
|
689
|
+
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).
|
683
690
|
|
684
691
|
### Examples
|
685
692
|
|
@@ -690,29 +697,28 @@ require 'ory-kratos-client'
|
|
690
697
|
api_instance = OryHydraClient::PublicApi.new
|
691
698
|
|
692
699
|
begin
|
693
|
-
# Initialize Recovery Flow for
|
694
|
-
|
695
|
-
p result
|
700
|
+
# Initialize Recovery Flow for Browser Clients
|
701
|
+
api_instance.initialize_self_service_recovery_for_browsers
|
696
702
|
rescue OryHydraClient::ApiError => e
|
697
|
-
puts "Error when calling PublicApi->
|
703
|
+
puts "Error when calling PublicApi->initialize_self_service_recovery_for_browsers: #{e}"
|
698
704
|
end
|
699
705
|
```
|
700
706
|
|
701
|
-
#### Using the
|
707
|
+
#### Using the initialize_self_service_recovery_for_browsers_with_http_info variant
|
702
708
|
|
703
|
-
This returns an Array which contains the response data, status code and headers.
|
709
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
704
710
|
|
705
|
-
> <Array(
|
711
|
+
> <Array(nil, Integer, Hash)> initialize_self_service_recovery_for_browsers_with_http_info
|
706
712
|
|
707
713
|
```ruby
|
708
714
|
begin
|
709
|
-
# Initialize Recovery Flow for
|
710
|
-
data, status_code, headers = api_instance.
|
715
|
+
# Initialize Recovery Flow for Browser Clients
|
716
|
+
data, status_code, headers = api_instance.initialize_self_service_recovery_for_browsers_with_http_info
|
711
717
|
p status_code # => 2xx
|
712
718
|
p headers # => { ... }
|
713
|
-
p data # =>
|
719
|
+
p data # => nil
|
714
720
|
rescue OryHydraClient::ApiError => e
|
715
|
-
puts "Error when calling PublicApi->
|
721
|
+
puts "Error when calling PublicApi->initialize_self_service_recovery_for_browsers_with_http_info: #{e}"
|
716
722
|
end
|
717
723
|
```
|
718
724
|
|
@@ -722,7 +728,7 @@ This endpoint does not need any parameter.
|
|
722
728
|
|
723
729
|
### Return type
|
724
730
|
|
725
|
-
|
731
|
+
nil (empty response body)
|
726
732
|
|
727
733
|
### Authorization
|
728
734
|
|
@@ -734,13 +740,13 @@ No authorization required
|
|
734
740
|
- **Accept**: application/json
|
735
741
|
|
736
742
|
|
737
|
-
##
|
743
|
+
## initialize_self_service_recovery_for_native_apps
|
738
744
|
|
739
|
-
>
|
745
|
+
> <RecoveryFlow> initialize_self_service_recovery_for_native_apps
|
740
746
|
|
741
|
-
Initialize Recovery Flow for
|
747
|
+
Initialize Recovery Flow for Native Apps and API clients
|
742
748
|
|
743
|
-
This endpoint
|
749
|
+
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).
|
744
750
|
|
745
751
|
### Examples
|
746
752
|
|
@@ -751,28 +757,29 @@ require 'ory-kratos-client'
|
|
751
757
|
api_instance = OryHydraClient::PublicApi.new
|
752
758
|
|
753
759
|
begin
|
754
|
-
# Initialize Recovery Flow for
|
755
|
-
api_instance.
|
760
|
+
# Initialize Recovery Flow for Native Apps and API clients
|
761
|
+
result = api_instance.initialize_self_service_recovery_for_native_apps
|
762
|
+
p result
|
756
763
|
rescue OryHydraClient::ApiError => e
|
757
|
-
puts "Error when calling PublicApi->
|
764
|
+
puts "Error when calling PublicApi->initialize_self_service_recovery_for_native_apps: #{e}"
|
758
765
|
end
|
759
766
|
```
|
760
767
|
|
761
|
-
#### Using the
|
768
|
+
#### Using the initialize_self_service_recovery_for_native_apps_with_http_info variant
|
762
769
|
|
763
|
-
This returns an Array which contains the response data
|
770
|
+
This returns an Array which contains the response data, status code and headers.
|
764
771
|
|
765
|
-
> <Array(
|
772
|
+
> <Array(<RecoveryFlow>, Integer, Hash)> initialize_self_service_recovery_for_native_apps_with_http_info
|
766
773
|
|
767
774
|
```ruby
|
768
775
|
begin
|
769
|
-
# Initialize Recovery Flow for
|
770
|
-
data, status_code, headers = api_instance.
|
776
|
+
# Initialize Recovery Flow for Native Apps and API clients
|
777
|
+
data, status_code, headers = api_instance.initialize_self_service_recovery_for_native_apps_with_http_info
|
771
778
|
p status_code # => 2xx
|
772
779
|
p headers # => { ... }
|
773
|
-
p data # =>
|
780
|
+
p data # => <RecoveryFlow>
|
774
781
|
rescue OryHydraClient::ApiError => e
|
775
|
-
puts "Error when calling PublicApi->
|
782
|
+
puts "Error when calling PublicApi->initialize_self_service_recovery_for_native_apps_with_http_info: #{e}"
|
776
783
|
end
|
777
784
|
```
|
778
785
|
|
@@ -782,7 +789,7 @@ This endpoint does not need any parameter.
|
|
782
789
|
|
783
790
|
### Return type
|
784
791
|
|
785
|
-
|
792
|
+
[**RecoveryFlow**](RecoveryFlow.md)
|
786
793
|
|
787
794
|
### Authorization
|
788
795
|
|
@@ -794,13 +801,13 @@ No authorization required
|
|
794
801
|
- **Accept**: application/json
|
795
802
|
|
796
803
|
|
797
|
-
##
|
804
|
+
## initialize_self_service_registration_for_browsers
|
798
805
|
|
799
|
-
>
|
806
|
+
> initialize_self_service_registration_for_browsers
|
800
807
|
|
801
|
-
Initialize Registration Flow for
|
808
|
+
Initialize Registration Flow for browsers
|
802
809
|
|
803
|
-
This endpoint
|
810
|
+
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).
|
804
811
|
|
805
812
|
### Examples
|
806
813
|
|
@@ -811,29 +818,28 @@ require 'ory-kratos-client'
|
|
811
818
|
api_instance = OryHydraClient::PublicApi.new
|
812
819
|
|
813
820
|
begin
|
814
|
-
# Initialize Registration Flow for
|
815
|
-
|
816
|
-
p result
|
821
|
+
# Initialize Registration Flow for browsers
|
822
|
+
api_instance.initialize_self_service_registration_for_browsers
|
817
823
|
rescue OryHydraClient::ApiError => e
|
818
|
-
puts "Error when calling PublicApi->
|
824
|
+
puts "Error when calling PublicApi->initialize_self_service_registration_for_browsers: #{e}"
|
819
825
|
end
|
820
826
|
```
|
821
827
|
|
822
|
-
#### Using the
|
828
|
+
#### Using the initialize_self_service_registration_for_browsers_with_http_info variant
|
823
829
|
|
824
|
-
This returns an Array which contains the response data, status code and headers.
|
830
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
825
831
|
|
826
|
-
> <Array(
|
832
|
+
> <Array(nil, Integer, Hash)> initialize_self_service_registration_for_browsers_with_http_info
|
827
833
|
|
828
834
|
```ruby
|
829
835
|
begin
|
830
|
-
# Initialize Registration Flow for
|
831
|
-
data, status_code, headers = api_instance.
|
836
|
+
# Initialize Registration Flow for browsers
|
837
|
+
data, status_code, headers = api_instance.initialize_self_service_registration_for_browsers_with_http_info
|
832
838
|
p status_code # => 2xx
|
833
839
|
p headers # => { ... }
|
834
|
-
p data # =>
|
840
|
+
p data # => nil
|
835
841
|
rescue OryHydraClient::ApiError => e
|
836
|
-
puts "Error when calling PublicApi->
|
842
|
+
puts "Error when calling PublicApi->initialize_self_service_registration_for_browsers_with_http_info: #{e}"
|
837
843
|
end
|
838
844
|
```
|
839
845
|
|
@@ -843,7 +849,7 @@ This endpoint does not need any parameter.
|
|
843
849
|
|
844
850
|
### Return type
|
845
851
|
|
846
|
-
|
852
|
+
nil (empty response body)
|
847
853
|
|
848
854
|
### Authorization
|
849
855
|
|
@@ -855,13 +861,13 @@ No authorization required
|
|
855
861
|
- **Accept**: application/json
|
856
862
|
|
857
863
|
|
858
|
-
##
|
864
|
+
## initialize_self_service_registration_for_native_apps
|
859
865
|
|
860
|
-
>
|
866
|
+
> <RegistrationFlow> initialize_self_service_registration_for_native_apps
|
861
867
|
|
862
|
-
Initialize Registration Flow for
|
868
|
+
Initialize Registration Flow for Native Apps and API clients
|
863
869
|
|
864
|
-
This endpoint
|
870
|
+
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).
|
865
871
|
|
866
872
|
### Examples
|
867
873
|
|
@@ -872,28 +878,29 @@ require 'ory-kratos-client'
|
|
872
878
|
api_instance = OryHydraClient::PublicApi.new
|
873
879
|
|
874
880
|
begin
|
875
|
-
# Initialize Registration Flow for
|
876
|
-
api_instance.
|
881
|
+
# Initialize Registration Flow for Native Apps and API clients
|
882
|
+
result = api_instance.initialize_self_service_registration_for_native_apps
|
883
|
+
p result
|
877
884
|
rescue OryHydraClient::ApiError => e
|
878
|
-
puts "Error when calling PublicApi->
|
885
|
+
puts "Error when calling PublicApi->initialize_self_service_registration_for_native_apps: #{e}"
|
879
886
|
end
|
880
887
|
```
|
881
888
|
|
882
|
-
#### Using the
|
889
|
+
#### Using the initialize_self_service_registration_for_native_apps_with_http_info variant
|
883
890
|
|
884
|
-
This returns an Array which contains the response data
|
891
|
+
This returns an Array which contains the response data, status code and headers.
|
885
892
|
|
886
|
-
> <Array(
|
893
|
+
> <Array(<RegistrationFlow>, Integer, Hash)> initialize_self_service_registration_for_native_apps_with_http_info
|
887
894
|
|
888
895
|
```ruby
|
889
896
|
begin
|
890
|
-
# Initialize Registration Flow for
|
891
|
-
data, status_code, headers = api_instance.
|
897
|
+
# Initialize Registration Flow for Native Apps and API clients
|
898
|
+
data, status_code, headers = api_instance.initialize_self_service_registration_for_native_apps_with_http_info
|
892
899
|
p status_code # => 2xx
|
893
900
|
p headers # => { ... }
|
894
|
-
p data # =>
|
901
|
+
p data # => <RegistrationFlow>
|
895
902
|
rescue OryHydraClient::ApiError => e
|
896
|
-
puts "Error when calling PublicApi->
|
903
|
+
puts "Error when calling PublicApi->initialize_self_service_registration_for_native_apps_with_http_info: #{e}"
|
897
904
|
end
|
898
905
|
```
|
899
906
|
|
@@ -903,7 +910,7 @@ This endpoint does not need any parameter.
|
|
903
910
|
|
904
911
|
### Return type
|
905
912
|
|
906
|
-
|
913
|
+
[**RegistrationFlow**](RegistrationFlow.md)
|
907
914
|
|
908
915
|
### Authorization
|
909
916
|
|
@@ -915,13 +922,13 @@ No authorization required
|
|
915
922
|
- **Accept**: application/json
|
916
923
|
|
917
924
|
|
918
|
-
##
|
925
|
+
## initialize_self_service_settings_for_browsers
|
919
926
|
|
920
|
-
>
|
927
|
+
> initialize_self_service_settings_for_browsers
|
921
928
|
|
922
|
-
Initialize Settings Flow for
|
929
|
+
Initialize Settings Flow for Browsers
|
923
930
|
|
924
|
-
This endpoint
|
931
|
+
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).
|
925
932
|
|
926
933
|
### Examples
|
927
934
|
|
@@ -930,38 +937,35 @@ require 'time'
|
|
930
937
|
require 'ory-kratos-client'
|
931
938
|
# setup authorization
|
932
939
|
OryHydraClient.configure do |config|
|
933
|
-
# Configure
|
934
|
-
config.
|
935
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
936
|
-
# config.api_key_prefix['sessionToken'] = 'Bearer'
|
940
|
+
# Configure Bearer authorization: sessionToken
|
941
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
937
942
|
end
|
938
943
|
|
939
944
|
api_instance = OryHydraClient::PublicApi.new
|
940
945
|
|
941
946
|
begin
|
942
|
-
# Initialize Settings Flow for
|
943
|
-
|
944
|
-
p result
|
947
|
+
# Initialize Settings Flow for Browsers
|
948
|
+
api_instance.initialize_self_service_settings_for_browsers
|
945
949
|
rescue OryHydraClient::ApiError => e
|
946
|
-
puts "Error when calling PublicApi->
|
950
|
+
puts "Error when calling PublicApi->initialize_self_service_settings_for_browsers: #{e}"
|
947
951
|
end
|
948
952
|
```
|
949
953
|
|
950
|
-
#### Using the
|
954
|
+
#### Using the initialize_self_service_settings_for_browsers_with_http_info variant
|
951
955
|
|
952
|
-
This returns an Array which contains the response data, status code and headers.
|
956
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
953
957
|
|
954
|
-
> <Array(
|
958
|
+
> <Array(nil, Integer, Hash)> initialize_self_service_settings_for_browsers_with_http_info
|
955
959
|
|
956
960
|
```ruby
|
957
961
|
begin
|
958
|
-
# Initialize Settings Flow for
|
959
|
-
data, status_code, headers = api_instance.
|
962
|
+
# Initialize Settings Flow for Browsers
|
963
|
+
data, status_code, headers = api_instance.initialize_self_service_settings_for_browsers_with_http_info
|
960
964
|
p status_code # => 2xx
|
961
965
|
p headers # => { ... }
|
962
|
-
p data # =>
|
966
|
+
p data # => nil
|
963
967
|
rescue OryHydraClient::ApiError => e
|
964
|
-
puts "Error when calling PublicApi->
|
968
|
+
puts "Error when calling PublicApi->initialize_self_service_settings_for_browsers_with_http_info: #{e}"
|
965
969
|
end
|
966
970
|
```
|
967
971
|
|
@@ -971,7 +975,7 @@ This endpoint does not need any parameter.
|
|
971
975
|
|
972
976
|
### Return type
|
973
977
|
|
974
|
-
|
978
|
+
nil (empty response body)
|
975
979
|
|
976
980
|
### Authorization
|
977
981
|
|
@@ -983,13 +987,13 @@ This endpoint does not need any parameter.
|
|
983
987
|
- **Accept**: application/json
|
984
988
|
|
985
989
|
|
986
|
-
##
|
990
|
+
## initialize_self_service_settings_for_native_apps
|
987
991
|
|
988
|
-
>
|
992
|
+
> <SettingsFlow> initialize_self_service_settings_for_native_apps(opts)
|
989
993
|
|
990
|
-
Initialize Settings Flow for
|
994
|
+
Initialize Settings Flow for Native Apps and API clients
|
991
995
|
|
992
|
-
This endpoint
|
996
|
+
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).
|
993
997
|
|
994
998
|
### Examples
|
995
999
|
|
@@ -998,47 +1002,51 @@ require 'time'
|
|
998
1002
|
require 'ory-kratos-client'
|
999
1003
|
# setup authorization
|
1000
1004
|
OryHydraClient.configure do |config|
|
1001
|
-
# Configure
|
1002
|
-
config.
|
1003
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1004
|
-
# config.api_key_prefix['sessionToken'] = 'Bearer'
|
1005
|
+
# Configure Bearer authorization: sessionToken
|
1006
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1005
1007
|
end
|
1006
1008
|
|
1007
1009
|
api_instance = OryHydraClient::PublicApi.new
|
1010
|
+
opts = {
|
1011
|
+
x_session_token: 'x_session_token_example' # String | The Session Token of the Identity performing the settings flow.
|
1012
|
+
}
|
1008
1013
|
|
1009
1014
|
begin
|
1010
|
-
# Initialize Settings Flow for
|
1011
|
-
api_instance.
|
1015
|
+
# Initialize Settings Flow for Native Apps and API clients
|
1016
|
+
result = api_instance.initialize_self_service_settings_for_native_apps(opts)
|
1017
|
+
p result
|
1012
1018
|
rescue OryHydraClient::ApiError => e
|
1013
|
-
puts "Error when calling PublicApi->
|
1019
|
+
puts "Error when calling PublicApi->initialize_self_service_settings_for_native_apps: #{e}"
|
1014
1020
|
end
|
1015
1021
|
```
|
1016
1022
|
|
1017
|
-
#### Using the
|
1023
|
+
#### Using the initialize_self_service_settings_for_native_apps_with_http_info variant
|
1018
1024
|
|
1019
|
-
This returns an Array which contains the response data
|
1025
|
+
This returns an Array which contains the response data, status code and headers.
|
1020
1026
|
|
1021
|
-
> <Array(
|
1027
|
+
> <Array(<SettingsFlow>, Integer, Hash)> initialize_self_service_settings_for_native_apps_with_http_info(opts)
|
1022
1028
|
|
1023
1029
|
```ruby
|
1024
1030
|
begin
|
1025
|
-
# Initialize Settings Flow for
|
1026
|
-
data, status_code, headers = api_instance.
|
1031
|
+
# Initialize Settings Flow for Native Apps and API clients
|
1032
|
+
data, status_code, headers = api_instance.initialize_self_service_settings_for_native_apps_with_http_info(opts)
|
1027
1033
|
p status_code # => 2xx
|
1028
1034
|
p headers # => { ... }
|
1029
|
-
p data # =>
|
1035
|
+
p data # => <SettingsFlow>
|
1030
1036
|
rescue OryHydraClient::ApiError => e
|
1031
|
-
puts "Error when calling PublicApi->
|
1037
|
+
puts "Error when calling PublicApi->initialize_self_service_settings_for_native_apps_with_http_info: #{e}"
|
1032
1038
|
end
|
1033
1039
|
```
|
1034
1040
|
|
1035
1041
|
### Parameters
|
1036
1042
|
|
1037
|
-
|
1043
|
+
| Name | Type | Description | Notes |
|
1044
|
+
| ---- | ---- | ----------- | ----- |
|
1045
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
1038
1046
|
|
1039
1047
|
### Return type
|
1040
1048
|
|
1041
|
-
|
1049
|
+
[**SettingsFlow**](SettingsFlow.md)
|
1042
1050
|
|
1043
1051
|
### Authorization
|
1044
1052
|
|
@@ -1050,13 +1058,13 @@ nil (empty response body)
|
|
1050
1058
|
- **Accept**: application/json
|
1051
1059
|
|
1052
1060
|
|
1053
|
-
##
|
1061
|
+
## initialize_self_service_verification_for_browsers
|
1054
1062
|
|
1055
|
-
>
|
1063
|
+
> initialize_self_service_verification_for_browsers
|
1056
1064
|
|
1057
|
-
Initialize Verification Flow for
|
1065
|
+
Initialize Verification Flow for Browser Clients
|
1058
1066
|
|
1059
|
-
This endpoint
|
1067
|
+
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).
|
1060
1068
|
|
1061
1069
|
### Examples
|
1062
1070
|
|
@@ -1067,29 +1075,28 @@ require 'ory-kratos-client'
|
|
1067
1075
|
api_instance = OryHydraClient::PublicApi.new
|
1068
1076
|
|
1069
1077
|
begin
|
1070
|
-
# Initialize Verification Flow for
|
1071
|
-
|
1072
|
-
p result
|
1078
|
+
# Initialize Verification Flow for Browser Clients
|
1079
|
+
api_instance.initialize_self_service_verification_for_browsers
|
1073
1080
|
rescue OryHydraClient::ApiError => e
|
1074
|
-
puts "Error when calling PublicApi->
|
1081
|
+
puts "Error when calling PublicApi->initialize_self_service_verification_for_browsers: #{e}"
|
1075
1082
|
end
|
1076
1083
|
```
|
1077
1084
|
|
1078
|
-
#### Using the
|
1085
|
+
#### Using the initialize_self_service_verification_for_browsers_with_http_info variant
|
1079
1086
|
|
1080
|
-
This returns an Array which contains the response data, status code and headers.
|
1087
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1081
1088
|
|
1082
|
-
> <Array(
|
1089
|
+
> <Array(nil, Integer, Hash)> initialize_self_service_verification_for_browsers_with_http_info
|
1083
1090
|
|
1084
1091
|
```ruby
|
1085
1092
|
begin
|
1086
|
-
# Initialize Verification Flow for
|
1087
|
-
data, status_code, headers = api_instance.
|
1093
|
+
# Initialize Verification Flow for Browser Clients
|
1094
|
+
data, status_code, headers = api_instance.initialize_self_service_verification_for_browsers_with_http_info
|
1088
1095
|
p status_code # => 2xx
|
1089
1096
|
p headers # => { ... }
|
1090
|
-
p data # =>
|
1097
|
+
p data # => nil
|
1091
1098
|
rescue OryHydraClient::ApiError => e
|
1092
|
-
puts "Error when calling PublicApi->
|
1099
|
+
puts "Error when calling PublicApi->initialize_self_service_verification_for_browsers_with_http_info: #{e}"
|
1093
1100
|
end
|
1094
1101
|
```
|
1095
1102
|
|
@@ -1099,7 +1106,7 @@ This endpoint does not need any parameter.
|
|
1099
1106
|
|
1100
1107
|
### Return type
|
1101
1108
|
|
1102
|
-
|
1109
|
+
nil (empty response body)
|
1103
1110
|
|
1104
1111
|
### Authorization
|
1105
1112
|
|
@@ -1111,13 +1118,13 @@ No authorization required
|
|
1111
1118
|
- **Accept**: application/json
|
1112
1119
|
|
1113
1120
|
|
1114
|
-
##
|
1121
|
+
## initialize_self_service_verification_for_native_apps
|
1115
1122
|
|
1116
|
-
>
|
1123
|
+
> <VerificationFlow> initialize_self_service_verification_for_native_apps
|
1117
1124
|
|
1118
|
-
Initialize Verification Flow for
|
1125
|
+
Initialize Verification Flow for Native Apps and API clients
|
1119
1126
|
|
1120
|
-
This endpoint
|
1127
|
+
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).
|
1121
1128
|
|
1122
1129
|
### Examples
|
1123
1130
|
|
@@ -1128,28 +1135,29 @@ require 'ory-kratos-client'
|
|
1128
1135
|
api_instance = OryHydraClient::PublicApi.new
|
1129
1136
|
|
1130
1137
|
begin
|
1131
|
-
# Initialize Verification Flow for
|
1132
|
-
api_instance.
|
1138
|
+
# Initialize Verification Flow for Native Apps and API clients
|
1139
|
+
result = api_instance.initialize_self_service_verification_for_native_apps
|
1140
|
+
p result
|
1133
1141
|
rescue OryHydraClient::ApiError => e
|
1134
|
-
puts "Error when calling PublicApi->
|
1142
|
+
puts "Error when calling PublicApi->initialize_self_service_verification_for_native_apps: #{e}"
|
1135
1143
|
end
|
1136
1144
|
```
|
1137
1145
|
|
1138
|
-
#### Using the
|
1146
|
+
#### Using the initialize_self_service_verification_for_native_apps_with_http_info variant
|
1139
1147
|
|
1140
|
-
This returns an Array which contains the response data
|
1148
|
+
This returns an Array which contains the response data, status code and headers.
|
1141
1149
|
|
1142
|
-
> <Array(
|
1150
|
+
> <Array(<VerificationFlow>, Integer, Hash)> initialize_self_service_verification_for_native_apps_with_http_info
|
1143
1151
|
|
1144
1152
|
```ruby
|
1145
1153
|
begin
|
1146
|
-
# Initialize Verification Flow for
|
1147
|
-
data, status_code, headers = api_instance.
|
1154
|
+
# Initialize Verification Flow for Native Apps and API clients
|
1155
|
+
data, status_code, headers = api_instance.initialize_self_service_verification_for_native_apps_with_http_info
|
1148
1156
|
p status_code # => 2xx
|
1149
1157
|
p headers # => { ... }
|
1150
|
-
p data # =>
|
1158
|
+
p data # => <VerificationFlow>
|
1151
1159
|
rescue OryHydraClient::ApiError => e
|
1152
|
-
puts "Error when calling PublicApi->
|
1160
|
+
puts "Error when calling PublicApi->initialize_self_service_verification_for_native_apps_with_http_info: #{e}"
|
1153
1161
|
end
|
1154
1162
|
```
|
1155
1163
|
|
@@ -1159,7 +1167,7 @@ This endpoint does not need any parameter.
|
|
1159
1167
|
|
1160
1168
|
### Return type
|
1161
1169
|
|
1162
|
-
|
1170
|
+
[**VerificationFlow**](VerificationFlow.md)
|
1163
1171
|
|
1164
1172
|
### Authorization
|
1165
1173
|
|
@@ -1521,15 +1529,14 @@ require 'time'
|
|
1521
1529
|
require 'ory-kratos-client'
|
1522
1530
|
# setup authorization
|
1523
1531
|
OryHydraClient.configure do |config|
|
1524
|
-
# Configure
|
1525
|
-
config.
|
1526
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1527
|
-
# config.api_key_prefix['sessionToken'] = 'Bearer'
|
1532
|
+
# Configure Bearer authorization: sessionToken
|
1533
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1528
1534
|
end
|
1529
1535
|
|
1530
1536
|
api_instance = OryHydraClient::PublicApi.new
|
1531
1537
|
flow = 'flow_example' # String | The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`).
|
1532
1538
|
opts = {
|
1539
|
+
x_session_token: 'x_session_token_example', # String | The Session Token of the Identity performing the settings flow.
|
1533
1540
|
submit_self_service_settings_flow: OryHydraClient::SubmitSelfServiceSettingsFlowWithPasswordMethod.new({password: 'password_example'}) # SubmitSelfServiceSettingsFlow |
|
1534
1541
|
}
|
1535
1542
|
|
@@ -1565,6 +1572,7 @@ end
|
|
1565
1572
|
| Name | Type | Description | Notes |
|
1566
1573
|
| ---- | ---- | ----------- | ----- |
|
1567
1574
|
| **flow** | **String** | The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). | |
|
1575
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
1568
1576
|
| **submit_self_service_settings_flow** | [**SubmitSelfServiceSettingsFlow**](SubmitSelfServiceSettingsFlow.md) | | [optional] |
|
1569
1577
|
|
1570
1578
|
### Return type
|
@@ -1648,13 +1656,13 @@ No authorization required
|
|
1648
1656
|
- **Accept**: application/json
|
1649
1657
|
|
1650
1658
|
|
1651
|
-
##
|
1659
|
+
## to_session
|
1652
1660
|
|
1653
|
-
> <Session>
|
1661
|
+
> <Session> to_session(opts)
|
1654
1662
|
|
1655
1663
|
Check Who the Current HTTP Session Belongs To
|
1656
1664
|
|
1657
|
-
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
|
1665
|
+
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: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header!
|
1658
1666
|
|
1659
1667
|
### Examples
|
1660
1668
|
|
@@ -1663,42 +1671,41 @@ require 'time'
|
|
1663
1671
|
require 'ory-kratos-client'
|
1664
1672
|
# setup authorization
|
1665
1673
|
OryHydraClient.configure do |config|
|
1666
|
-
# Configure API key authorization:
|
1667
|
-
config.api_key['
|
1674
|
+
# Configure API key authorization: sessionCookie
|
1675
|
+
config.api_key['sessionCookie'] = 'YOUR API KEY'
|
1668
1676
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1669
|
-
# config.api_key_prefix['
|
1677
|
+
# config.api_key_prefix['sessionCookie'] = 'Bearer'
|
1670
1678
|
end
|
1671
1679
|
|
1672
1680
|
api_instance = OryHydraClient::PublicApi.new
|
1673
1681
|
opts = {
|
1674
|
-
|
1675
|
-
authorization: 'authorization_example' # String |
|
1682
|
+
x_session_token: 'x_session_token_example' # String |
|
1676
1683
|
}
|
1677
1684
|
|
1678
1685
|
begin
|
1679
1686
|
# Check Who the Current HTTP Session Belongs To
|
1680
|
-
result = api_instance.
|
1687
|
+
result = api_instance.to_session(opts)
|
1681
1688
|
p result
|
1682
1689
|
rescue OryHydraClient::ApiError => e
|
1683
|
-
puts "Error when calling PublicApi->
|
1690
|
+
puts "Error when calling PublicApi->to_session: #{e}"
|
1684
1691
|
end
|
1685
1692
|
```
|
1686
1693
|
|
1687
|
-
#### Using the
|
1694
|
+
#### Using the to_session_with_http_info variant
|
1688
1695
|
|
1689
1696
|
This returns an Array which contains the response data, status code and headers.
|
1690
1697
|
|
1691
|
-
> <Array(<Session>, Integer, Hash)>
|
1698
|
+
> <Array(<Session>, Integer, Hash)> to_session_with_http_info(opts)
|
1692
1699
|
|
1693
1700
|
```ruby
|
1694
1701
|
begin
|
1695
1702
|
# Check Who the Current HTTP Session Belongs To
|
1696
|
-
data, status_code, headers = api_instance.
|
1703
|
+
data, status_code, headers = api_instance.to_session_with_http_info(opts)
|
1697
1704
|
p status_code # => 2xx
|
1698
1705
|
p headers # => { ... }
|
1699
1706
|
p data # => <Session>
|
1700
1707
|
rescue OryHydraClient::ApiError => e
|
1701
|
-
puts "Error when calling PublicApi->
|
1708
|
+
puts "Error when calling PublicApi->to_session_with_http_info: #{e}"
|
1702
1709
|
end
|
1703
1710
|
```
|
1704
1711
|
|
@@ -1706,8 +1713,7 @@ end
|
|
1706
1713
|
|
1707
1714
|
| Name | Type | Description | Notes |
|
1708
1715
|
| ---- | ---- | ----------- | ----- |
|
1709
|
-
| **
|
1710
|
-
| **authorization** | **String** | | [optional] |
|
1716
|
+
| **x_session_token** | **String** | | [optional] |
|
1711
1717
|
|
1712
1718
|
### Return type
|
1713
1719
|
|
@@ -1715,7 +1721,7 @@ end
|
|
1715
1721
|
|
1716
1722
|
### Authorization
|
1717
1723
|
|
1718
|
-
[
|
1724
|
+
[sessionCookie](../README.md#sessionCookie)
|
1719
1725
|
|
1720
1726
|
### HTTP request headers
|
1721
1727
|
|