ory-client 0.0.1.alpha14 → 0.0.1.alpha18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +144 -150
- data/docs/AdminCreateIdentityBody.md +20 -0
- data/docs/AdminCreateSelfServiceRecoveryLinkBody.md +20 -0
- data/docs/AdminUpdateIdentityBody.md +22 -0
- data/docs/AuthenticateOKBody.md +2 -2
- data/docs/AuthenticatorAssuranceLevel.md +15 -0
- data/docs/ContainerChangeResponseItem.md +2 -2
- data/docs/ContainerCreateCreatedBody.md +2 -2
- data/docs/ContainerTopOKBody.md +2 -2
- data/docs/ContainerUpdateOKBody.md +2 -2
- data/docs/ContainerWaitOKBody.md +2 -2
- data/docs/ContainerWaitOKBodyError.md +2 -2
- data/docs/ErrorResponse.md +2 -2
- data/docs/GenericError.md +3 -3
- data/docs/GraphDriverData.md +2 -2
- data/docs/HealthNotReadyStatus.md +2 -2
- data/docs/HealthStatus.md +2 -2
- data/docs/IdResponse.md +2 -2
- data/docs/Identity.md +8 -2
- data/docs/IdentityCredentials.md +3 -3
- data/docs/IdentityCredentialsType.md +15 -0
- data/docs/IdentityState.md +15 -0
- data/docs/ImageDeleteResponseItem.md +2 -2
- data/docs/ImageSummary.md +2 -2
- data/docs/InlineResponse200.md +2 -2
- data/docs/InlineResponse2001.md +2 -2
- data/docs/InlineResponse503.md +2 -2
- data/docs/JsonError.md +2 -2
- data/docs/Meta.md +2 -2
- data/docs/MetadataApi.md +254 -0
- data/docs/Plugin.md +2 -2
- data/docs/PluginConfig.md +2 -2
- data/docs/PluginConfigArgs.md +2 -2
- data/docs/PluginConfigInterface.md +2 -2
- data/docs/PluginConfigLinux.md +2 -2
- data/docs/PluginConfigNetwork.md +2 -2
- data/docs/PluginConfigRootfs.md +2 -2
- data/docs/PluginConfigUser.md +2 -2
- data/docs/PluginDevice.md +2 -2
- data/docs/PluginEnv.md +2 -2
- data/docs/PluginInterfaceType.md +2 -2
- data/docs/PluginMount.md +2 -2
- data/docs/PluginSettings.md +2 -2
- data/docs/Port.md +2 -2
- data/docs/RecoveryAddress.md +2 -2
- data/docs/SelfServiceError.md +24 -0
- data/docs/SelfServiceLoginFlow.md +38 -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/ServiceUpdateResponse.md +2 -2
- data/docs/Session.md +10 -6
- data/docs/SessionAuthenticationMethod.md +20 -0
- data/docs/SessionDevice.md +18 -0
- data/docs/SettingsProfileFormConfig.md +2 -2
- data/docs/SubmitSelfServiceLoginFlowBody.md +81 -0
- data/docs/SubmitSelfServiceLoginFlowWithLookupSecretMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md +24 -0
- data/docs/SubmitSelfServiceLoginFlowWithTotpMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md +22 -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 +84 -0
- data/docs/SubmitSelfServiceSettingsFlowWithLookupMethodBody.md +26 -0
- data/docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethodBody.md +22 -0
- data/docs/SubmitSelfServiceSettingsFlowWithProfileMethodBody.md +22 -0
- data/docs/SubmitSelfServiceSettingsFlowWithTotpMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody.md +26 -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/UiContainer.md +2 -2
- data/docs/UiNode.md +2 -2
- data/docs/UiNodeAnchorAttributes.md +4 -2
- data/docs/UiNodeAttributes.md +4 -4
- data/docs/UiNodeImageAttributes.md +9 -3
- data/docs/UiNodeInputAttributes.md +4 -2
- data/docs/UiNodeTextAttributes.md +4 -2
- data/docs/UiText.md +2 -2
- data/docs/V0alpha1Api.md +2184 -0
- data/docs/V0alpha2Api.md +2194 -0
- data/docs/VerifiableIdentityAddress.md +2 -2
- data/docs/Version.md +2 -2
- data/docs/Volume.md +2 -2
- data/docs/VolumeUsageData.md +2 -2
- data/lib/ory-client/api/default_api.rb +1 -1
- data/lib/ory-client/api/metadata_api.rb +248 -0
- data/lib/ory-client/api/v0alpha1_api.rb +2054 -0
- data/lib/ory-client/api/v0alpha2_api.rb +2069 -0
- data/lib/ory-client/api_client.rb +4 -4
- data/lib/ory-client/api_error.rb +3 -3
- data/lib/ory-client/configuration.rb +5 -19
- data/lib/ory-client/models/admin_create_identity_body.rb +239 -0
- data/lib/ory-client/models/admin_create_self_service_recovery_link_body.rb +250 -0
- data/lib/ory-client/models/admin_update_identity_body.rb +248 -0
- data/lib/ory-client/models/authenticate_ok_body.rb +6 -6
- data/lib/ory-client/models/authenticator_assurance_level.rb +39 -0
- data/lib/ory-client/models/container_change_response_item.rb +6 -6
- data/lib/ory-client/models/container_create_created_body.rb +6 -6
- data/lib/ory-client/models/container_top_ok_body.rb +6 -6
- data/lib/ory-client/models/container_update_ok_body.rb +6 -6
- data/lib/ory-client/models/container_wait_ok_body.rb +6 -6
- data/lib/ory-client/models/container_wait_ok_body_error.rb +6 -6
- data/lib/ory-client/models/create_identity.rb +1 -1
- data/lib/ory-client/models/create_recovery_link.rb +1 -1
- data/lib/ory-client/models/error_response.rb +6 -6
- data/lib/ory-client/models/generic_error.rb +8 -10
- data/lib/ory-client/models/graph_driver_data.rb +6 -6
- data/lib/ory-client/models/health_not_ready_status.rb +6 -6
- data/lib/ory-client/models/health_status.rb +6 -6
- data/lib/ory-client/models/id_response.rb +6 -6
- data/lib/ory-client/models/identity.rb +37 -7
- data/lib/ory-client/models/identity_credentials.rb +7 -8
- data/lib/ory-client/models/identity_credentials_type.rb +38 -0
- data/lib/ory-client/models/identity_state.rb +37 -0
- data/lib/ory-client/models/image_delete_response_item.rb +6 -6
- data/lib/ory-client/models/image_summary.rb +6 -6
- data/lib/ory-client/models/inline_response200.rb +6 -6
- data/lib/ory-client/models/inline_response2001.rb +6 -6
- data/lib/ory-client/models/inline_response503.rb +6 -6
- data/lib/ory-client/models/json_error.rb +6 -6
- data/lib/ory-client/models/login_flow.rb +1 -1
- data/lib/ory-client/models/login_via_api_response.rb +1 -1
- data/lib/ory-client/models/meta.rb +6 -6
- data/lib/ory-client/models/plugin.rb +6 -6
- data/lib/ory-client/models/plugin_config.rb +6 -6
- data/lib/ory-client/models/plugin_config_args.rb +6 -6
- data/lib/ory-client/models/plugin_config_interface.rb +6 -6
- data/lib/ory-client/models/plugin_config_linux.rb +6 -6
- data/lib/ory-client/models/plugin_config_network.rb +6 -6
- data/lib/ory-client/models/plugin_config_rootfs.rb +6 -6
- data/lib/ory-client/models/plugin_config_user.rb +6 -6
- data/lib/ory-client/models/plugin_device.rb +6 -6
- data/lib/ory-client/models/plugin_env.rb +6 -6
- data/lib/ory-client/models/plugin_interface_type.rb +6 -6
- data/lib/ory-client/models/plugin_mount.rb +6 -6
- data/lib/ory-client/models/plugin_settings.rb +6 -6
- data/lib/ory-client/models/port.rb +6 -6
- data/lib/ory-client/models/recovery_address.rb +6 -6
- data/lib/ory-client/models/recovery_flow.rb +1 -1
- data/lib/ory-client/models/recovery_link.rb +1 -1
- data/lib/ory-client/models/registration_flow.rb +1 -1
- data/lib/ory-client/models/registration_via_api_response.rb +1 -1
- data/lib/ory-client/models/revoke_session.rb +1 -1
- data/lib/ory-client/models/self_service_error.rb +252 -0
- data/lib/ory-client/models/self_service_error_container.rb +1 -1
- data/lib/ory-client/models/self_service_login_flow.rb +346 -0
- data/lib/ory-client/models/self_service_logout_url.rb +219 -0
- data/lib/ory-client/models/self_service_recovery_flow.rb +317 -0
- data/lib/ory-client/models/self_service_recovery_flow_state.rb +38 -0
- data/lib/ory-client/models/self_service_recovery_link.rb +234 -0
- data/lib/ory-client/models/self_service_registration_flow.rb +301 -0
- data/lib/ory-client/models/self_service_settings_flow.rb +331 -0
- data/lib/ory-client/models/self_service_settings_flow_state.rb +37 -0
- data/lib/ory-client/models/self_service_verification_flow.rb +307 -0
- data/lib/ory-client/models/self_service_verification_flow_state.rb +38 -0
- data/lib/ory-client/models/service_update_response.rb +6 -6
- data/lib/ory-client/models/session.rb +33 -22
- data/lib/ory-client/models/session_authentication_method.rb +263 -0
- data/lib/ory-client/models/session_device.rb +219 -0
- data/lib/ory-client/models/settings_flow.rb +1 -1
- data/lib/ory-client/models/settings_profile_form_config.rb +6 -6
- data/lib/ory-client/models/settings_via_api_response.rb +1 -1
- data/lib/ory-client/models/submit_self_service_browser_settings_oidc_flow_payload.rb +1 -1
- data/lib/ory-client/models/submit_self_service_login_flow.rb +1 -1
- data/lib/ory-client/models/submit_self_service_login_flow_body.rb +57 -0
- data/lib/ory-client/models/submit_self_service_login_flow_with_lookup_secret_method_body.rb +249 -0
- data/lib/ory-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-client/models/submit_self_service_login_flow_with_password_method.rb +1 -1
- data/lib/ory-client/models/submit_self_service_login_flow_with_password_method_body.rb +298 -0
- data/lib/ory-client/models/submit_self_service_login_flow_with_totp_method_body.rb +249 -0
- data/lib/ory-client/models/submit_self_service_login_flow_with_web_authn_method_body.rb +244 -0
- data/lib/ory-client/models/submit_self_service_logout_flow_without_browser_body.rb +225 -0
- data/lib/ory-client/models/submit_self_service_recovery_flow_body.rb +53 -0
- data/lib/ory-client/models/submit_self_service_recovery_flow_with_link_method.rb +1 -1
- data/lib/ory-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +283 -0
- data/lib/ory-client/models/submit_self_service_registration_flow.rb +1 -1
- data/lib/ory-client/models/submit_self_service_registration_flow_body.rb +54 -0
- data/lib/ory-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-client/models/submit_self_service_registration_flow_with_password_method.rb +1 -1
- data/lib/ory-client/models/submit_self_service_registration_flow_with_password_method_body.rb +299 -0
- data/lib/ory-client/models/submit_self_service_settings_flow.rb +1 -1
- data/lib/ory-client/models/submit_self_service_settings_flow_body.rb +59 -0
- data/lib/ory-client/models/submit_self_service_settings_flow_with_lookup_method_body.rb +264 -0
- data/lib/ory-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +255 -0
- data/lib/ory-client/models/submit_self_service_settings_flow_with_password_method.rb +1 -1
- data/lib/ory-client/models/submit_self_service_settings_flow_with_password_method_body.rb +283 -0
- data/lib/ory-client/models/submit_self_service_settings_flow_with_profile_method.rb +1 -1
- data/lib/ory-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +250 -0
- data/lib/ory-client/models/submit_self_service_settings_flow_with_totp_method_body.rb +254 -0
- data/lib/ory-client/models/submit_self_service_settings_flow_with_web_authn_method_body.rb +264 -0
- data/lib/ory-client/models/submit_self_service_verification_flow_body.rb +54 -0
- data/lib/ory-client/models/submit_self_service_verification_flow_with_link_method.rb +1 -1
- data/lib/ory-client/models/submit_self_service_verification_flow_with_link_method_body.rb +283 -0
- data/lib/ory-client/models/successful_self_service_login_without_browser.rb +234 -0
- data/lib/ory-client/models/successful_self_service_registration_without_browser.rb +243 -0
- data/lib/ory-client/models/successful_self_service_settings_without_browser.rb +238 -0
- data/lib/ory-client/models/ui_container.rb +6 -6
- data/lib/ory-client/models/ui_node.rb +6 -6
- data/lib/ory-client/models/ui_node_anchor_attributes.rb +22 -7
- data/lib/ory-client/models/ui_node_attributes.rb +4 -4
- data/lib/ory-client/models/ui_node_image_attributes.rb +45 -10
- data/lib/ory-client/models/ui_node_input_attributes.rb +17 -7
- data/lib/ory-client/models/ui_node_text_attributes.rb +22 -7
- data/lib/ory-client/models/ui_text.rb +6 -6
- data/lib/ory-client/models/update_identity.rb +1 -1
- data/lib/ory-client/models/verifiable_identity_address.rb +6 -6
- data/lib/ory-client/models/verification_flow.rb +1 -1
- data/lib/ory-client/models/version.rb +6 -6
- data/lib/ory-client/models/volume.rb +6 -6
- data/lib/ory-client/models/volume_usage_data.rb +6 -6
- data/lib/ory-client/version.rb +4 -4
- data/lib/ory-client.rb +48 -29
- data/ory-client.gemspec +3 -3
- data/spec/api/metadata_api_spec.rb +79 -0
- data/spec/api/v0alpha1_api_spec.rb +429 -0
- data/spec/api/v0alpha2_api_spec.rb +434 -0
- data/spec/api_client_spec.rb +31 -31
- data/spec/configuration_spec.rb +5 -5
- 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/authenticator_assurance_level_spec.rb +28 -0
- data/spec/models/identity_credentials_type_spec.rb +28 -0
- data/spec/models/identity_state_spec.rb +28 -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/session_authentication_method_spec.rb +44 -0
- data/spec/models/session_device_spec.rb +34 -0
- data/spec/models/submit_self_service_login_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_login_flow_with_lookup_secret_method_body_spec.rb +46 -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_login_flow_with_totp_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_login_flow_with_web_authn_method_body_spec.rb +46 -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_lookup_method_body_spec.rb +58 -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_settings_flow_with_totp_method_body_spec.rb +52 -0
- data/spec/models/submit_self_service_settings_flow_with_web_authn_method_body_spec.rb +58 -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/spec_helper.rb +2 -2
- metadata +186 -2
data/docs/V0alpha2Api.md
ADDED
@@ -0,0 +1,2194 @@
|
|
1
|
+
# OryClient::V0alpha2Api
|
2
|
+
|
3
|
+
All URIs are relative to *https://playground.projects.oryapis.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**admin_create_identity**](V0alpha2Api.md#admin_create_identity) | **POST** /api/kratos/admin/identities | Create an Identity |
|
8
|
+
| [**admin_create_self_service_recovery_link**](V0alpha2Api.md#admin_create_self_service_recovery_link) | **POST** /api/kratos/admin/recovery/link | Create a Recovery Link |
|
9
|
+
| [**admin_delete_identity**](V0alpha2Api.md#admin_delete_identity) | **DELETE** /api/kratos/admin/identities/{id} | Delete an Identity |
|
10
|
+
| [**admin_get_identity**](V0alpha2Api.md#admin_get_identity) | **GET** /api/kratos/admin/identities/{id} | Get an Identity |
|
11
|
+
| [**admin_list_identities**](V0alpha2Api.md#admin_list_identities) | **GET** /api/kratos/admin/identities | List Identities |
|
12
|
+
| [**admin_update_identity**](V0alpha2Api.md#admin_update_identity) | **PUT** /api/kratos/admin/identities/{id} | Update an Identity |
|
13
|
+
| [**create_self_service_logout_flow_url_for_browsers**](V0alpha2Api.md#create_self_service_logout_flow_url_for_browsers) | **GET** /api/kratos/public/self-service/logout/browser | Create a Logout URL for Browsers |
|
14
|
+
| [**get_json_schema**](V0alpha2Api.md#get_json_schema) | **GET** /api/kratos/public/schemas/{id} | |
|
15
|
+
| [**get_self_service_error**](V0alpha2Api.md#get_self_service_error) | **GET** /api/kratos/public/self-service/errors | Get Self-Service Errors |
|
16
|
+
| [**get_self_service_login_flow**](V0alpha2Api.md#get_self_service_login_flow) | **GET** /api/kratos/public/self-service/login/flows | Get Login Flow |
|
17
|
+
| [**get_self_service_recovery_flow**](V0alpha2Api.md#get_self_service_recovery_flow) | **GET** /api/kratos/public/self-service/recovery/flows | Get Recovery Flow |
|
18
|
+
| [**get_self_service_registration_flow**](V0alpha2Api.md#get_self_service_registration_flow) | **GET** /api/kratos/public/self-service/registration/flows | Get Registration Flow |
|
19
|
+
| [**get_self_service_settings_flow**](V0alpha2Api.md#get_self_service_settings_flow) | **GET** /api/kratos/public/self-service/settings/flows | Get Settings Flow |
|
20
|
+
| [**get_self_service_verification_flow**](V0alpha2Api.md#get_self_service_verification_flow) | **GET** /api/kratos/public/self-service/verification/flows | Get Verification Flow |
|
21
|
+
| [**initialize_self_service_login_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_login_flow_for_browsers) | **GET** /api/kratos/public/self-service/login/browser | Initialize Login Flow for Browsers |
|
22
|
+
| [**initialize_self_service_login_flow_without_browser**](V0alpha2Api.md#initialize_self_service_login_flow_without_browser) | **GET** /api/kratos/public/self-service/login/api | Initialize Login Flow for APIs, Services, Apps, ... |
|
23
|
+
| [**initialize_self_service_recovery_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_recovery_flow_for_browsers) | **GET** /api/kratos/public/self-service/recovery/browser | Initialize Recovery Flow for Browsers |
|
24
|
+
| [**initialize_self_service_recovery_flow_without_browser**](V0alpha2Api.md#initialize_self_service_recovery_flow_without_browser) | **GET** /api/kratos/public/self-service/recovery/api | Initialize Recovery Flow for APIs, Services, Apps, ... |
|
25
|
+
| [**initialize_self_service_registration_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_registration_flow_for_browsers) | **GET** /api/kratos/public/self-service/registration/browser | Initialize Registration Flow for Browsers |
|
26
|
+
| [**initialize_self_service_registration_flow_without_browser**](V0alpha2Api.md#initialize_self_service_registration_flow_without_browser) | **GET** /api/kratos/public/self-service/registration/api | Initialize Registration Flow for APIs, Services, Apps, ... |
|
27
|
+
| [**initialize_self_service_settings_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_settings_flow_for_browsers) | **GET** /api/kratos/public/self-service/settings/browser | Initialize Settings Flow for Browsers |
|
28
|
+
| [**initialize_self_service_settings_flow_without_browser**](V0alpha2Api.md#initialize_self_service_settings_flow_without_browser) | **GET** /api/kratos/public/self-service/settings/api | Initialize Settings Flow for APIs, Services, Apps, ... |
|
29
|
+
| [**initialize_self_service_verification_flow_for_browsers**](V0alpha2Api.md#initialize_self_service_verification_flow_for_browsers) | **GET** /api/kratos/public/self-service/verification/browser | Initialize Verification Flow for Browser Clients |
|
30
|
+
| [**initialize_self_service_verification_flow_without_browser**](V0alpha2Api.md#initialize_self_service_verification_flow_without_browser) | **GET** /api/kratos/public/self-service/verification/api | Initialize Verification Flow for APIs, Services, Apps, ... |
|
31
|
+
| [**submit_self_service_login_flow**](V0alpha2Api.md#submit_self_service_login_flow) | **POST** /api/kratos/public/self-service/login | Submit a Login Flow |
|
32
|
+
| [**submit_self_service_logout_flow**](V0alpha2Api.md#submit_self_service_logout_flow) | **GET** /api/kratos/public/self-service/logout | Complete Self-Service Logout |
|
33
|
+
| [**submit_self_service_logout_flow_without_browser**](V0alpha2Api.md#submit_self_service_logout_flow_without_browser) | **DELETE** /api/kratos/public/self-service/logout/api | Perform Logout for APIs, Services, Apps, ... |
|
34
|
+
| [**submit_self_service_recovery_flow**](V0alpha2Api.md#submit_self_service_recovery_flow) | **POST** /api/kratos/public/self-service/recovery | Complete Recovery Flow |
|
35
|
+
| [**submit_self_service_registration_flow**](V0alpha2Api.md#submit_self_service_registration_flow) | **POST** /api/kratos/public/self-service/registration | Submit a Registration Flow |
|
36
|
+
| [**submit_self_service_settings_flow**](V0alpha2Api.md#submit_self_service_settings_flow) | **POST** /api/kratos/public/self-service/settings | Complete Settings Flow |
|
37
|
+
| [**submit_self_service_verification_flow**](V0alpha2Api.md#submit_self_service_verification_flow) | **POST** /api/kratos/public/self-service/verification | Complete Verification Flow |
|
38
|
+
| [**to_session**](V0alpha2Api.md#to_session) | **GET** /api/kratos/public/sessions/whoami | Check Who the Current HTTP Session Belongs To |
|
39
|
+
|
40
|
+
|
41
|
+
## admin_create_identity
|
42
|
+
|
43
|
+
> <Identity> admin_create_identity(opts)
|
44
|
+
|
45
|
+
Create an Identity
|
46
|
+
|
47
|
+
This endpoint creates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
48
|
+
|
49
|
+
### Examples
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
require 'time'
|
53
|
+
require 'ory-client'
|
54
|
+
# setup authorization
|
55
|
+
OryClient.configure do |config|
|
56
|
+
# Configure API key authorization: oryAccessToken
|
57
|
+
config.api_key['oryAccessToken'] = 'YOUR API KEY'
|
58
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
59
|
+
# config.api_key_prefix['oryAccessToken'] = 'Bearer'
|
60
|
+
end
|
61
|
+
|
62
|
+
api_instance = OryClient::V0alpha2Api.new
|
63
|
+
opts = {
|
64
|
+
admin_create_identity_body: OryClient::AdminCreateIdentityBody.new({schema_id: 'schema_id_example', traits: 3.56}) # AdminCreateIdentityBody |
|
65
|
+
}
|
66
|
+
|
67
|
+
begin
|
68
|
+
# Create an Identity
|
69
|
+
result = api_instance.admin_create_identity(opts)
|
70
|
+
p result
|
71
|
+
rescue OryClient::ApiError => e
|
72
|
+
puts "Error when calling V0alpha2Api->admin_create_identity: #{e}"
|
73
|
+
end
|
74
|
+
```
|
75
|
+
|
76
|
+
#### Using the admin_create_identity_with_http_info variant
|
77
|
+
|
78
|
+
This returns an Array which contains the response data, status code and headers.
|
79
|
+
|
80
|
+
> <Array(<Identity>, Integer, Hash)> admin_create_identity_with_http_info(opts)
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
begin
|
84
|
+
# Create an Identity
|
85
|
+
data, status_code, headers = api_instance.admin_create_identity_with_http_info(opts)
|
86
|
+
p status_code # => 2xx
|
87
|
+
p headers # => { ... }
|
88
|
+
p data # => <Identity>
|
89
|
+
rescue OryClient::ApiError => e
|
90
|
+
puts "Error when calling V0alpha2Api->admin_create_identity_with_http_info: #{e}"
|
91
|
+
end
|
92
|
+
```
|
93
|
+
|
94
|
+
### Parameters
|
95
|
+
|
96
|
+
| Name | Type | Description | Notes |
|
97
|
+
| ---- | ---- | ----------- | ----- |
|
98
|
+
| **admin_create_identity_body** | [**AdminCreateIdentityBody**](AdminCreateIdentityBody.md) | | [optional] |
|
99
|
+
|
100
|
+
### Return type
|
101
|
+
|
102
|
+
[**Identity**](Identity.md)
|
103
|
+
|
104
|
+
### Authorization
|
105
|
+
|
106
|
+
[oryAccessToken](../README.md#oryAccessToken)
|
107
|
+
|
108
|
+
### HTTP request headers
|
109
|
+
|
110
|
+
- **Content-Type**: application/json
|
111
|
+
- **Accept**: application/json
|
112
|
+
|
113
|
+
|
114
|
+
## admin_create_self_service_recovery_link
|
115
|
+
|
116
|
+
> <SelfServiceRecoveryLink> admin_create_self_service_recovery_link(opts)
|
117
|
+
|
118
|
+
Create a Recovery Link
|
119
|
+
|
120
|
+
This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
|
121
|
+
|
122
|
+
### Examples
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
require 'time'
|
126
|
+
require 'ory-client'
|
127
|
+
# setup authorization
|
128
|
+
OryClient.configure do |config|
|
129
|
+
# Configure API key authorization: oryAccessToken
|
130
|
+
config.api_key['oryAccessToken'] = 'YOUR API KEY'
|
131
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
132
|
+
# config.api_key_prefix['oryAccessToken'] = 'Bearer'
|
133
|
+
end
|
134
|
+
|
135
|
+
api_instance = OryClient::V0alpha2Api.new
|
136
|
+
opts = {
|
137
|
+
admin_create_self_service_recovery_link_body: OryClient::AdminCreateSelfServiceRecoveryLinkBody.new({identity_id: 'identity_id_example'}) # AdminCreateSelfServiceRecoveryLinkBody |
|
138
|
+
}
|
139
|
+
|
140
|
+
begin
|
141
|
+
# Create a Recovery Link
|
142
|
+
result = api_instance.admin_create_self_service_recovery_link(opts)
|
143
|
+
p result
|
144
|
+
rescue OryClient::ApiError => e
|
145
|
+
puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_link: #{e}"
|
146
|
+
end
|
147
|
+
```
|
148
|
+
|
149
|
+
#### Using the admin_create_self_service_recovery_link_with_http_info variant
|
150
|
+
|
151
|
+
This returns an Array which contains the response data, status code and headers.
|
152
|
+
|
153
|
+
> <Array(<SelfServiceRecoveryLink>, Integer, Hash)> admin_create_self_service_recovery_link_with_http_info(opts)
|
154
|
+
|
155
|
+
```ruby
|
156
|
+
begin
|
157
|
+
# Create a Recovery Link
|
158
|
+
data, status_code, headers = api_instance.admin_create_self_service_recovery_link_with_http_info(opts)
|
159
|
+
p status_code # => 2xx
|
160
|
+
p headers # => { ... }
|
161
|
+
p data # => <SelfServiceRecoveryLink>
|
162
|
+
rescue OryClient::ApiError => e
|
163
|
+
puts "Error when calling V0alpha2Api->admin_create_self_service_recovery_link_with_http_info: #{e}"
|
164
|
+
end
|
165
|
+
```
|
166
|
+
|
167
|
+
### Parameters
|
168
|
+
|
169
|
+
| Name | Type | Description | Notes |
|
170
|
+
| ---- | ---- | ----------- | ----- |
|
171
|
+
| **admin_create_self_service_recovery_link_body** | [**AdminCreateSelfServiceRecoveryLinkBody**](AdminCreateSelfServiceRecoveryLinkBody.md) | | [optional] |
|
172
|
+
|
173
|
+
### Return type
|
174
|
+
|
175
|
+
[**SelfServiceRecoveryLink**](SelfServiceRecoveryLink.md)
|
176
|
+
|
177
|
+
### Authorization
|
178
|
+
|
179
|
+
[oryAccessToken](../README.md#oryAccessToken)
|
180
|
+
|
181
|
+
### HTTP request headers
|
182
|
+
|
183
|
+
- **Content-Type**: application/json
|
184
|
+
- **Accept**: application/json
|
185
|
+
|
186
|
+
|
187
|
+
## admin_delete_identity
|
188
|
+
|
189
|
+
> admin_delete_identity(id)
|
190
|
+
|
191
|
+
Delete an Identity
|
192
|
+
|
193
|
+
Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
194
|
+
|
195
|
+
### Examples
|
196
|
+
|
197
|
+
```ruby
|
198
|
+
require 'time'
|
199
|
+
require 'ory-client'
|
200
|
+
# setup authorization
|
201
|
+
OryClient.configure do |config|
|
202
|
+
# Configure API key authorization: oryAccessToken
|
203
|
+
config.api_key['oryAccessToken'] = 'YOUR API KEY'
|
204
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
205
|
+
# config.api_key_prefix['oryAccessToken'] = 'Bearer'
|
206
|
+
end
|
207
|
+
|
208
|
+
api_instance = OryClient::V0alpha2Api.new
|
209
|
+
id = 'id_example' # String | ID is the identity's ID.
|
210
|
+
|
211
|
+
begin
|
212
|
+
# Delete an Identity
|
213
|
+
api_instance.admin_delete_identity(id)
|
214
|
+
rescue OryClient::ApiError => e
|
215
|
+
puts "Error when calling V0alpha2Api->admin_delete_identity: #{e}"
|
216
|
+
end
|
217
|
+
```
|
218
|
+
|
219
|
+
#### Using the admin_delete_identity_with_http_info variant
|
220
|
+
|
221
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
222
|
+
|
223
|
+
> <Array(nil, Integer, Hash)> admin_delete_identity_with_http_info(id)
|
224
|
+
|
225
|
+
```ruby
|
226
|
+
begin
|
227
|
+
# Delete an Identity
|
228
|
+
data, status_code, headers = api_instance.admin_delete_identity_with_http_info(id)
|
229
|
+
p status_code # => 2xx
|
230
|
+
p headers # => { ... }
|
231
|
+
p data # => nil
|
232
|
+
rescue OryClient::ApiError => e
|
233
|
+
puts "Error when calling V0alpha2Api->admin_delete_identity_with_http_info: #{e}"
|
234
|
+
end
|
235
|
+
```
|
236
|
+
|
237
|
+
### Parameters
|
238
|
+
|
239
|
+
| Name | Type | Description | Notes |
|
240
|
+
| ---- | ---- | ----------- | ----- |
|
241
|
+
| **id** | **String** | ID is the identity's ID. | |
|
242
|
+
|
243
|
+
### Return type
|
244
|
+
|
245
|
+
nil (empty response body)
|
246
|
+
|
247
|
+
### Authorization
|
248
|
+
|
249
|
+
[oryAccessToken](../README.md#oryAccessToken)
|
250
|
+
|
251
|
+
### HTTP request headers
|
252
|
+
|
253
|
+
- **Content-Type**: Not defined
|
254
|
+
- **Accept**: application/json
|
255
|
+
|
256
|
+
|
257
|
+
## admin_get_identity
|
258
|
+
|
259
|
+
> <Identity> admin_get_identity(id)
|
260
|
+
|
261
|
+
Get an Identity
|
262
|
+
|
263
|
+
Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
264
|
+
|
265
|
+
### Examples
|
266
|
+
|
267
|
+
```ruby
|
268
|
+
require 'time'
|
269
|
+
require 'ory-client'
|
270
|
+
# setup authorization
|
271
|
+
OryClient.configure do |config|
|
272
|
+
# Configure API key authorization: oryAccessToken
|
273
|
+
config.api_key['oryAccessToken'] = 'YOUR API KEY'
|
274
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
275
|
+
# config.api_key_prefix['oryAccessToken'] = 'Bearer'
|
276
|
+
end
|
277
|
+
|
278
|
+
api_instance = OryClient::V0alpha2Api.new
|
279
|
+
id = 'id_example' # String | ID must be set to the ID of identity you want to get
|
280
|
+
|
281
|
+
begin
|
282
|
+
# Get an Identity
|
283
|
+
result = api_instance.admin_get_identity(id)
|
284
|
+
p result
|
285
|
+
rescue OryClient::ApiError => e
|
286
|
+
puts "Error when calling V0alpha2Api->admin_get_identity: #{e}"
|
287
|
+
end
|
288
|
+
```
|
289
|
+
|
290
|
+
#### Using the admin_get_identity_with_http_info variant
|
291
|
+
|
292
|
+
This returns an Array which contains the response data, status code and headers.
|
293
|
+
|
294
|
+
> <Array(<Identity>, Integer, Hash)> admin_get_identity_with_http_info(id)
|
295
|
+
|
296
|
+
```ruby
|
297
|
+
begin
|
298
|
+
# Get an Identity
|
299
|
+
data, status_code, headers = api_instance.admin_get_identity_with_http_info(id)
|
300
|
+
p status_code # => 2xx
|
301
|
+
p headers # => { ... }
|
302
|
+
p data # => <Identity>
|
303
|
+
rescue OryClient::ApiError => e
|
304
|
+
puts "Error when calling V0alpha2Api->admin_get_identity_with_http_info: #{e}"
|
305
|
+
end
|
306
|
+
```
|
307
|
+
|
308
|
+
### Parameters
|
309
|
+
|
310
|
+
| Name | Type | Description | Notes |
|
311
|
+
| ---- | ---- | ----------- | ----- |
|
312
|
+
| **id** | **String** | ID must be set to the ID of identity you want to get | |
|
313
|
+
|
314
|
+
### Return type
|
315
|
+
|
316
|
+
[**Identity**](Identity.md)
|
317
|
+
|
318
|
+
### Authorization
|
319
|
+
|
320
|
+
[oryAccessToken](../README.md#oryAccessToken)
|
321
|
+
|
322
|
+
### HTTP request headers
|
323
|
+
|
324
|
+
- **Content-Type**: Not defined
|
325
|
+
- **Accept**: application/json
|
326
|
+
|
327
|
+
|
328
|
+
## admin_list_identities
|
329
|
+
|
330
|
+
> <Array<Identity>> admin_list_identities(opts)
|
331
|
+
|
332
|
+
List Identities
|
333
|
+
|
334
|
+
Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
335
|
+
|
336
|
+
### Examples
|
337
|
+
|
338
|
+
```ruby
|
339
|
+
require 'time'
|
340
|
+
require 'ory-client'
|
341
|
+
# setup authorization
|
342
|
+
OryClient.configure do |config|
|
343
|
+
# Configure API key authorization: oryAccessToken
|
344
|
+
config.api_key['oryAccessToken'] = 'YOUR API KEY'
|
345
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
346
|
+
# config.api_key_prefix['oryAccessToken'] = 'Bearer'
|
347
|
+
end
|
348
|
+
|
349
|
+
api_instance = OryClient::V0alpha2Api.new
|
350
|
+
opts = {
|
351
|
+
per_page: 789, # Integer | Items per Page This is the number of items per page.
|
352
|
+
page: 789 # Integer | Pagination Page
|
353
|
+
}
|
354
|
+
|
355
|
+
begin
|
356
|
+
# List Identities
|
357
|
+
result = api_instance.admin_list_identities(opts)
|
358
|
+
p result
|
359
|
+
rescue OryClient::ApiError => e
|
360
|
+
puts "Error when calling V0alpha2Api->admin_list_identities: #{e}"
|
361
|
+
end
|
362
|
+
```
|
363
|
+
|
364
|
+
#### Using the admin_list_identities_with_http_info variant
|
365
|
+
|
366
|
+
This returns an Array which contains the response data, status code and headers.
|
367
|
+
|
368
|
+
> <Array(<Array<Identity>>, Integer, Hash)> admin_list_identities_with_http_info(opts)
|
369
|
+
|
370
|
+
```ruby
|
371
|
+
begin
|
372
|
+
# List Identities
|
373
|
+
data, status_code, headers = api_instance.admin_list_identities_with_http_info(opts)
|
374
|
+
p status_code # => 2xx
|
375
|
+
p headers # => { ... }
|
376
|
+
p data # => <Array<Identity>>
|
377
|
+
rescue OryClient::ApiError => e
|
378
|
+
puts "Error when calling V0alpha2Api->admin_list_identities_with_http_info: #{e}"
|
379
|
+
end
|
380
|
+
```
|
381
|
+
|
382
|
+
### Parameters
|
383
|
+
|
384
|
+
| Name | Type | Description | Notes |
|
385
|
+
| ---- | ---- | ----------- | ----- |
|
386
|
+
| **per_page** | **Integer** | Items per Page This is the number of items per page. | [optional][default to 100] |
|
387
|
+
| **page** | **Integer** | Pagination Page | [optional][default to 0] |
|
388
|
+
|
389
|
+
### Return type
|
390
|
+
|
391
|
+
[**Array<Identity>**](Identity.md)
|
392
|
+
|
393
|
+
### Authorization
|
394
|
+
|
395
|
+
[oryAccessToken](../README.md#oryAccessToken)
|
396
|
+
|
397
|
+
### HTTP request headers
|
398
|
+
|
399
|
+
- **Content-Type**: Not defined
|
400
|
+
- **Accept**: application/json
|
401
|
+
|
402
|
+
|
403
|
+
## admin_update_identity
|
404
|
+
|
405
|
+
> <Identity> admin_update_identity(id, opts)
|
406
|
+
|
407
|
+
Update an Identity
|
408
|
+
|
409
|
+
This endpoint updates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
410
|
+
|
411
|
+
### Examples
|
412
|
+
|
413
|
+
```ruby
|
414
|
+
require 'time'
|
415
|
+
require 'ory-client'
|
416
|
+
# setup authorization
|
417
|
+
OryClient.configure do |config|
|
418
|
+
# Configure API key authorization: oryAccessToken
|
419
|
+
config.api_key['oryAccessToken'] = 'YOUR API KEY'
|
420
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
421
|
+
# config.api_key_prefix['oryAccessToken'] = 'Bearer'
|
422
|
+
end
|
423
|
+
|
424
|
+
api_instance = OryClient::V0alpha2Api.new
|
425
|
+
id = 'id_example' # String | ID must be set to the ID of identity you want to update
|
426
|
+
opts = {
|
427
|
+
admin_update_identity_body: OryClient::AdminUpdateIdentityBody.new({state: OryClient::IdentityState::ACTIVE, traits: 3.56}) # AdminUpdateIdentityBody |
|
428
|
+
}
|
429
|
+
|
430
|
+
begin
|
431
|
+
# Update an Identity
|
432
|
+
result = api_instance.admin_update_identity(id, opts)
|
433
|
+
p result
|
434
|
+
rescue OryClient::ApiError => e
|
435
|
+
puts "Error when calling V0alpha2Api->admin_update_identity: #{e}"
|
436
|
+
end
|
437
|
+
```
|
438
|
+
|
439
|
+
#### Using the admin_update_identity_with_http_info variant
|
440
|
+
|
441
|
+
This returns an Array which contains the response data, status code and headers.
|
442
|
+
|
443
|
+
> <Array(<Identity>, Integer, Hash)> admin_update_identity_with_http_info(id, opts)
|
444
|
+
|
445
|
+
```ruby
|
446
|
+
begin
|
447
|
+
# Update an Identity
|
448
|
+
data, status_code, headers = api_instance.admin_update_identity_with_http_info(id, opts)
|
449
|
+
p status_code # => 2xx
|
450
|
+
p headers # => { ... }
|
451
|
+
p data # => <Identity>
|
452
|
+
rescue OryClient::ApiError => e
|
453
|
+
puts "Error when calling V0alpha2Api->admin_update_identity_with_http_info: #{e}"
|
454
|
+
end
|
455
|
+
```
|
456
|
+
|
457
|
+
### Parameters
|
458
|
+
|
459
|
+
| Name | Type | Description | Notes |
|
460
|
+
| ---- | ---- | ----------- | ----- |
|
461
|
+
| **id** | **String** | ID must be set to the ID of identity you want to update | |
|
462
|
+
| **admin_update_identity_body** | [**AdminUpdateIdentityBody**](AdminUpdateIdentityBody.md) | | [optional] |
|
463
|
+
|
464
|
+
### Return type
|
465
|
+
|
466
|
+
[**Identity**](Identity.md)
|
467
|
+
|
468
|
+
### Authorization
|
469
|
+
|
470
|
+
[oryAccessToken](../README.md#oryAccessToken)
|
471
|
+
|
472
|
+
### HTTP request headers
|
473
|
+
|
474
|
+
- **Content-Type**: application/json
|
475
|
+
- **Accept**: application/json
|
476
|
+
|
477
|
+
|
478
|
+
## create_self_service_logout_flow_url_for_browsers
|
479
|
+
|
480
|
+
> <SelfServiceLogoutUrl> create_self_service_logout_flow_url_for_browsers(opts)
|
481
|
+
|
482
|
+
Create a Logout URL for Browsers
|
483
|
+
|
484
|
+
This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
|
485
|
+
|
486
|
+
### Examples
|
487
|
+
|
488
|
+
```ruby
|
489
|
+
require 'time'
|
490
|
+
require 'ory-client'
|
491
|
+
|
492
|
+
api_instance = OryClient::V0alpha2Api.new
|
493
|
+
opts = {
|
494
|
+
cookie: 'cookie_example' # String | HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
|
495
|
+
}
|
496
|
+
|
497
|
+
begin
|
498
|
+
# Create a Logout URL for Browsers
|
499
|
+
result = api_instance.create_self_service_logout_flow_url_for_browsers(opts)
|
500
|
+
p result
|
501
|
+
rescue OryClient::ApiError => e
|
502
|
+
puts "Error when calling V0alpha2Api->create_self_service_logout_flow_url_for_browsers: #{e}"
|
503
|
+
end
|
504
|
+
```
|
505
|
+
|
506
|
+
#### Using the create_self_service_logout_flow_url_for_browsers_with_http_info variant
|
507
|
+
|
508
|
+
This returns an Array which contains the response data, status code and headers.
|
509
|
+
|
510
|
+
> <Array(<SelfServiceLogoutUrl>, Integer, Hash)> create_self_service_logout_flow_url_for_browsers_with_http_info(opts)
|
511
|
+
|
512
|
+
```ruby
|
513
|
+
begin
|
514
|
+
# Create a Logout URL for Browsers
|
515
|
+
data, status_code, headers = api_instance.create_self_service_logout_flow_url_for_browsers_with_http_info(opts)
|
516
|
+
p status_code # => 2xx
|
517
|
+
p headers # => { ... }
|
518
|
+
p data # => <SelfServiceLogoutUrl>
|
519
|
+
rescue OryClient::ApiError => e
|
520
|
+
puts "Error when calling V0alpha2Api->create_self_service_logout_flow_url_for_browsers_with_http_info: #{e}"
|
521
|
+
end
|
522
|
+
```
|
523
|
+
|
524
|
+
### Parameters
|
525
|
+
|
526
|
+
| Name | Type | Description | Notes |
|
527
|
+
| ---- | ---- | ----------- | ----- |
|
528
|
+
| **cookie** | **String** | HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. | [optional] |
|
529
|
+
|
530
|
+
### Return type
|
531
|
+
|
532
|
+
[**SelfServiceLogoutUrl**](SelfServiceLogoutUrl.md)
|
533
|
+
|
534
|
+
### Authorization
|
535
|
+
|
536
|
+
No authorization required
|
537
|
+
|
538
|
+
### HTTP request headers
|
539
|
+
|
540
|
+
- **Content-Type**: Not defined
|
541
|
+
- **Accept**: application/json
|
542
|
+
|
543
|
+
|
544
|
+
## get_json_schema
|
545
|
+
|
546
|
+
> Object get_json_schema(id)
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
Get a JSON Schema
|
551
|
+
|
552
|
+
### Examples
|
553
|
+
|
554
|
+
```ruby
|
555
|
+
require 'time'
|
556
|
+
require 'ory-client'
|
557
|
+
|
558
|
+
api_instance = OryClient::V0alpha2Api.new
|
559
|
+
id = 'id_example' # String | ID must be set to the ID of schema you want to get
|
560
|
+
|
561
|
+
begin
|
562
|
+
|
563
|
+
result = api_instance.get_json_schema(id)
|
564
|
+
p result
|
565
|
+
rescue OryClient::ApiError => e
|
566
|
+
puts "Error when calling V0alpha2Api->get_json_schema: #{e}"
|
567
|
+
end
|
568
|
+
```
|
569
|
+
|
570
|
+
#### Using the get_json_schema_with_http_info variant
|
571
|
+
|
572
|
+
This returns an Array which contains the response data, status code and headers.
|
573
|
+
|
574
|
+
> <Array(Object, Integer, Hash)> get_json_schema_with_http_info(id)
|
575
|
+
|
576
|
+
```ruby
|
577
|
+
begin
|
578
|
+
|
579
|
+
data, status_code, headers = api_instance.get_json_schema_with_http_info(id)
|
580
|
+
p status_code # => 2xx
|
581
|
+
p headers # => { ... }
|
582
|
+
p data # => Object
|
583
|
+
rescue OryClient::ApiError => e
|
584
|
+
puts "Error when calling V0alpha2Api->get_json_schema_with_http_info: #{e}"
|
585
|
+
end
|
586
|
+
```
|
587
|
+
|
588
|
+
### Parameters
|
589
|
+
|
590
|
+
| Name | Type | Description | Notes |
|
591
|
+
| ---- | ---- | ----------- | ----- |
|
592
|
+
| **id** | **String** | ID must be set to the ID of schema you want to get | |
|
593
|
+
|
594
|
+
### Return type
|
595
|
+
|
596
|
+
**Object**
|
597
|
+
|
598
|
+
### Authorization
|
599
|
+
|
600
|
+
No authorization required
|
601
|
+
|
602
|
+
### HTTP request headers
|
603
|
+
|
604
|
+
- **Content-Type**: Not defined
|
605
|
+
- **Accept**: application/json
|
606
|
+
|
607
|
+
|
608
|
+
## get_self_service_error
|
609
|
+
|
610
|
+
> <SelfServiceError> get_self_service_error(id)
|
611
|
+
|
612
|
+
Get Self-Service Errors
|
613
|
+
|
614
|
+
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: `?id=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).
|
615
|
+
|
616
|
+
### Examples
|
617
|
+
|
618
|
+
```ruby
|
619
|
+
require 'time'
|
620
|
+
require 'ory-client'
|
621
|
+
|
622
|
+
api_instance = OryClient::V0alpha2Api.new
|
623
|
+
id = 'id_example' # String | Error is the error's ID
|
624
|
+
|
625
|
+
begin
|
626
|
+
# Get Self-Service Errors
|
627
|
+
result = api_instance.get_self_service_error(id)
|
628
|
+
p result
|
629
|
+
rescue OryClient::ApiError => e
|
630
|
+
puts "Error when calling V0alpha2Api->get_self_service_error: #{e}"
|
631
|
+
end
|
632
|
+
```
|
633
|
+
|
634
|
+
#### Using the get_self_service_error_with_http_info variant
|
635
|
+
|
636
|
+
This returns an Array which contains the response data, status code and headers.
|
637
|
+
|
638
|
+
> <Array(<SelfServiceError>, Integer, Hash)> get_self_service_error_with_http_info(id)
|
639
|
+
|
640
|
+
```ruby
|
641
|
+
begin
|
642
|
+
# Get Self-Service Errors
|
643
|
+
data, status_code, headers = api_instance.get_self_service_error_with_http_info(id)
|
644
|
+
p status_code # => 2xx
|
645
|
+
p headers # => { ... }
|
646
|
+
p data # => <SelfServiceError>
|
647
|
+
rescue OryClient::ApiError => e
|
648
|
+
puts "Error when calling V0alpha2Api->get_self_service_error_with_http_info: #{e}"
|
649
|
+
end
|
650
|
+
```
|
651
|
+
|
652
|
+
### Parameters
|
653
|
+
|
654
|
+
| Name | Type | Description | Notes |
|
655
|
+
| ---- | ---- | ----------- | ----- |
|
656
|
+
| **id** | **String** | Error is the error's ID | |
|
657
|
+
|
658
|
+
### Return type
|
659
|
+
|
660
|
+
[**SelfServiceError**](SelfServiceError.md)
|
661
|
+
|
662
|
+
### Authorization
|
663
|
+
|
664
|
+
No authorization required
|
665
|
+
|
666
|
+
### HTTP request headers
|
667
|
+
|
668
|
+
- **Content-Type**: Not defined
|
669
|
+
- **Accept**: application/json
|
670
|
+
|
671
|
+
|
672
|
+
## get_self_service_login_flow
|
673
|
+
|
674
|
+
> <SelfServiceLoginFlow> get_self_service_login_flow(id, opts)
|
675
|
+
|
676
|
+
Get Login Flow
|
677
|
+
|
678
|
+
This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getSelfServiceLoginFlow(req.header('cookie'), req.query['flow']) res.render('login', flow) }) ``` 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).
|
679
|
+
|
680
|
+
### Examples
|
681
|
+
|
682
|
+
```ruby
|
683
|
+
require 'time'
|
684
|
+
require 'ory-client'
|
685
|
+
|
686
|
+
api_instance = OryClient::V0alpha2Api.new
|
687
|
+
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`).
|
688
|
+
opts = {
|
689
|
+
cookie: 'cookie_example' # String | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
690
|
+
}
|
691
|
+
|
692
|
+
begin
|
693
|
+
# Get Login Flow
|
694
|
+
result = api_instance.get_self_service_login_flow(id, opts)
|
695
|
+
p result
|
696
|
+
rescue OryClient::ApiError => e
|
697
|
+
puts "Error when calling V0alpha2Api->get_self_service_login_flow: #{e}"
|
698
|
+
end
|
699
|
+
```
|
700
|
+
|
701
|
+
#### Using the get_self_service_login_flow_with_http_info variant
|
702
|
+
|
703
|
+
This returns an Array which contains the response data, status code and headers.
|
704
|
+
|
705
|
+
> <Array(<SelfServiceLoginFlow>, Integer, Hash)> get_self_service_login_flow_with_http_info(id, opts)
|
706
|
+
|
707
|
+
```ruby
|
708
|
+
begin
|
709
|
+
# Get Login Flow
|
710
|
+
data, status_code, headers = api_instance.get_self_service_login_flow_with_http_info(id, opts)
|
711
|
+
p status_code # => 2xx
|
712
|
+
p headers # => { ... }
|
713
|
+
p data # => <SelfServiceLoginFlow>
|
714
|
+
rescue OryClient::ApiError => e
|
715
|
+
puts "Error when calling V0alpha2Api->get_self_service_login_flow_with_http_info: #{e}"
|
716
|
+
end
|
717
|
+
```
|
718
|
+
|
719
|
+
### Parameters
|
720
|
+
|
721
|
+
| Name | Type | Description | Notes |
|
722
|
+
| ---- | ---- | ----------- | ----- |
|
723
|
+
| **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`). | |
|
724
|
+
| **cookie** | **String** | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. | [optional] |
|
725
|
+
|
726
|
+
### Return type
|
727
|
+
|
728
|
+
[**SelfServiceLoginFlow**](SelfServiceLoginFlow.md)
|
729
|
+
|
730
|
+
### Authorization
|
731
|
+
|
732
|
+
No authorization required
|
733
|
+
|
734
|
+
### HTTP request headers
|
735
|
+
|
736
|
+
- **Content-Type**: Not defined
|
737
|
+
- **Accept**: application/json
|
738
|
+
|
739
|
+
|
740
|
+
## get_self_service_recovery_flow
|
741
|
+
|
742
|
+
> <SelfServiceRecoveryFlow> get_self_service_recovery_flow(id, opts)
|
743
|
+
|
744
|
+
Get Recovery Flow
|
745
|
+
|
746
|
+
This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceRecoveryFlow(req.header('Cookie'), req.query['flow']) res.render('recovery', flow) }) ``` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
|
747
|
+
|
748
|
+
### Examples
|
749
|
+
|
750
|
+
```ruby
|
751
|
+
require 'time'
|
752
|
+
require 'ory-client'
|
753
|
+
|
754
|
+
api_instance = OryClient::V0alpha2Api.new
|
755
|
+
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`).
|
756
|
+
opts = {
|
757
|
+
cookie: 'cookie_example' # String | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
758
|
+
}
|
759
|
+
|
760
|
+
begin
|
761
|
+
# Get Recovery Flow
|
762
|
+
result = api_instance.get_self_service_recovery_flow(id, opts)
|
763
|
+
p result
|
764
|
+
rescue OryClient::ApiError => e
|
765
|
+
puts "Error when calling V0alpha2Api->get_self_service_recovery_flow: #{e}"
|
766
|
+
end
|
767
|
+
```
|
768
|
+
|
769
|
+
#### Using the get_self_service_recovery_flow_with_http_info variant
|
770
|
+
|
771
|
+
This returns an Array which contains the response data, status code and headers.
|
772
|
+
|
773
|
+
> <Array(<SelfServiceRecoveryFlow>, Integer, Hash)> get_self_service_recovery_flow_with_http_info(id, opts)
|
774
|
+
|
775
|
+
```ruby
|
776
|
+
begin
|
777
|
+
# Get Recovery Flow
|
778
|
+
data, status_code, headers = api_instance.get_self_service_recovery_flow_with_http_info(id, opts)
|
779
|
+
p status_code # => 2xx
|
780
|
+
p headers # => { ... }
|
781
|
+
p data # => <SelfServiceRecoveryFlow>
|
782
|
+
rescue OryClient::ApiError => e
|
783
|
+
puts "Error when calling V0alpha2Api->get_self_service_recovery_flow_with_http_info: #{e}"
|
784
|
+
end
|
785
|
+
```
|
786
|
+
|
787
|
+
### Parameters
|
788
|
+
|
789
|
+
| Name | Type | Description | Notes |
|
790
|
+
| ---- | ---- | ----------- | ----- |
|
791
|
+
| **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`). | |
|
792
|
+
| **cookie** | **String** | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. | [optional] |
|
793
|
+
|
794
|
+
### Return type
|
795
|
+
|
796
|
+
[**SelfServiceRecoveryFlow**](SelfServiceRecoveryFlow.md)
|
797
|
+
|
798
|
+
### Authorization
|
799
|
+
|
800
|
+
No authorization required
|
801
|
+
|
802
|
+
### HTTP request headers
|
803
|
+
|
804
|
+
- **Content-Type**: Not defined
|
805
|
+
- **Accept**: application/json
|
806
|
+
|
807
|
+
|
808
|
+
## get_self_service_registration_flow
|
809
|
+
|
810
|
+
> <SelfServiceRegistrationFlow> get_self_service_registration_flow(id, opts)
|
811
|
+
|
812
|
+
Get Registration Flow
|
813
|
+
|
814
|
+
This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getSelfServiceRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) ``` 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).
|
815
|
+
|
816
|
+
### Examples
|
817
|
+
|
818
|
+
```ruby
|
819
|
+
require 'time'
|
820
|
+
require 'ory-client'
|
821
|
+
|
822
|
+
api_instance = OryClient::V0alpha2Api.new
|
823
|
+
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`).
|
824
|
+
opts = {
|
825
|
+
cookie: 'cookie_example' # String | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
826
|
+
}
|
827
|
+
|
828
|
+
begin
|
829
|
+
# Get Registration Flow
|
830
|
+
result = api_instance.get_self_service_registration_flow(id, opts)
|
831
|
+
p result
|
832
|
+
rescue OryClient::ApiError => e
|
833
|
+
puts "Error when calling V0alpha2Api->get_self_service_registration_flow: #{e}"
|
834
|
+
end
|
835
|
+
```
|
836
|
+
|
837
|
+
#### Using the get_self_service_registration_flow_with_http_info variant
|
838
|
+
|
839
|
+
This returns an Array which contains the response data, status code and headers.
|
840
|
+
|
841
|
+
> <Array(<SelfServiceRegistrationFlow>, Integer, Hash)> get_self_service_registration_flow_with_http_info(id, opts)
|
842
|
+
|
843
|
+
```ruby
|
844
|
+
begin
|
845
|
+
# Get Registration Flow
|
846
|
+
data, status_code, headers = api_instance.get_self_service_registration_flow_with_http_info(id, opts)
|
847
|
+
p status_code # => 2xx
|
848
|
+
p headers # => { ... }
|
849
|
+
p data # => <SelfServiceRegistrationFlow>
|
850
|
+
rescue OryClient::ApiError => e
|
851
|
+
puts "Error when calling V0alpha2Api->get_self_service_registration_flow_with_http_info: #{e}"
|
852
|
+
end
|
853
|
+
```
|
854
|
+
|
855
|
+
### Parameters
|
856
|
+
|
857
|
+
| Name | Type | Description | Notes |
|
858
|
+
| ---- | ---- | ----------- | ----- |
|
859
|
+
| **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`). | |
|
860
|
+
| **cookie** | **String** | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. | [optional] |
|
861
|
+
|
862
|
+
### Return type
|
863
|
+
|
864
|
+
[**SelfServiceRegistrationFlow**](SelfServiceRegistrationFlow.md)
|
865
|
+
|
866
|
+
### Authorization
|
867
|
+
|
868
|
+
No authorization required
|
869
|
+
|
870
|
+
### HTTP request headers
|
871
|
+
|
872
|
+
- **Content-Type**: Not defined
|
873
|
+
- **Accept**: application/json
|
874
|
+
|
875
|
+
|
876
|
+
## get_self_service_settings_flow
|
877
|
+
|
878
|
+
> <SelfServiceSettingsFlow> get_self_service_settings_flow(id, opts)
|
879
|
+
|
880
|
+
Get Settings Flow
|
881
|
+
|
882
|
+
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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. 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).
|
883
|
+
|
884
|
+
### Examples
|
885
|
+
|
886
|
+
```ruby
|
887
|
+
require 'time'
|
888
|
+
require 'ory-client'
|
889
|
+
|
890
|
+
api_instance = OryClient::V0alpha2Api.new
|
891
|
+
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`).
|
892
|
+
opts = {
|
893
|
+
x_session_token: 'x_session_token_example', # String | The Session Token When using the SDK in an app without a browser, please include the session token here.
|
894
|
+
cookie: 'cookie_example' # String | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. You only need to do this for browser- based flows.
|
895
|
+
}
|
896
|
+
|
897
|
+
begin
|
898
|
+
# Get Settings Flow
|
899
|
+
result = api_instance.get_self_service_settings_flow(id, opts)
|
900
|
+
p result
|
901
|
+
rescue OryClient::ApiError => e
|
902
|
+
puts "Error when calling V0alpha2Api->get_self_service_settings_flow: #{e}"
|
903
|
+
end
|
904
|
+
```
|
905
|
+
|
906
|
+
#### Using the get_self_service_settings_flow_with_http_info variant
|
907
|
+
|
908
|
+
This returns an Array which contains the response data, status code and headers.
|
909
|
+
|
910
|
+
> <Array(<SelfServiceSettingsFlow>, Integer, Hash)> get_self_service_settings_flow_with_http_info(id, opts)
|
911
|
+
|
912
|
+
```ruby
|
913
|
+
begin
|
914
|
+
# Get Settings Flow
|
915
|
+
data, status_code, headers = api_instance.get_self_service_settings_flow_with_http_info(id, opts)
|
916
|
+
p status_code # => 2xx
|
917
|
+
p headers # => { ... }
|
918
|
+
p data # => <SelfServiceSettingsFlow>
|
919
|
+
rescue OryClient::ApiError => e
|
920
|
+
puts "Error when calling V0alpha2Api->get_self_service_settings_flow_with_http_info: #{e}"
|
921
|
+
end
|
922
|
+
```
|
923
|
+
|
924
|
+
### Parameters
|
925
|
+
|
926
|
+
| Name | Type | Description | Notes |
|
927
|
+
| ---- | ---- | ----------- | ----- |
|
928
|
+
| **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`). | |
|
929
|
+
| **x_session_token** | **String** | The Session Token When using the SDK in an app without a browser, please include the session token here. | [optional] |
|
930
|
+
| **cookie** | **String** | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. You only need to do this for browser- based flows. | [optional] |
|
931
|
+
|
932
|
+
### Return type
|
933
|
+
|
934
|
+
[**SelfServiceSettingsFlow**](SelfServiceSettingsFlow.md)
|
935
|
+
|
936
|
+
### Authorization
|
937
|
+
|
938
|
+
No authorization required
|
939
|
+
|
940
|
+
### HTTP request headers
|
941
|
+
|
942
|
+
- **Content-Type**: Not defined
|
943
|
+
- **Accept**: application/json
|
944
|
+
|
945
|
+
|
946
|
+
## get_self_service_verification_flow
|
947
|
+
|
948
|
+
> <SelfServiceVerificationFlow> get_self_service_verification_flow(id, opts)
|
949
|
+
|
950
|
+
Get Verification Flow
|
951
|
+
|
952
|
+
This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: ```js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceVerificationFlow(req.header('cookie'), req.query['flow']) res.render('verification', flow) }) 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).
|
953
|
+
|
954
|
+
### Examples
|
955
|
+
|
956
|
+
```ruby
|
957
|
+
require 'time'
|
958
|
+
require 'ory-client'
|
959
|
+
|
960
|
+
api_instance = OryClient::V0alpha2Api.new
|
961
|
+
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`).
|
962
|
+
opts = {
|
963
|
+
cookie: 'cookie_example' # String | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
964
|
+
}
|
965
|
+
|
966
|
+
begin
|
967
|
+
# Get Verification Flow
|
968
|
+
result = api_instance.get_self_service_verification_flow(id, opts)
|
969
|
+
p result
|
970
|
+
rescue OryClient::ApiError => e
|
971
|
+
puts "Error when calling V0alpha2Api->get_self_service_verification_flow: #{e}"
|
972
|
+
end
|
973
|
+
```
|
974
|
+
|
975
|
+
#### Using the get_self_service_verification_flow_with_http_info variant
|
976
|
+
|
977
|
+
This returns an Array which contains the response data, status code and headers.
|
978
|
+
|
979
|
+
> <Array(<SelfServiceVerificationFlow>, Integer, Hash)> get_self_service_verification_flow_with_http_info(id, opts)
|
980
|
+
|
981
|
+
```ruby
|
982
|
+
begin
|
983
|
+
# Get Verification Flow
|
984
|
+
data, status_code, headers = api_instance.get_self_service_verification_flow_with_http_info(id, opts)
|
985
|
+
p status_code # => 2xx
|
986
|
+
p headers # => { ... }
|
987
|
+
p data # => <SelfServiceVerificationFlow>
|
988
|
+
rescue OryClient::ApiError => e
|
989
|
+
puts "Error when calling V0alpha2Api->get_self_service_verification_flow_with_http_info: #{e}"
|
990
|
+
end
|
991
|
+
```
|
992
|
+
|
993
|
+
### Parameters
|
994
|
+
|
995
|
+
| Name | Type | Description | Notes |
|
996
|
+
| ---- | ---- | ----------- | ----- |
|
997
|
+
| **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`). | |
|
998
|
+
| **cookie** | **String** | HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. | [optional] |
|
999
|
+
|
1000
|
+
### Return type
|
1001
|
+
|
1002
|
+
[**SelfServiceVerificationFlow**](SelfServiceVerificationFlow.md)
|
1003
|
+
|
1004
|
+
### Authorization
|
1005
|
+
|
1006
|
+
No authorization required
|
1007
|
+
|
1008
|
+
### HTTP request headers
|
1009
|
+
|
1010
|
+
- **Content-Type**: Not defined
|
1011
|
+
- **Accept**: application/json
|
1012
|
+
|
1013
|
+
|
1014
|
+
## initialize_self_service_login_flow_for_browsers
|
1015
|
+
|
1016
|
+
> <SelfServiceLoginFlow> initialize_self_service_login_flow_for_browsers(opts)
|
1017
|
+
|
1018
|
+
Initialize Login Flow for Browsers
|
1019
|
+
|
1020
|
+
This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it 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. If this endpoint is called via an AJAX request, the response contains the login flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. 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).
|
1021
|
+
|
1022
|
+
### Examples
|
1023
|
+
|
1024
|
+
```ruby
|
1025
|
+
require 'time'
|
1026
|
+
require 'ory-client'
|
1027
|
+
|
1028
|
+
api_instance = OryClient::V0alpha2Api.new
|
1029
|
+
opts = {
|
1030
|
+
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.
|
1031
|
+
aal: 'aal_example', # String | Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\".
|
1032
|
+
x_session_token: 'x_session_token_example' # String | The Session Token of the Identity performing the settings flow.
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
begin
|
1036
|
+
# Initialize Login Flow for Browsers
|
1037
|
+
result = api_instance.initialize_self_service_login_flow_for_browsers(opts)
|
1038
|
+
p result
|
1039
|
+
rescue OryClient::ApiError => e
|
1040
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_login_flow_for_browsers: #{e}"
|
1041
|
+
end
|
1042
|
+
```
|
1043
|
+
|
1044
|
+
#### Using the initialize_self_service_login_flow_for_browsers_with_http_info variant
|
1045
|
+
|
1046
|
+
This returns an Array which contains the response data, status code and headers.
|
1047
|
+
|
1048
|
+
> <Array(<SelfServiceLoginFlow>, Integer, Hash)> initialize_self_service_login_flow_for_browsers_with_http_info(opts)
|
1049
|
+
|
1050
|
+
```ruby
|
1051
|
+
begin
|
1052
|
+
# Initialize Login Flow for Browsers
|
1053
|
+
data, status_code, headers = api_instance.initialize_self_service_login_flow_for_browsers_with_http_info(opts)
|
1054
|
+
p status_code # => 2xx
|
1055
|
+
p headers # => { ... }
|
1056
|
+
p data # => <SelfServiceLoginFlow>
|
1057
|
+
rescue OryClient::ApiError => e
|
1058
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_login_flow_for_browsers_with_http_info: #{e}"
|
1059
|
+
end
|
1060
|
+
```
|
1061
|
+
|
1062
|
+
### Parameters
|
1063
|
+
|
1064
|
+
| Name | Type | Description | Notes |
|
1065
|
+
| ---- | ---- | ----------- | ----- |
|
1066
|
+
| **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] |
|
1067
|
+
| **aal** | **String** | Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". | [optional] |
|
1068
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
1069
|
+
|
1070
|
+
### Return type
|
1071
|
+
|
1072
|
+
[**SelfServiceLoginFlow**](SelfServiceLoginFlow.md)
|
1073
|
+
|
1074
|
+
### Authorization
|
1075
|
+
|
1076
|
+
No authorization required
|
1077
|
+
|
1078
|
+
### HTTP request headers
|
1079
|
+
|
1080
|
+
- **Content-Type**: Not defined
|
1081
|
+
- **Accept**: application/json
|
1082
|
+
|
1083
|
+
|
1084
|
+
## initialize_self_service_login_flow_without_browser
|
1085
|
+
|
1086
|
+
> <SelfServiceLoginFlow> initialize_self_service_login_flow_without_browser(opts)
|
1087
|
+
|
1088
|
+
Initialize Login Flow for APIs, Services, Apps, ...
|
1089
|
+
|
1090
|
+
This endpoint initiates a login flow for API clients that do not use a browser, 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>`. 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).
|
1091
|
+
|
1092
|
+
### Examples
|
1093
|
+
|
1094
|
+
```ruby
|
1095
|
+
require 'time'
|
1096
|
+
require 'ory-client'
|
1097
|
+
|
1098
|
+
api_instance = OryClient::V0alpha2Api.new
|
1099
|
+
opts = {
|
1100
|
+
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.
|
1101
|
+
aal: 'aal_example', # String | Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\".
|
1102
|
+
x_session_token: 'x_session_token_example' # String | The Session Token of the Identity performing the settings flow.
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
begin
|
1106
|
+
# Initialize Login Flow for APIs, Services, Apps, ...
|
1107
|
+
result = api_instance.initialize_self_service_login_flow_without_browser(opts)
|
1108
|
+
p result
|
1109
|
+
rescue OryClient::ApiError => e
|
1110
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_login_flow_without_browser: #{e}"
|
1111
|
+
end
|
1112
|
+
```
|
1113
|
+
|
1114
|
+
#### Using the initialize_self_service_login_flow_without_browser_with_http_info variant
|
1115
|
+
|
1116
|
+
This returns an Array which contains the response data, status code and headers.
|
1117
|
+
|
1118
|
+
> <Array(<SelfServiceLoginFlow>, Integer, Hash)> initialize_self_service_login_flow_without_browser_with_http_info(opts)
|
1119
|
+
|
1120
|
+
```ruby
|
1121
|
+
begin
|
1122
|
+
# Initialize Login Flow for APIs, Services, Apps, ...
|
1123
|
+
data, status_code, headers = api_instance.initialize_self_service_login_flow_without_browser_with_http_info(opts)
|
1124
|
+
p status_code # => 2xx
|
1125
|
+
p headers # => { ... }
|
1126
|
+
p data # => <SelfServiceLoginFlow>
|
1127
|
+
rescue OryClient::ApiError => e
|
1128
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_login_flow_without_browser_with_http_info: #{e}"
|
1129
|
+
end
|
1130
|
+
```
|
1131
|
+
|
1132
|
+
### Parameters
|
1133
|
+
|
1134
|
+
| Name | Type | Description | Notes |
|
1135
|
+
| ---- | ---- | ----------- | ----- |
|
1136
|
+
| **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] |
|
1137
|
+
| **aal** | **String** | Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session's authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to \"upgrade\" the session's security by asking the user to perform TOTP / WebAuth/ ... you would set this to \"aal2\". | [optional] |
|
1138
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
1139
|
+
|
1140
|
+
### Return type
|
1141
|
+
|
1142
|
+
[**SelfServiceLoginFlow**](SelfServiceLoginFlow.md)
|
1143
|
+
|
1144
|
+
### Authorization
|
1145
|
+
|
1146
|
+
No authorization required
|
1147
|
+
|
1148
|
+
### HTTP request headers
|
1149
|
+
|
1150
|
+
- **Content-Type**: Not defined
|
1151
|
+
- **Accept**: application/json
|
1152
|
+
|
1153
|
+
|
1154
|
+
## initialize_self_service_recovery_flow_for_browsers
|
1155
|
+
|
1156
|
+
> <SelfServiceRecoveryFlow> initialize_self_service_recovery_flow_for_browsers
|
1157
|
+
|
1158
|
+
Initialize Recovery Flow for Browsers
|
1159
|
+
|
1160
|
+
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. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
|
1161
|
+
|
1162
|
+
### Examples
|
1163
|
+
|
1164
|
+
```ruby
|
1165
|
+
require 'time'
|
1166
|
+
require 'ory-client'
|
1167
|
+
|
1168
|
+
api_instance = OryClient::V0alpha2Api.new
|
1169
|
+
|
1170
|
+
begin
|
1171
|
+
# Initialize Recovery Flow for Browsers
|
1172
|
+
result = api_instance.initialize_self_service_recovery_flow_for_browsers
|
1173
|
+
p result
|
1174
|
+
rescue OryClient::ApiError => e
|
1175
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_recovery_flow_for_browsers: #{e}"
|
1176
|
+
end
|
1177
|
+
```
|
1178
|
+
|
1179
|
+
#### Using the initialize_self_service_recovery_flow_for_browsers_with_http_info variant
|
1180
|
+
|
1181
|
+
This returns an Array which contains the response data, status code and headers.
|
1182
|
+
|
1183
|
+
> <Array(<SelfServiceRecoveryFlow>, Integer, Hash)> initialize_self_service_recovery_flow_for_browsers_with_http_info
|
1184
|
+
|
1185
|
+
```ruby
|
1186
|
+
begin
|
1187
|
+
# Initialize Recovery Flow for Browsers
|
1188
|
+
data, status_code, headers = api_instance.initialize_self_service_recovery_flow_for_browsers_with_http_info
|
1189
|
+
p status_code # => 2xx
|
1190
|
+
p headers # => { ... }
|
1191
|
+
p data # => <SelfServiceRecoveryFlow>
|
1192
|
+
rescue OryClient::ApiError => e
|
1193
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_recovery_flow_for_browsers_with_http_info: #{e}"
|
1194
|
+
end
|
1195
|
+
```
|
1196
|
+
|
1197
|
+
### Parameters
|
1198
|
+
|
1199
|
+
This endpoint does not need any parameter.
|
1200
|
+
|
1201
|
+
### Return type
|
1202
|
+
|
1203
|
+
[**SelfServiceRecoveryFlow**](SelfServiceRecoveryFlow.md)
|
1204
|
+
|
1205
|
+
### Authorization
|
1206
|
+
|
1207
|
+
No authorization required
|
1208
|
+
|
1209
|
+
### HTTP request headers
|
1210
|
+
|
1211
|
+
- **Content-Type**: Not defined
|
1212
|
+
- **Accept**: application/json
|
1213
|
+
|
1214
|
+
|
1215
|
+
## initialize_self_service_recovery_flow_without_browser
|
1216
|
+
|
1217
|
+
> <SelfServiceRecoveryFlow> initialize_self_service_recovery_flow_without_browser
|
1218
|
+
|
1219
|
+
Initialize Recovery Flow for APIs, Services, Apps, ...
|
1220
|
+
|
1221
|
+
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>`. 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).
|
1222
|
+
|
1223
|
+
### Examples
|
1224
|
+
|
1225
|
+
```ruby
|
1226
|
+
require 'time'
|
1227
|
+
require 'ory-client'
|
1228
|
+
|
1229
|
+
api_instance = OryClient::V0alpha2Api.new
|
1230
|
+
|
1231
|
+
begin
|
1232
|
+
# Initialize Recovery Flow for APIs, Services, Apps, ...
|
1233
|
+
result = api_instance.initialize_self_service_recovery_flow_without_browser
|
1234
|
+
p result
|
1235
|
+
rescue OryClient::ApiError => e
|
1236
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_recovery_flow_without_browser: #{e}"
|
1237
|
+
end
|
1238
|
+
```
|
1239
|
+
|
1240
|
+
#### Using the initialize_self_service_recovery_flow_without_browser_with_http_info variant
|
1241
|
+
|
1242
|
+
This returns an Array which contains the response data, status code and headers.
|
1243
|
+
|
1244
|
+
> <Array(<SelfServiceRecoveryFlow>, Integer, Hash)> initialize_self_service_recovery_flow_without_browser_with_http_info
|
1245
|
+
|
1246
|
+
```ruby
|
1247
|
+
begin
|
1248
|
+
# Initialize Recovery Flow for APIs, Services, Apps, ...
|
1249
|
+
data, status_code, headers = api_instance.initialize_self_service_recovery_flow_without_browser_with_http_info
|
1250
|
+
p status_code # => 2xx
|
1251
|
+
p headers # => { ... }
|
1252
|
+
p data # => <SelfServiceRecoveryFlow>
|
1253
|
+
rescue OryClient::ApiError => e
|
1254
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_recovery_flow_without_browser_with_http_info: #{e}"
|
1255
|
+
end
|
1256
|
+
```
|
1257
|
+
|
1258
|
+
### Parameters
|
1259
|
+
|
1260
|
+
This endpoint does not need any parameter.
|
1261
|
+
|
1262
|
+
### Return type
|
1263
|
+
|
1264
|
+
[**SelfServiceRecoveryFlow**](SelfServiceRecoveryFlow.md)
|
1265
|
+
|
1266
|
+
### Authorization
|
1267
|
+
|
1268
|
+
No authorization required
|
1269
|
+
|
1270
|
+
### HTTP request headers
|
1271
|
+
|
1272
|
+
- **Content-Type**: Not defined
|
1273
|
+
- **Accept**: application/json
|
1274
|
+
|
1275
|
+
|
1276
|
+
## initialize_self_service_registration_flow_for_browsers
|
1277
|
+
|
1278
|
+
> <SelfServiceRegistrationFlow> initialize_self_service_registration_flow_for_browsers
|
1279
|
+
|
1280
|
+
Initialize Registration Flow for Browsers
|
1281
|
+
|
1282
|
+
This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: If this endpoint is opened as a link in the browser, it 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`. If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. 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).
|
1283
|
+
|
1284
|
+
### Examples
|
1285
|
+
|
1286
|
+
```ruby
|
1287
|
+
require 'time'
|
1288
|
+
require 'ory-client'
|
1289
|
+
|
1290
|
+
api_instance = OryClient::V0alpha2Api.new
|
1291
|
+
|
1292
|
+
begin
|
1293
|
+
# Initialize Registration Flow for Browsers
|
1294
|
+
result = api_instance.initialize_self_service_registration_flow_for_browsers
|
1295
|
+
p result
|
1296
|
+
rescue OryClient::ApiError => e
|
1297
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_registration_flow_for_browsers: #{e}"
|
1298
|
+
end
|
1299
|
+
```
|
1300
|
+
|
1301
|
+
#### Using the initialize_self_service_registration_flow_for_browsers_with_http_info variant
|
1302
|
+
|
1303
|
+
This returns an Array which contains the response data, status code and headers.
|
1304
|
+
|
1305
|
+
> <Array(<SelfServiceRegistrationFlow>, Integer, Hash)> initialize_self_service_registration_flow_for_browsers_with_http_info
|
1306
|
+
|
1307
|
+
```ruby
|
1308
|
+
begin
|
1309
|
+
# Initialize Registration Flow for Browsers
|
1310
|
+
data, status_code, headers = api_instance.initialize_self_service_registration_flow_for_browsers_with_http_info
|
1311
|
+
p status_code # => 2xx
|
1312
|
+
p headers # => { ... }
|
1313
|
+
p data # => <SelfServiceRegistrationFlow>
|
1314
|
+
rescue OryClient::ApiError => e
|
1315
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_registration_flow_for_browsers_with_http_info: #{e}"
|
1316
|
+
end
|
1317
|
+
```
|
1318
|
+
|
1319
|
+
### Parameters
|
1320
|
+
|
1321
|
+
This endpoint does not need any parameter.
|
1322
|
+
|
1323
|
+
### Return type
|
1324
|
+
|
1325
|
+
[**SelfServiceRegistrationFlow**](SelfServiceRegistrationFlow.md)
|
1326
|
+
|
1327
|
+
### Authorization
|
1328
|
+
|
1329
|
+
No authorization required
|
1330
|
+
|
1331
|
+
### HTTP request headers
|
1332
|
+
|
1333
|
+
- **Content-Type**: Not defined
|
1334
|
+
- **Accept**: application/json
|
1335
|
+
|
1336
|
+
|
1337
|
+
## initialize_self_service_registration_flow_without_browser
|
1338
|
+
|
1339
|
+
> <SelfServiceRegistrationFlow> initialize_self_service_registration_flow_without_browser
|
1340
|
+
|
1341
|
+
Initialize Registration Flow for APIs, Services, Apps, ...
|
1342
|
+
|
1343
|
+
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>`. 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).
|
1344
|
+
|
1345
|
+
### Examples
|
1346
|
+
|
1347
|
+
```ruby
|
1348
|
+
require 'time'
|
1349
|
+
require 'ory-client'
|
1350
|
+
|
1351
|
+
api_instance = OryClient::V0alpha2Api.new
|
1352
|
+
|
1353
|
+
begin
|
1354
|
+
# Initialize Registration Flow for APIs, Services, Apps, ...
|
1355
|
+
result = api_instance.initialize_self_service_registration_flow_without_browser
|
1356
|
+
p result
|
1357
|
+
rescue OryClient::ApiError => e
|
1358
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_registration_flow_without_browser: #{e}"
|
1359
|
+
end
|
1360
|
+
```
|
1361
|
+
|
1362
|
+
#### Using the initialize_self_service_registration_flow_without_browser_with_http_info variant
|
1363
|
+
|
1364
|
+
This returns an Array which contains the response data, status code and headers.
|
1365
|
+
|
1366
|
+
> <Array(<SelfServiceRegistrationFlow>, Integer, Hash)> initialize_self_service_registration_flow_without_browser_with_http_info
|
1367
|
+
|
1368
|
+
```ruby
|
1369
|
+
begin
|
1370
|
+
# Initialize Registration Flow for APIs, Services, Apps, ...
|
1371
|
+
data, status_code, headers = api_instance.initialize_self_service_registration_flow_without_browser_with_http_info
|
1372
|
+
p status_code # => 2xx
|
1373
|
+
p headers # => { ... }
|
1374
|
+
p data # => <SelfServiceRegistrationFlow>
|
1375
|
+
rescue OryClient::ApiError => e
|
1376
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_registration_flow_without_browser_with_http_info: #{e}"
|
1377
|
+
end
|
1378
|
+
```
|
1379
|
+
|
1380
|
+
### Parameters
|
1381
|
+
|
1382
|
+
This endpoint does not need any parameter.
|
1383
|
+
|
1384
|
+
### Return type
|
1385
|
+
|
1386
|
+
[**SelfServiceRegistrationFlow**](SelfServiceRegistrationFlow.md)
|
1387
|
+
|
1388
|
+
### Authorization
|
1389
|
+
|
1390
|
+
No authorization required
|
1391
|
+
|
1392
|
+
### HTTP request headers
|
1393
|
+
|
1394
|
+
- **Content-Type**: Not defined
|
1395
|
+
- **Accept**: application/json
|
1396
|
+
|
1397
|
+
|
1398
|
+
## initialize_self_service_settings_flow_for_browsers
|
1399
|
+
|
1400
|
+
> <SelfServiceSettingsFlow> initialize_self_service_settings_flow_for_browsers(opts)
|
1401
|
+
|
1402
|
+
Initialize Settings Flow for Browsers
|
1403
|
+
|
1404
|
+
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. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 403 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
|
1405
|
+
|
1406
|
+
### Examples
|
1407
|
+
|
1408
|
+
```ruby
|
1409
|
+
require 'time'
|
1410
|
+
require 'ory-client'
|
1411
|
+
|
1412
|
+
api_instance = OryClient::V0alpha2Api.new
|
1413
|
+
opts = {
|
1414
|
+
cookie: 'cookie_example' # String | The Session Cookie of the Identity performing the settings flow.
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
begin
|
1418
|
+
# Initialize Settings Flow for Browsers
|
1419
|
+
result = api_instance.initialize_self_service_settings_flow_for_browsers(opts)
|
1420
|
+
p result
|
1421
|
+
rescue OryClient::ApiError => e
|
1422
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_settings_flow_for_browsers: #{e}"
|
1423
|
+
end
|
1424
|
+
```
|
1425
|
+
|
1426
|
+
#### Using the initialize_self_service_settings_flow_for_browsers_with_http_info variant
|
1427
|
+
|
1428
|
+
This returns an Array which contains the response data, status code and headers.
|
1429
|
+
|
1430
|
+
> <Array(<SelfServiceSettingsFlow>, Integer, Hash)> initialize_self_service_settings_flow_for_browsers_with_http_info(opts)
|
1431
|
+
|
1432
|
+
```ruby
|
1433
|
+
begin
|
1434
|
+
# Initialize Settings Flow for Browsers
|
1435
|
+
data, status_code, headers = api_instance.initialize_self_service_settings_flow_for_browsers_with_http_info(opts)
|
1436
|
+
p status_code # => 2xx
|
1437
|
+
p headers # => { ... }
|
1438
|
+
p data # => <SelfServiceSettingsFlow>
|
1439
|
+
rescue OryClient::ApiError => e
|
1440
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_settings_flow_for_browsers_with_http_info: #{e}"
|
1441
|
+
end
|
1442
|
+
```
|
1443
|
+
|
1444
|
+
### Parameters
|
1445
|
+
|
1446
|
+
| Name | Type | Description | Notes |
|
1447
|
+
| ---- | ---- | ----------- | ----- |
|
1448
|
+
| **cookie** | **String** | The Session Cookie of the Identity performing the settings flow. | [optional] |
|
1449
|
+
|
1450
|
+
### Return type
|
1451
|
+
|
1452
|
+
[**SelfServiceSettingsFlow**](SelfServiceSettingsFlow.md)
|
1453
|
+
|
1454
|
+
### Authorization
|
1455
|
+
|
1456
|
+
No authorization required
|
1457
|
+
|
1458
|
+
### HTTP request headers
|
1459
|
+
|
1460
|
+
- **Content-Type**: Not defined
|
1461
|
+
- **Accept**: application/json
|
1462
|
+
|
1463
|
+
|
1464
|
+
## initialize_self_service_settings_flow_without_browser
|
1465
|
+
|
1466
|
+
> <SelfServiceSettingsFlow> initialize_self_service_settings_flow_without_browser(opts)
|
1467
|
+
|
1468
|
+
Initialize Settings Flow for APIs, Services, Apps, ...
|
1469
|
+
|
1470
|
+
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>`. 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. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. 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).
|
1471
|
+
|
1472
|
+
### Examples
|
1473
|
+
|
1474
|
+
```ruby
|
1475
|
+
require 'time'
|
1476
|
+
require 'ory-client'
|
1477
|
+
|
1478
|
+
api_instance = OryClient::V0alpha2Api.new
|
1479
|
+
opts = {
|
1480
|
+
x_session_token: 'x_session_token_example' # String | The Session Token of the Identity performing the settings flow.
|
1481
|
+
}
|
1482
|
+
|
1483
|
+
begin
|
1484
|
+
# Initialize Settings Flow for APIs, Services, Apps, ...
|
1485
|
+
result = api_instance.initialize_self_service_settings_flow_without_browser(opts)
|
1486
|
+
p result
|
1487
|
+
rescue OryClient::ApiError => e
|
1488
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_settings_flow_without_browser: #{e}"
|
1489
|
+
end
|
1490
|
+
```
|
1491
|
+
|
1492
|
+
#### Using the initialize_self_service_settings_flow_without_browser_with_http_info variant
|
1493
|
+
|
1494
|
+
This returns an Array which contains the response data, status code and headers.
|
1495
|
+
|
1496
|
+
> <Array(<SelfServiceSettingsFlow>, Integer, Hash)> initialize_self_service_settings_flow_without_browser_with_http_info(opts)
|
1497
|
+
|
1498
|
+
```ruby
|
1499
|
+
begin
|
1500
|
+
# Initialize Settings Flow for APIs, Services, Apps, ...
|
1501
|
+
data, status_code, headers = api_instance.initialize_self_service_settings_flow_without_browser_with_http_info(opts)
|
1502
|
+
p status_code # => 2xx
|
1503
|
+
p headers # => { ... }
|
1504
|
+
p data # => <SelfServiceSettingsFlow>
|
1505
|
+
rescue OryClient::ApiError => e
|
1506
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_settings_flow_without_browser_with_http_info: #{e}"
|
1507
|
+
end
|
1508
|
+
```
|
1509
|
+
|
1510
|
+
### Parameters
|
1511
|
+
|
1512
|
+
| Name | Type | Description | Notes |
|
1513
|
+
| ---- | ---- | ----------- | ----- |
|
1514
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
1515
|
+
|
1516
|
+
### Return type
|
1517
|
+
|
1518
|
+
[**SelfServiceSettingsFlow**](SelfServiceSettingsFlow.md)
|
1519
|
+
|
1520
|
+
### Authorization
|
1521
|
+
|
1522
|
+
No authorization required
|
1523
|
+
|
1524
|
+
### HTTP request headers
|
1525
|
+
|
1526
|
+
- **Content-Type**: Not defined
|
1527
|
+
- **Accept**: application/json
|
1528
|
+
|
1529
|
+
|
1530
|
+
## initialize_self_service_verification_flow_for_browsers
|
1531
|
+
|
1532
|
+
> <SelfServiceVerificationFlow> initialize_self_service_verification_flow_for_browsers
|
1533
|
+
|
1534
|
+
Initialize Verification Flow for Browser Clients
|
1535
|
+
|
1536
|
+
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=`. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. 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).
|
1537
|
+
|
1538
|
+
### Examples
|
1539
|
+
|
1540
|
+
```ruby
|
1541
|
+
require 'time'
|
1542
|
+
require 'ory-client'
|
1543
|
+
|
1544
|
+
api_instance = OryClient::V0alpha2Api.new
|
1545
|
+
|
1546
|
+
begin
|
1547
|
+
# Initialize Verification Flow for Browser Clients
|
1548
|
+
result = api_instance.initialize_self_service_verification_flow_for_browsers
|
1549
|
+
p result
|
1550
|
+
rescue OryClient::ApiError => e
|
1551
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_verification_flow_for_browsers: #{e}"
|
1552
|
+
end
|
1553
|
+
```
|
1554
|
+
|
1555
|
+
#### Using the initialize_self_service_verification_flow_for_browsers_with_http_info variant
|
1556
|
+
|
1557
|
+
This returns an Array which contains the response data, status code and headers.
|
1558
|
+
|
1559
|
+
> <Array(<SelfServiceVerificationFlow>, Integer, Hash)> initialize_self_service_verification_flow_for_browsers_with_http_info
|
1560
|
+
|
1561
|
+
```ruby
|
1562
|
+
begin
|
1563
|
+
# Initialize Verification Flow for Browser Clients
|
1564
|
+
data, status_code, headers = api_instance.initialize_self_service_verification_flow_for_browsers_with_http_info
|
1565
|
+
p status_code # => 2xx
|
1566
|
+
p headers # => { ... }
|
1567
|
+
p data # => <SelfServiceVerificationFlow>
|
1568
|
+
rescue OryClient::ApiError => e
|
1569
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_verification_flow_for_browsers_with_http_info: #{e}"
|
1570
|
+
end
|
1571
|
+
```
|
1572
|
+
|
1573
|
+
### Parameters
|
1574
|
+
|
1575
|
+
This endpoint does not need any parameter.
|
1576
|
+
|
1577
|
+
### Return type
|
1578
|
+
|
1579
|
+
[**SelfServiceVerificationFlow**](SelfServiceVerificationFlow.md)
|
1580
|
+
|
1581
|
+
### Authorization
|
1582
|
+
|
1583
|
+
No authorization required
|
1584
|
+
|
1585
|
+
### HTTP request headers
|
1586
|
+
|
1587
|
+
- **Content-Type**: Not defined
|
1588
|
+
- **Accept**: application/json
|
1589
|
+
|
1590
|
+
|
1591
|
+
## initialize_self_service_verification_flow_without_browser
|
1592
|
+
|
1593
|
+
> <SelfServiceVerificationFlow> initialize_self_service_verification_flow_without_browser
|
1594
|
+
|
1595
|
+
Initialize Verification Flow for APIs, Services, Apps, ...
|
1596
|
+
|
1597
|
+
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>`. 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).
|
1598
|
+
|
1599
|
+
### Examples
|
1600
|
+
|
1601
|
+
```ruby
|
1602
|
+
require 'time'
|
1603
|
+
require 'ory-client'
|
1604
|
+
|
1605
|
+
api_instance = OryClient::V0alpha2Api.new
|
1606
|
+
|
1607
|
+
begin
|
1608
|
+
# Initialize Verification Flow for APIs, Services, Apps, ...
|
1609
|
+
result = api_instance.initialize_self_service_verification_flow_without_browser
|
1610
|
+
p result
|
1611
|
+
rescue OryClient::ApiError => e
|
1612
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_verification_flow_without_browser: #{e}"
|
1613
|
+
end
|
1614
|
+
```
|
1615
|
+
|
1616
|
+
#### Using the initialize_self_service_verification_flow_without_browser_with_http_info variant
|
1617
|
+
|
1618
|
+
This returns an Array which contains the response data, status code and headers.
|
1619
|
+
|
1620
|
+
> <Array(<SelfServiceVerificationFlow>, Integer, Hash)> initialize_self_service_verification_flow_without_browser_with_http_info
|
1621
|
+
|
1622
|
+
```ruby
|
1623
|
+
begin
|
1624
|
+
# Initialize Verification Flow for APIs, Services, Apps, ...
|
1625
|
+
data, status_code, headers = api_instance.initialize_self_service_verification_flow_without_browser_with_http_info
|
1626
|
+
p status_code # => 2xx
|
1627
|
+
p headers # => { ... }
|
1628
|
+
p data # => <SelfServiceVerificationFlow>
|
1629
|
+
rescue OryClient::ApiError => e
|
1630
|
+
puts "Error when calling V0alpha2Api->initialize_self_service_verification_flow_without_browser_with_http_info: #{e}"
|
1631
|
+
end
|
1632
|
+
```
|
1633
|
+
|
1634
|
+
### Parameters
|
1635
|
+
|
1636
|
+
This endpoint does not need any parameter.
|
1637
|
+
|
1638
|
+
### Return type
|
1639
|
+
|
1640
|
+
[**SelfServiceVerificationFlow**](SelfServiceVerificationFlow.md)
|
1641
|
+
|
1642
|
+
### Authorization
|
1643
|
+
|
1644
|
+
No authorization required
|
1645
|
+
|
1646
|
+
### HTTP request headers
|
1647
|
+
|
1648
|
+
- **Content-Type**: Not defined
|
1649
|
+
- **Accept**: application/json
|
1650
|
+
|
1651
|
+
|
1652
|
+
## submit_self_service_login_flow
|
1653
|
+
|
1654
|
+
> <SuccessfulSelfServiceLoginWithoutBrowser> submit_self_service_login_flow(flow, opts)
|
1655
|
+
|
1656
|
+
Submit a Login Flow
|
1657
|
+
|
1658
|
+
:::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. ::: Use this endpoint to complete a login flow. 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 a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond 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. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header 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. 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).
|
1659
|
+
|
1660
|
+
### Examples
|
1661
|
+
|
1662
|
+
```ruby
|
1663
|
+
require 'time'
|
1664
|
+
require 'ory-client'
|
1665
|
+
|
1666
|
+
api_instance = OryClient::V0alpha2Api.new
|
1667
|
+
flow = 'flow_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`).
|
1668
|
+
opts = {
|
1669
|
+
x_session_token: 'x_session_token_example', # String | The Session Token of the Identity performing the settings flow.
|
1670
|
+
submit_self_service_login_flow_body: OryClient::SubmitSelfServiceLoginFlowWithOidcMethodBody.new({method: 'method_example', traits: 'traits_example'}) # SubmitSelfServiceLoginFlowBody |
|
1671
|
+
}
|
1672
|
+
|
1673
|
+
begin
|
1674
|
+
# Submit a Login Flow
|
1675
|
+
result = api_instance.submit_self_service_login_flow(flow, opts)
|
1676
|
+
p result
|
1677
|
+
rescue OryClient::ApiError => e
|
1678
|
+
puts "Error when calling V0alpha2Api->submit_self_service_login_flow: #{e}"
|
1679
|
+
end
|
1680
|
+
```
|
1681
|
+
|
1682
|
+
#### Using the submit_self_service_login_flow_with_http_info variant
|
1683
|
+
|
1684
|
+
This returns an Array which contains the response data, status code and headers.
|
1685
|
+
|
1686
|
+
> <Array(<SuccessfulSelfServiceLoginWithoutBrowser>, Integer, Hash)> submit_self_service_login_flow_with_http_info(flow, opts)
|
1687
|
+
|
1688
|
+
```ruby
|
1689
|
+
begin
|
1690
|
+
# Submit a Login Flow
|
1691
|
+
data, status_code, headers = api_instance.submit_self_service_login_flow_with_http_info(flow, opts)
|
1692
|
+
p status_code # => 2xx
|
1693
|
+
p headers # => { ... }
|
1694
|
+
p data # => <SuccessfulSelfServiceLoginWithoutBrowser>
|
1695
|
+
rescue OryClient::ApiError => e
|
1696
|
+
puts "Error when calling V0alpha2Api->submit_self_service_login_flow_with_http_info: #{e}"
|
1697
|
+
end
|
1698
|
+
```
|
1699
|
+
|
1700
|
+
### Parameters
|
1701
|
+
|
1702
|
+
| Name | Type | Description | Notes |
|
1703
|
+
| ---- | ---- | ----------- | ----- |
|
1704
|
+
| **flow** | **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`). | |
|
1705
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
1706
|
+
| **submit_self_service_login_flow_body** | [**SubmitSelfServiceLoginFlowBody**](SubmitSelfServiceLoginFlowBody.md) | | [optional] |
|
1707
|
+
|
1708
|
+
### Return type
|
1709
|
+
|
1710
|
+
[**SuccessfulSelfServiceLoginWithoutBrowser**](SuccessfulSelfServiceLoginWithoutBrowser.md)
|
1711
|
+
|
1712
|
+
### Authorization
|
1713
|
+
|
1714
|
+
No authorization required
|
1715
|
+
|
1716
|
+
### HTTP request headers
|
1717
|
+
|
1718
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
1719
|
+
- **Accept**: application/json
|
1720
|
+
|
1721
|
+
|
1722
|
+
## submit_self_service_logout_flow
|
1723
|
+
|
1724
|
+
> submit_self_service_logout_flow(opts)
|
1725
|
+
|
1726
|
+
Complete Self-Service Logout
|
1727
|
+
|
1728
|
+
This endpoint logs out an identity in a self-service manner. If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 302 Found) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
|
1729
|
+
|
1730
|
+
### Examples
|
1731
|
+
|
1732
|
+
```ruby
|
1733
|
+
require 'time'
|
1734
|
+
require 'ory-client'
|
1735
|
+
|
1736
|
+
api_instance = OryClient::V0alpha2Api.new
|
1737
|
+
opts = {
|
1738
|
+
token: 'token_example' # String | A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/urls` to generate a URL for this endpoint.
|
1739
|
+
}
|
1740
|
+
|
1741
|
+
begin
|
1742
|
+
# Complete Self-Service Logout
|
1743
|
+
api_instance.submit_self_service_logout_flow(opts)
|
1744
|
+
rescue OryClient::ApiError => e
|
1745
|
+
puts "Error when calling V0alpha2Api->submit_self_service_logout_flow: #{e}"
|
1746
|
+
end
|
1747
|
+
```
|
1748
|
+
|
1749
|
+
#### Using the submit_self_service_logout_flow_with_http_info variant
|
1750
|
+
|
1751
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1752
|
+
|
1753
|
+
> <Array(nil, Integer, Hash)> submit_self_service_logout_flow_with_http_info(opts)
|
1754
|
+
|
1755
|
+
```ruby
|
1756
|
+
begin
|
1757
|
+
# Complete Self-Service Logout
|
1758
|
+
data, status_code, headers = api_instance.submit_self_service_logout_flow_with_http_info(opts)
|
1759
|
+
p status_code # => 2xx
|
1760
|
+
p headers # => { ... }
|
1761
|
+
p data # => nil
|
1762
|
+
rescue OryClient::ApiError => e
|
1763
|
+
puts "Error when calling V0alpha2Api->submit_self_service_logout_flow_with_http_info: #{e}"
|
1764
|
+
end
|
1765
|
+
```
|
1766
|
+
|
1767
|
+
### Parameters
|
1768
|
+
|
1769
|
+
| Name | Type | Description | Notes |
|
1770
|
+
| ---- | ---- | ----------- | ----- |
|
1771
|
+
| **token** | **String** | A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/urls` to generate a URL for this endpoint. | [optional] |
|
1772
|
+
|
1773
|
+
### Return type
|
1774
|
+
|
1775
|
+
nil (empty response body)
|
1776
|
+
|
1777
|
+
### Authorization
|
1778
|
+
|
1779
|
+
No authorization required
|
1780
|
+
|
1781
|
+
### HTTP request headers
|
1782
|
+
|
1783
|
+
- **Content-Type**: Not defined
|
1784
|
+
- **Accept**: application/json
|
1785
|
+
|
1786
|
+
|
1787
|
+
## submit_self_service_logout_flow_without_browser
|
1788
|
+
|
1789
|
+
> submit_self_service_logout_flow_without_browser(submit_self_service_logout_flow_without_browser_body)
|
1790
|
+
|
1791
|
+
Perform Logout for APIs, Services, Apps, ...
|
1792
|
+
|
1793
|
+
Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.
|
1794
|
+
|
1795
|
+
### Examples
|
1796
|
+
|
1797
|
+
```ruby
|
1798
|
+
require 'time'
|
1799
|
+
require 'ory-client'
|
1800
|
+
|
1801
|
+
api_instance = OryClient::V0alpha2Api.new
|
1802
|
+
submit_self_service_logout_flow_without_browser_body = OryClient::SubmitSelfServiceLogoutFlowWithoutBrowserBody.new({session_token: 'session_token_example'}) # SubmitSelfServiceLogoutFlowWithoutBrowserBody |
|
1803
|
+
|
1804
|
+
begin
|
1805
|
+
# Perform Logout for APIs, Services, Apps, ...
|
1806
|
+
api_instance.submit_self_service_logout_flow_without_browser(submit_self_service_logout_flow_without_browser_body)
|
1807
|
+
rescue OryClient::ApiError => e
|
1808
|
+
puts "Error when calling V0alpha2Api->submit_self_service_logout_flow_without_browser: #{e}"
|
1809
|
+
end
|
1810
|
+
```
|
1811
|
+
|
1812
|
+
#### Using the submit_self_service_logout_flow_without_browser_with_http_info variant
|
1813
|
+
|
1814
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1815
|
+
|
1816
|
+
> <Array(nil, Integer, Hash)> submit_self_service_logout_flow_without_browser_with_http_info(submit_self_service_logout_flow_without_browser_body)
|
1817
|
+
|
1818
|
+
```ruby
|
1819
|
+
begin
|
1820
|
+
# Perform Logout for APIs, Services, Apps, ...
|
1821
|
+
data, status_code, headers = api_instance.submit_self_service_logout_flow_without_browser_with_http_info(submit_self_service_logout_flow_without_browser_body)
|
1822
|
+
p status_code # => 2xx
|
1823
|
+
p headers # => { ... }
|
1824
|
+
p data # => nil
|
1825
|
+
rescue OryClient::ApiError => e
|
1826
|
+
puts "Error when calling V0alpha2Api->submit_self_service_logout_flow_without_browser_with_http_info: #{e}"
|
1827
|
+
end
|
1828
|
+
```
|
1829
|
+
|
1830
|
+
### Parameters
|
1831
|
+
|
1832
|
+
| Name | Type | Description | Notes |
|
1833
|
+
| ---- | ---- | ----------- | ----- |
|
1834
|
+
| **submit_self_service_logout_flow_without_browser_body** | [**SubmitSelfServiceLogoutFlowWithoutBrowserBody**](SubmitSelfServiceLogoutFlowWithoutBrowserBody.md) | | |
|
1835
|
+
|
1836
|
+
### Return type
|
1837
|
+
|
1838
|
+
nil (empty response body)
|
1839
|
+
|
1840
|
+
### Authorization
|
1841
|
+
|
1842
|
+
No authorization required
|
1843
|
+
|
1844
|
+
### HTTP request headers
|
1845
|
+
|
1846
|
+
- **Content-Type**: application/json
|
1847
|
+
- **Accept**: application/json
|
1848
|
+
|
1849
|
+
|
1850
|
+
## submit_self_service_recovery_flow
|
1851
|
+
|
1852
|
+
> <SelfServiceRecoveryFlow> submit_self_service_recovery_flow(flow, opts)
|
1853
|
+
|
1854
|
+
Complete Recovery Flow
|
1855
|
+
|
1856
|
+
Use this endpoint to complete a recovery flow. 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 and Browser clients with HTTP Header `Accept: application/json` 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 without HTTP Header `Accept` or with `Accept: text/*` 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` for the `link` 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).
|
1857
|
+
|
1858
|
+
### Examples
|
1859
|
+
|
1860
|
+
```ruby
|
1861
|
+
require 'time'
|
1862
|
+
require 'ory-client'
|
1863
|
+
|
1864
|
+
api_instance = OryClient::V0alpha2Api.new
|
1865
|
+
flow = 'flow_example' # String | The Recovery Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`).
|
1866
|
+
opts = {
|
1867
|
+
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. This parameter is usually set in a link and not used by any direct API call.
|
1868
|
+
submit_self_service_recovery_flow_body: OryClient::SubmitSelfServiceRecoveryFlowWithLinkMethodBody.new({email: 'email_example', method: 'link'}) # SubmitSelfServiceRecoveryFlowBody |
|
1869
|
+
}
|
1870
|
+
|
1871
|
+
begin
|
1872
|
+
# Complete Recovery Flow
|
1873
|
+
result = api_instance.submit_self_service_recovery_flow(flow, opts)
|
1874
|
+
p result
|
1875
|
+
rescue OryClient::ApiError => e
|
1876
|
+
puts "Error when calling V0alpha2Api->submit_self_service_recovery_flow: #{e}"
|
1877
|
+
end
|
1878
|
+
```
|
1879
|
+
|
1880
|
+
#### Using the submit_self_service_recovery_flow_with_http_info variant
|
1881
|
+
|
1882
|
+
This returns an Array which contains the response data, status code and headers.
|
1883
|
+
|
1884
|
+
> <Array(<SelfServiceRecoveryFlow>, Integer, Hash)> submit_self_service_recovery_flow_with_http_info(flow, opts)
|
1885
|
+
|
1886
|
+
```ruby
|
1887
|
+
begin
|
1888
|
+
# Complete Recovery Flow
|
1889
|
+
data, status_code, headers = api_instance.submit_self_service_recovery_flow_with_http_info(flow, opts)
|
1890
|
+
p status_code # => 2xx
|
1891
|
+
p headers # => { ... }
|
1892
|
+
p data # => <SelfServiceRecoveryFlow>
|
1893
|
+
rescue OryClient::ApiError => e
|
1894
|
+
puts "Error when calling V0alpha2Api->submit_self_service_recovery_flow_with_http_info: #{e}"
|
1895
|
+
end
|
1896
|
+
```
|
1897
|
+
|
1898
|
+
### Parameters
|
1899
|
+
|
1900
|
+
| Name | Type | Description | Notes |
|
1901
|
+
| ---- | ---- | ----------- | ----- |
|
1902
|
+
| **flow** | **String** | The Recovery Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). | |
|
1903
|
+
| **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. This parameter is usually set in a link and not used by any direct API call. | [optional] |
|
1904
|
+
| **submit_self_service_recovery_flow_body** | [**SubmitSelfServiceRecoveryFlowBody**](SubmitSelfServiceRecoveryFlowBody.md) | | [optional] |
|
1905
|
+
|
1906
|
+
### Return type
|
1907
|
+
|
1908
|
+
[**SelfServiceRecoveryFlow**](SelfServiceRecoveryFlow.md)
|
1909
|
+
|
1910
|
+
### Authorization
|
1911
|
+
|
1912
|
+
No authorization required
|
1913
|
+
|
1914
|
+
### HTTP request headers
|
1915
|
+
|
1916
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
1917
|
+
- **Accept**: application/json
|
1918
|
+
|
1919
|
+
|
1920
|
+
## submit_self_service_registration_flow
|
1921
|
+
|
1922
|
+
> <SuccessfulSelfServiceRegistrationWithoutBrowser> submit_self_service_registration_flow(flow, opts)
|
1923
|
+
|
1924
|
+
Submit a Registration Flow
|
1925
|
+
|
1926
|
+
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 a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond 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. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header 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. 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).
|
1927
|
+
|
1928
|
+
### Examples
|
1929
|
+
|
1930
|
+
```ruby
|
1931
|
+
require 'time'
|
1932
|
+
require 'ory-client'
|
1933
|
+
|
1934
|
+
api_instance = OryClient::V0alpha2Api.new
|
1935
|
+
flow = 'flow_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`).
|
1936
|
+
opts = {
|
1937
|
+
submit_self_service_registration_flow_body: OryClient::SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.new({method: 'password', password: 'password_example', traits: 3.56}) # SubmitSelfServiceRegistrationFlowBody |
|
1938
|
+
}
|
1939
|
+
|
1940
|
+
begin
|
1941
|
+
# Submit a Registration Flow
|
1942
|
+
result = api_instance.submit_self_service_registration_flow(flow, opts)
|
1943
|
+
p result
|
1944
|
+
rescue OryClient::ApiError => e
|
1945
|
+
puts "Error when calling V0alpha2Api->submit_self_service_registration_flow: #{e}"
|
1946
|
+
end
|
1947
|
+
```
|
1948
|
+
|
1949
|
+
#### Using the submit_self_service_registration_flow_with_http_info variant
|
1950
|
+
|
1951
|
+
This returns an Array which contains the response data, status code and headers.
|
1952
|
+
|
1953
|
+
> <Array(<SuccessfulSelfServiceRegistrationWithoutBrowser>, Integer, Hash)> submit_self_service_registration_flow_with_http_info(flow, opts)
|
1954
|
+
|
1955
|
+
```ruby
|
1956
|
+
begin
|
1957
|
+
# Submit a Registration Flow
|
1958
|
+
data, status_code, headers = api_instance.submit_self_service_registration_flow_with_http_info(flow, opts)
|
1959
|
+
p status_code # => 2xx
|
1960
|
+
p headers # => { ... }
|
1961
|
+
p data # => <SuccessfulSelfServiceRegistrationWithoutBrowser>
|
1962
|
+
rescue OryClient::ApiError => e
|
1963
|
+
puts "Error when calling V0alpha2Api->submit_self_service_registration_flow_with_http_info: #{e}"
|
1964
|
+
end
|
1965
|
+
```
|
1966
|
+
|
1967
|
+
### Parameters
|
1968
|
+
|
1969
|
+
| Name | Type | Description | Notes |
|
1970
|
+
| ---- | ---- | ----------- | ----- |
|
1971
|
+
| **flow** | **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`). | |
|
1972
|
+
| **submit_self_service_registration_flow_body** | [**SubmitSelfServiceRegistrationFlowBody**](SubmitSelfServiceRegistrationFlowBody.md) | | [optional] |
|
1973
|
+
|
1974
|
+
### Return type
|
1975
|
+
|
1976
|
+
[**SuccessfulSelfServiceRegistrationWithoutBrowser**](SuccessfulSelfServiceRegistrationWithoutBrowser.md)
|
1977
|
+
|
1978
|
+
### Authorization
|
1979
|
+
|
1980
|
+
No authorization required
|
1981
|
+
|
1982
|
+
### HTTP request headers
|
1983
|
+
|
1984
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
1985
|
+
- **Accept**: application/json
|
1986
|
+
|
1987
|
+
|
1988
|
+
## submit_self_service_settings_flow
|
1989
|
+
|
1990
|
+
> <SelfServiceSettingsFlow> submit_self_service_settings_flow(flow, opts)
|
1991
|
+
|
1992
|
+
Complete Settings Flow
|
1993
|
+
|
1994
|
+
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 or the session's AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header `Accept` or with `Accept: text/*` respond 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 or the session's AAL is too low. Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
|
1995
|
+
|
1996
|
+
### Examples
|
1997
|
+
|
1998
|
+
```ruby
|
1999
|
+
require 'time'
|
2000
|
+
require 'ory-client'
|
2001
|
+
|
2002
|
+
api_instance = OryClient::V0alpha2Api.new
|
2003
|
+
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`).
|
2004
|
+
opts = {
|
2005
|
+
x_session_token: 'x_session_token_example', # String | The Session Token of the Identity performing the settings flow.
|
2006
|
+
submit_self_service_settings_flow_body: OryClient::SubmitSelfServiceSettingsFlowWithOidcMethodBody.new({method: 'method_example'}) # SubmitSelfServiceSettingsFlowBody |
|
2007
|
+
}
|
2008
|
+
|
2009
|
+
begin
|
2010
|
+
# Complete Settings Flow
|
2011
|
+
result = api_instance.submit_self_service_settings_flow(flow, opts)
|
2012
|
+
p result
|
2013
|
+
rescue OryClient::ApiError => e
|
2014
|
+
puts "Error when calling V0alpha2Api->submit_self_service_settings_flow: #{e}"
|
2015
|
+
end
|
2016
|
+
```
|
2017
|
+
|
2018
|
+
#### Using the submit_self_service_settings_flow_with_http_info variant
|
2019
|
+
|
2020
|
+
This returns an Array which contains the response data, status code and headers.
|
2021
|
+
|
2022
|
+
> <Array(<SelfServiceSettingsFlow>, Integer, Hash)> submit_self_service_settings_flow_with_http_info(flow, opts)
|
2023
|
+
|
2024
|
+
```ruby
|
2025
|
+
begin
|
2026
|
+
# Complete Settings Flow
|
2027
|
+
data, status_code, headers = api_instance.submit_self_service_settings_flow_with_http_info(flow, opts)
|
2028
|
+
p status_code # => 2xx
|
2029
|
+
p headers # => { ... }
|
2030
|
+
p data # => <SelfServiceSettingsFlow>
|
2031
|
+
rescue OryClient::ApiError => e
|
2032
|
+
puts "Error when calling V0alpha2Api->submit_self_service_settings_flow_with_http_info: #{e}"
|
2033
|
+
end
|
2034
|
+
```
|
2035
|
+
|
2036
|
+
### Parameters
|
2037
|
+
|
2038
|
+
| Name | Type | Description | Notes |
|
2039
|
+
| ---- | ---- | ----------- | ----- |
|
2040
|
+
| **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`). | |
|
2041
|
+
| **x_session_token** | **String** | The Session Token of the Identity performing the settings flow. | [optional] |
|
2042
|
+
| **submit_self_service_settings_flow_body** | [**SubmitSelfServiceSettingsFlowBody**](SubmitSelfServiceSettingsFlowBody.md) | | [optional] |
|
2043
|
+
|
2044
|
+
### Return type
|
2045
|
+
|
2046
|
+
[**SelfServiceSettingsFlow**](SelfServiceSettingsFlow.md)
|
2047
|
+
|
2048
|
+
### Authorization
|
2049
|
+
|
2050
|
+
No authorization required
|
2051
|
+
|
2052
|
+
### HTTP request headers
|
2053
|
+
|
2054
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
2055
|
+
- **Accept**: application/json
|
2056
|
+
|
2057
|
+
|
2058
|
+
## submit_self_service_verification_flow
|
2059
|
+
|
2060
|
+
> <SelfServiceVerificationFlow> submit_self_service_verification_flow(flow, opts)
|
2061
|
+
|
2062
|
+
Complete Verification Flow
|
2063
|
+
|
2064
|
+
Use this endpoint to complete a verification flow. 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 and Browser clients with HTTP Header `Accept: application/json` 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 without HTTP Header `Accept` or with `Accept: text/*` 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` when using the `link` 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).
|
2065
|
+
|
2066
|
+
### Examples
|
2067
|
+
|
2068
|
+
```ruby
|
2069
|
+
require 'time'
|
2070
|
+
require 'ory-client'
|
2071
|
+
|
2072
|
+
api_instance = OryClient::V0alpha2Api.new
|
2073
|
+
flow = 'flow_example' # String | The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`).
|
2074
|
+
opts = {
|
2075
|
+
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. This parameter is usually set in a link and not used by any direct API call.
|
2076
|
+
submit_self_service_verification_flow_body: OryClient::SubmitSelfServiceVerificationFlowWithLinkMethodBody.new({email: 'email_example', method: 'link'}) # SubmitSelfServiceVerificationFlowBody |
|
2077
|
+
}
|
2078
|
+
|
2079
|
+
begin
|
2080
|
+
# Complete Verification Flow
|
2081
|
+
result = api_instance.submit_self_service_verification_flow(flow, opts)
|
2082
|
+
p result
|
2083
|
+
rescue OryClient::ApiError => e
|
2084
|
+
puts "Error when calling V0alpha2Api->submit_self_service_verification_flow: #{e}"
|
2085
|
+
end
|
2086
|
+
```
|
2087
|
+
|
2088
|
+
#### Using the submit_self_service_verification_flow_with_http_info variant
|
2089
|
+
|
2090
|
+
This returns an Array which contains the response data, status code and headers.
|
2091
|
+
|
2092
|
+
> <Array(<SelfServiceVerificationFlow>, Integer, Hash)> submit_self_service_verification_flow_with_http_info(flow, opts)
|
2093
|
+
|
2094
|
+
```ruby
|
2095
|
+
begin
|
2096
|
+
# Complete Verification Flow
|
2097
|
+
data, status_code, headers = api_instance.submit_self_service_verification_flow_with_http_info(flow, opts)
|
2098
|
+
p status_code # => 2xx
|
2099
|
+
p headers # => { ... }
|
2100
|
+
p data # => <SelfServiceVerificationFlow>
|
2101
|
+
rescue OryClient::ApiError => e
|
2102
|
+
puts "Error when calling V0alpha2Api->submit_self_service_verification_flow_with_http_info: #{e}"
|
2103
|
+
end
|
2104
|
+
```
|
2105
|
+
|
2106
|
+
### Parameters
|
2107
|
+
|
2108
|
+
| Name | Type | Description | Notes |
|
2109
|
+
| ---- | ---- | ----------- | ----- |
|
2110
|
+
| **flow** | **String** | The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). | |
|
2111
|
+
| **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. This parameter is usually set in a link and not used by any direct API call. | [optional] |
|
2112
|
+
| **submit_self_service_verification_flow_body** | [**SubmitSelfServiceVerificationFlowBody**](SubmitSelfServiceVerificationFlowBody.md) | | [optional] |
|
2113
|
+
|
2114
|
+
### Return type
|
2115
|
+
|
2116
|
+
[**SelfServiceVerificationFlow**](SelfServiceVerificationFlow.md)
|
2117
|
+
|
2118
|
+
### Authorization
|
2119
|
+
|
2120
|
+
No authorization required
|
2121
|
+
|
2122
|
+
### HTTP request headers
|
2123
|
+
|
2124
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
2125
|
+
- **Accept**: application/json
|
2126
|
+
|
2127
|
+
|
2128
|
+
## to_session
|
2129
|
+
|
2130
|
+
> <Session> to_session(opts)
|
2131
|
+
|
2132
|
+
Check Who the Current HTTP Session Belongs To
|
2133
|
+
|
2134
|
+
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. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: ```js pseudo-code example router.get('/protected-endpoint', async function (req, res) { const session = await client.toSession(undefined, req.header('cookie')) console.log(session) }) ``` When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: ```js pseudo-code example ... const session = await client.toSession(\"the-session-token\") console.log(session) ``` Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. 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! This endpoint authenticates users by checking if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code.
|
2135
|
+
|
2136
|
+
### Examples
|
2137
|
+
|
2138
|
+
```ruby
|
2139
|
+
require 'time'
|
2140
|
+
require 'ory-client'
|
2141
|
+
|
2142
|
+
api_instance = OryClient::V0alpha2Api.new
|
2143
|
+
opts = {
|
2144
|
+
x_session_token: 'MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj', # String | Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
|
2145
|
+
cookie: 'ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==' # String | Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored.
|
2146
|
+
}
|
2147
|
+
|
2148
|
+
begin
|
2149
|
+
# Check Who the Current HTTP Session Belongs To
|
2150
|
+
result = api_instance.to_session(opts)
|
2151
|
+
p result
|
2152
|
+
rescue OryClient::ApiError => e
|
2153
|
+
puts "Error when calling V0alpha2Api->to_session: #{e}"
|
2154
|
+
end
|
2155
|
+
```
|
2156
|
+
|
2157
|
+
#### Using the to_session_with_http_info variant
|
2158
|
+
|
2159
|
+
This returns an Array which contains the response data, status code and headers.
|
2160
|
+
|
2161
|
+
> <Array(<Session>, Integer, Hash)> to_session_with_http_info(opts)
|
2162
|
+
|
2163
|
+
```ruby
|
2164
|
+
begin
|
2165
|
+
# Check Who the Current HTTP Session Belongs To
|
2166
|
+
data, status_code, headers = api_instance.to_session_with_http_info(opts)
|
2167
|
+
p status_code # => 2xx
|
2168
|
+
p headers # => { ... }
|
2169
|
+
p data # => <Session>
|
2170
|
+
rescue OryClient::ApiError => e
|
2171
|
+
puts "Error when calling V0alpha2Api->to_session_with_http_info: #{e}"
|
2172
|
+
end
|
2173
|
+
```
|
2174
|
+
|
2175
|
+
### Parameters
|
2176
|
+
|
2177
|
+
| Name | Type | Description | Notes |
|
2178
|
+
| ---- | ---- | ----------- | ----- |
|
2179
|
+
| **x_session_token** | **String** | Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. | [optional] |
|
2180
|
+
| **cookie** | **String** | Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. | [optional] |
|
2181
|
+
|
2182
|
+
### Return type
|
2183
|
+
|
2184
|
+
[**Session**](Session.md)
|
2185
|
+
|
2186
|
+
### Authorization
|
2187
|
+
|
2188
|
+
No authorization required
|
2189
|
+
|
2190
|
+
### HTTP request headers
|
2191
|
+
|
2192
|
+
- **Content-Type**: Not defined
|
2193
|
+
- **Accept**: application/json
|
2194
|
+
|