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
@@ -3,17 +3,17 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.1-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.1-alpha.18
|
7
7
|
Contact: support@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module OryClient
|
17
17
|
# Volume volume
|
18
18
|
class Volume
|
19
19
|
# Date/Time the volume was created.
|
@@ -87,13 +87,13 @@ module OryHydraClient
|
|
87
87
|
# @param [Hash] attributes Model attributes in the form of hash
|
88
88
|
def initialize(attributes = {})
|
89
89
|
if (!attributes.is_a?(Hash))
|
90
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::Volume` initialize method"
|
91
91
|
end
|
92
92
|
|
93
93
|
# check to see if the attribute exists and convert string to symbol for hash key
|
94
94
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
95
95
|
if (!self.class.attribute_map.key?(k.to_sym))
|
96
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
96
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryClient::Volume`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
97
97
|
end
|
98
98
|
h[k.to_sym] = v
|
99
99
|
}
|
@@ -279,7 +279,7 @@ module OryHydraClient
|
|
279
279
|
end
|
280
280
|
else # model
|
281
281
|
# models (e.g. Pet) or oneOf
|
282
|
-
klass =
|
282
|
+
klass = OryClient.const_get(type)
|
283
283
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
284
284
|
end
|
285
285
|
end
|
@@ -3,17 +3,17 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.1-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.1-alpha.18
|
7
7
|
Contact: support@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module OryClient
|
17
17
|
# VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints.
|
18
18
|
class VolumeUsageData
|
19
19
|
# The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available.
|
@@ -53,13 +53,13 @@ module OryHydraClient
|
|
53
53
|
# @param [Hash] attributes Model attributes in the form of hash
|
54
54
|
def initialize(attributes = {})
|
55
55
|
if (!attributes.is_a?(Hash))
|
56
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::VolumeUsageData` initialize method"
|
57
57
|
end
|
58
58
|
|
59
59
|
# check to see if the attribute exists and convert string to symbol for hash key
|
60
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
61
|
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryClient::VolumeUsageData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
63
|
end
|
64
64
|
h[k.to_sym] = v
|
65
65
|
}
|
@@ -184,7 +184,7 @@ module OryHydraClient
|
|
184
184
|
end
|
185
185
|
else # model
|
186
186
|
# models (e.g. Pet) or oneOf
|
187
|
-
klass =
|
187
|
+
klass = OryClient.const_get(type)
|
188
188
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
189
|
end
|
190
190
|
end
|
data/lib/ory-client/version.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.0.1.
|
6
|
+
The version of the OpenAPI document: 0.0.1.alpha18
|
7
7
|
Contact: support@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
-
module
|
14
|
-
VERSION = '0.0.1.
|
13
|
+
module OryClient
|
14
|
+
VERSION = '0.0.1.alpha18'
|
15
15
|
end
|
data/lib/ory-client.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.0.1-alpha.
|
6
|
+
The version of the OpenAPI document: v0.0.1-alpha.18
|
7
7
|
Contact: support@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -17,15 +17,17 @@ require 'ory-client/version'
|
|
17
17
|
require 'ory-client/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
+
require 'ory-client/models/admin_create_identity_body'
|
21
|
+
require 'ory-client/models/admin_create_self_service_recovery_link_body'
|
22
|
+
require 'ory-client/models/admin_update_identity_body'
|
20
23
|
require 'ory-client/models/authenticate_ok_body'
|
24
|
+
require 'ory-client/models/authenticator_assurance_level'
|
21
25
|
require 'ory-client/models/container_change_response_item'
|
22
26
|
require 'ory-client/models/container_create_created_body'
|
23
27
|
require 'ory-client/models/container_top_ok_body'
|
24
28
|
require 'ory-client/models/container_update_ok_body'
|
25
29
|
require 'ory-client/models/container_wait_ok_body'
|
26
30
|
require 'ory-client/models/container_wait_ok_body_error'
|
27
|
-
require 'ory-client/models/create_identity'
|
28
|
-
require 'ory-client/models/create_recovery_link'
|
29
31
|
require 'ory-client/models/error_response'
|
30
32
|
require 'ory-client/models/generic_error'
|
31
33
|
require 'ory-client/models/graph_driver_data'
|
@@ -34,14 +36,14 @@ require 'ory-client/models/health_status'
|
|
34
36
|
require 'ory-client/models/id_response'
|
35
37
|
require 'ory-client/models/identity'
|
36
38
|
require 'ory-client/models/identity_credentials'
|
39
|
+
require 'ory-client/models/identity_credentials_type'
|
40
|
+
require 'ory-client/models/identity_state'
|
37
41
|
require 'ory-client/models/image_delete_response_item'
|
38
42
|
require 'ory-client/models/image_summary'
|
39
43
|
require 'ory-client/models/inline_response200'
|
40
44
|
require 'ory-client/models/inline_response2001'
|
41
45
|
require 'ory-client/models/inline_response503'
|
42
46
|
require 'ory-client/models/json_error'
|
43
|
-
require 'ory-client/models/login_flow'
|
44
|
-
require 'ory-client/models/login_via_api_response'
|
45
47
|
require 'ory-client/models/meta'
|
46
48
|
require 'ory-client/models/plugin'
|
47
49
|
require 'ory-client/models/plugin_config'
|
@@ -58,27 +60,45 @@ require 'ory-client/models/plugin_mount'
|
|
58
60
|
require 'ory-client/models/plugin_settings'
|
59
61
|
require 'ory-client/models/port'
|
60
62
|
require 'ory-client/models/recovery_address'
|
61
|
-
require 'ory-client/models/
|
62
|
-
require 'ory-client/models/
|
63
|
-
require 'ory-client/models/
|
64
|
-
require 'ory-client/models/
|
65
|
-
require 'ory-client/models/
|
66
|
-
require 'ory-client/models/
|
63
|
+
require 'ory-client/models/self_service_error'
|
64
|
+
require 'ory-client/models/self_service_login_flow'
|
65
|
+
require 'ory-client/models/self_service_logout_url'
|
66
|
+
require 'ory-client/models/self_service_recovery_flow'
|
67
|
+
require 'ory-client/models/self_service_recovery_flow_state'
|
68
|
+
require 'ory-client/models/self_service_recovery_link'
|
69
|
+
require 'ory-client/models/self_service_registration_flow'
|
70
|
+
require 'ory-client/models/self_service_settings_flow'
|
71
|
+
require 'ory-client/models/self_service_settings_flow_state'
|
72
|
+
require 'ory-client/models/self_service_verification_flow'
|
73
|
+
require 'ory-client/models/self_service_verification_flow_state'
|
67
74
|
require 'ory-client/models/service_update_response'
|
68
75
|
require 'ory-client/models/session'
|
69
|
-
require 'ory-client/models/
|
76
|
+
require 'ory-client/models/session_authentication_method'
|
77
|
+
require 'ory-client/models/session_device'
|
70
78
|
require 'ory-client/models/settings_profile_form_config'
|
71
|
-
require 'ory-client/models/
|
72
|
-
require 'ory-client/models/
|
73
|
-
require 'ory-client/models/
|
74
|
-
require 'ory-client/models/
|
75
|
-
require 'ory-client/models/
|
76
|
-
require 'ory-client/models/
|
77
|
-
require 'ory-client/models/
|
78
|
-
require 'ory-client/models/
|
79
|
-
require 'ory-client/models/
|
80
|
-
require 'ory-client/models/
|
81
|
-
require 'ory-client/models/
|
79
|
+
require 'ory-client/models/submit_self_service_login_flow_body'
|
80
|
+
require 'ory-client/models/submit_self_service_login_flow_with_lookup_secret_method_body'
|
81
|
+
require 'ory-client/models/submit_self_service_login_flow_with_oidc_method_body'
|
82
|
+
require 'ory-client/models/submit_self_service_login_flow_with_password_method_body'
|
83
|
+
require 'ory-client/models/submit_self_service_login_flow_with_totp_method_body'
|
84
|
+
require 'ory-client/models/submit_self_service_login_flow_with_web_authn_method_body'
|
85
|
+
require 'ory-client/models/submit_self_service_logout_flow_without_browser_body'
|
86
|
+
require 'ory-client/models/submit_self_service_recovery_flow_body'
|
87
|
+
require 'ory-client/models/submit_self_service_recovery_flow_with_link_method_body'
|
88
|
+
require 'ory-client/models/submit_self_service_registration_flow_body'
|
89
|
+
require 'ory-client/models/submit_self_service_registration_flow_with_oidc_method_body'
|
90
|
+
require 'ory-client/models/submit_self_service_registration_flow_with_password_method_body'
|
91
|
+
require 'ory-client/models/submit_self_service_settings_flow_body'
|
92
|
+
require 'ory-client/models/submit_self_service_settings_flow_with_lookup_method_body'
|
93
|
+
require 'ory-client/models/submit_self_service_settings_flow_with_oidc_method_body'
|
94
|
+
require 'ory-client/models/submit_self_service_settings_flow_with_password_method_body'
|
95
|
+
require 'ory-client/models/submit_self_service_settings_flow_with_profile_method_body'
|
96
|
+
require 'ory-client/models/submit_self_service_settings_flow_with_totp_method_body'
|
97
|
+
require 'ory-client/models/submit_self_service_settings_flow_with_web_authn_method_body'
|
98
|
+
require 'ory-client/models/submit_self_service_verification_flow_body'
|
99
|
+
require 'ory-client/models/submit_self_service_verification_flow_with_link_method_body'
|
100
|
+
require 'ory-client/models/successful_self_service_login_without_browser'
|
101
|
+
require 'ory-client/models/successful_self_service_registration_without_browser'
|
82
102
|
require 'ory-client/models/ui_container'
|
83
103
|
require 'ory-client/models/ui_node'
|
84
104
|
require 'ory-client/models/ui_node_anchor_attributes'
|
@@ -87,20 +107,19 @@ require 'ory-client/models/ui_node_image_attributes'
|
|
87
107
|
require 'ory-client/models/ui_node_input_attributes'
|
88
108
|
require 'ory-client/models/ui_node_text_attributes'
|
89
109
|
require 'ory-client/models/ui_text'
|
90
|
-
require 'ory-client/models/update_identity'
|
91
110
|
require 'ory-client/models/verifiable_identity_address'
|
92
|
-
require 'ory-client/models/verification_flow'
|
93
111
|
require 'ory-client/models/version'
|
94
112
|
require 'ory-client/models/volume'
|
95
113
|
require 'ory-client/models/volume_usage_data'
|
96
114
|
|
97
115
|
# APIs
|
98
|
-
require 'ory-client/api/
|
116
|
+
require 'ory-client/api/metadata_api'
|
117
|
+
require 'ory-client/api/v0alpha2_api'
|
99
118
|
|
100
|
-
module
|
119
|
+
module OryClient
|
101
120
|
class << self
|
102
121
|
# Customize default settings for the SDK using block.
|
103
|
-
#
|
122
|
+
# OryClient.configure do |config|
|
104
123
|
# config.username = "xxx"
|
105
124
|
# config.password = "xxx"
|
106
125
|
# end
|
data/ory-client.gemspec
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
7
7
|
|
8
|
-
The version of the OpenAPI document: v0.0.1-alpha.
|
8
|
+
The version of the OpenAPI document: v0.0.1-alpha.18
|
9
9
|
Contact: support@ory.sh
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
OpenAPI Generator version: 5.
|
11
|
+
OpenAPI Generator version: 5.2.1
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -17,7 +17,7 @@ require "ory-client/version"
|
|
17
17
|
|
18
18
|
Gem::Specification.new do |s|
|
19
19
|
s.name = "ory-client"
|
20
|
-
s.version =
|
20
|
+
s.version = OryClient::VERSION
|
21
21
|
s.platform = Gem::Platform::RUBY
|
22
22
|
s.authors = ["ORY GmbH"]
|
23
23
|
s.email = ["opensource@ory.sh"]
|
@@ -0,0 +1,79 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory APIs
|
3
|
+
|
4
|
+
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.0.1-alpha.16
|
7
|
+
Contact: support@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OryHydraClient::MetadataApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'MetadataApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = OryHydraClient::MetadataApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of MetadataApi' do
|
30
|
+
it 'should create an instance of MetadataApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(OryHydraClient::MetadataApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_version
|
36
|
+
# Return Running Software Version.
|
37
|
+
# This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [InlineResponse2001]
|
40
|
+
describe 'get_version test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for is_alive
|
47
|
+
# Check HTTP Server Status
|
48
|
+
# This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [InlineResponse200]
|
51
|
+
describe 'is_alive test' do
|
52
|
+
it 'should work' do
|
53
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# unit tests for is_ready
|
58
|
+
# Check HTTP Server and Database Status
|
59
|
+
# This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance.
|
60
|
+
# @param [Hash] opts the optional parameters
|
61
|
+
# @return [InlineResponse200]
|
62
|
+
describe 'is_ready test' do
|
63
|
+
it 'should work' do
|
64
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# unit tests for prometheus
|
69
|
+
# Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so:
|
70
|
+
# ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ```
|
71
|
+
# @param [Hash] opts the optional parameters
|
72
|
+
# @return [nil]
|
73
|
+
describe 'prometheus test' do
|
74
|
+
it 'should work' do
|
75
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
@@ -0,0 +1,429 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory APIs
|
3
|
+
|
4
|
+
#Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.0.1-alpha.16
|
7
|
+
Contact: support@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OryHydraClient::V0alpha1Api
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'V0alpha1Api' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = OryHydraClient::V0alpha1Api.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of V0alpha1Api' do
|
30
|
+
it 'should create an instance of V0alpha1Api' do
|
31
|
+
expect(@api_instance).to be_instance_of(OryHydraClient::V0alpha1Api)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for admin_create_identity
|
36
|
+
# Create an Identity
|
37
|
+
# 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).
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [AdminCreateIdentityBody] :admin_create_identity_body
|
40
|
+
# @return [Identity]
|
41
|
+
describe 'admin_create_identity test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for admin_create_self_service_recovery_link
|
48
|
+
# Create a Recovery Link
|
49
|
+
# This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @option opts [AdminCreateSelfServiceRecoveryLinkBody] :admin_create_self_service_recovery_link_body
|
52
|
+
# @return [SelfServiceRecoveryLink]
|
53
|
+
describe 'admin_create_self_service_recovery_link test' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# unit tests for admin_delete_identity
|
60
|
+
# Delete an Identity
|
61
|
+
# 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).
|
62
|
+
# @param id ID is the identity's ID.
|
63
|
+
# @param [Hash] opts the optional parameters
|
64
|
+
# @return [nil]
|
65
|
+
describe 'admin_delete_identity test' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# unit tests for admin_get_identity
|
72
|
+
# Get an Identity
|
73
|
+
# Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
74
|
+
# @param id ID must be set to the ID of identity you want to get
|
75
|
+
# @param [Hash] opts the optional parameters
|
76
|
+
# @return [Identity]
|
77
|
+
describe 'admin_get_identity test' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# unit tests for admin_list_identities
|
84
|
+
# List Identities
|
85
|
+
# 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).
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [Integer] :per_page Items per Page This is the number of items per page.
|
88
|
+
# @option opts [Integer] :page Pagination Page
|
89
|
+
# @return [Array<Identity>]
|
90
|
+
describe 'admin_list_identities test' do
|
91
|
+
it 'should work' do
|
92
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# unit tests for admin_update_identity
|
97
|
+
# Update an Identity
|
98
|
+
# 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).
|
99
|
+
# @param id ID must be set to the ID of identity you want to update
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [AdminUpdateIdentityBody] :admin_update_identity_body
|
102
|
+
# @return [Identity]
|
103
|
+
describe 'admin_update_identity test' do
|
104
|
+
it 'should work' do
|
105
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# unit tests for create_self_service_logout_flow_url_for_browsers
|
110
|
+
# Create a Logout URL for Browsers
|
111
|
+
# 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.
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @option opts [String] :cookie HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
|
114
|
+
# @return [SelfServiceLogoutUrl]
|
115
|
+
describe 'create_self_service_logout_flow_url_for_browsers test' do
|
116
|
+
it 'should work' do
|
117
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# unit tests for get_json_schema
|
122
|
+
# Get a JSON Schema
|
123
|
+
# @param id ID must be set to the ID of schema you want to get
|
124
|
+
# @param [Hash] opts the optional parameters
|
125
|
+
# @return [Object]
|
126
|
+
describe 'get_json_schema test' do
|
127
|
+
it 'should work' do
|
128
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# unit tests for get_self_service_error
|
133
|
+
# Get Self-Service Errors
|
134
|
+
# 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).
|
135
|
+
# @param id Error is the error's ID
|
136
|
+
# @param [Hash] opts the optional parameters
|
137
|
+
# @return [SelfServiceError]
|
138
|
+
describe 'get_self_service_error test' do
|
139
|
+
it 'should work' do
|
140
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# unit tests for get_self_service_login_flow
|
145
|
+
# Get Login Flow
|
146
|
+
# 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).
|
147
|
+
# @param id The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`).
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
150
|
+
# @return [SelfServiceLoginFlow]
|
151
|
+
describe 'get_self_service_login_flow test' do
|
152
|
+
it 'should work' do
|
153
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# unit tests for get_self_service_recovery_flow
|
158
|
+
# Get Recovery Flow
|
159
|
+
# 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).
|
160
|
+
# @param id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`).
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
163
|
+
# @return [SelfServiceRecoveryFlow]
|
164
|
+
describe 'get_self_service_recovery_flow test' do
|
165
|
+
it 'should work' do
|
166
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# unit tests for get_self_service_registration_flow
|
171
|
+
# Get Registration Flow
|
172
|
+
# 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).
|
173
|
+
# @param id The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`).
|
174
|
+
# @param [Hash] opts the optional parameters
|
175
|
+
# @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
176
|
+
# @return [SelfServiceRegistrationFlow]
|
177
|
+
describe 'get_self_service_registration_flow test' do
|
178
|
+
it 'should work' do
|
179
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# unit tests for get_self_service_settings_flow
|
184
|
+
# Get Settings Flow
|
185
|
+
# When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. The public endpoint does not return 404 status codes but instead 403 or 500 to improve data privacy. You can access this endpoint without credentials when using Ory Kratos' Admin API. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
|
186
|
+
# @param id 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`).
|
187
|
+
# @param [Hash] opts the optional parameters
|
188
|
+
# @option opts [String] :x_session_token The Session Token When using the SDK in an app without a browser, please include the session token here.
|
189
|
+
# @option opts [String] :cookie 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.
|
190
|
+
# @return [SelfServiceSettingsFlow]
|
191
|
+
describe 'get_self_service_settings_flow test' do
|
192
|
+
it 'should work' do
|
193
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# unit tests for get_self_service_verification_flow
|
198
|
+
# Get Verification Flow
|
199
|
+
# 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).
|
200
|
+
# @param id The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`).
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @option opts [String] :cookie HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.
|
203
|
+
# @return [SelfServiceVerificationFlow]
|
204
|
+
describe 'get_self_service_verification_flow test' do
|
205
|
+
it 'should work' do
|
206
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# unit tests for initialize_self_service_login_flow_for_browsers
|
211
|
+
# Initialize Login Flow for Browsers
|
212
|
+
# 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).
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @option opts [Boolean] :refresh 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.
|
215
|
+
# @return [SelfServiceLoginFlow]
|
216
|
+
describe 'initialize_self_service_login_flow_for_browsers test' do
|
217
|
+
it 'should work' do
|
218
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
# unit tests for initialize_self_service_login_flow_without_browser
|
223
|
+
# Initialize Login Flow for APIs, Services, Apps, ...
|
224
|
+
# 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).
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @option opts [Boolean] :refresh 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.
|
227
|
+
# @return [SelfServiceLoginFlow]
|
228
|
+
describe 'initialize_self_service_login_flow_without_browser test' do
|
229
|
+
it 'should work' do
|
230
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
# unit tests for initialize_self_service_recovery_flow_for_browsers
|
235
|
+
# Initialize Recovery Flow for Browsers
|
236
|
+
# 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).
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @return [SelfServiceRecoveryFlow]
|
239
|
+
describe 'initialize_self_service_recovery_flow_for_browsers test' do
|
240
|
+
it 'should work' do
|
241
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
# unit tests for initialize_self_service_recovery_flow_without_browser
|
246
|
+
# Initialize Recovery Flow for APIs, Services, Apps, ...
|
247
|
+
# 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).
|
248
|
+
# @param [Hash] opts the optional parameters
|
249
|
+
# @return [SelfServiceRecoveryFlow]
|
250
|
+
describe 'initialize_self_service_recovery_flow_without_browser test' do
|
251
|
+
it 'should work' do
|
252
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
# unit tests for initialize_self_service_registration_flow_for_browsers
|
257
|
+
# Initialize Registration Flow for Browsers
|
258
|
+
# 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).
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [SelfServiceRegistrationFlow]
|
261
|
+
describe 'initialize_self_service_registration_flow_for_browsers test' do
|
262
|
+
it 'should work' do
|
263
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
# unit tests for initialize_self_service_registration_flow_without_browser
|
268
|
+
# Initialize Registration Flow for APIs, Services, Apps, ...
|
269
|
+
# 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).
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @return [SelfServiceRegistrationFlow]
|
272
|
+
describe 'initialize_self_service_registration_flow_without_browser test' do
|
273
|
+
it 'should work' do
|
274
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# unit tests for initialize_self_service_settings_flow_for_browsers
|
279
|
+
# Initialize Settings Flow for Browsers
|
280
|
+
# 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. 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).
|
281
|
+
# @param [Hash] opts the optional parameters
|
282
|
+
# @option opts [String] :cookie The Session Cookie of the Identity performing the settings flow.
|
283
|
+
# @return [SelfServiceSettingsFlow]
|
284
|
+
describe 'initialize_self_service_settings_flow_for_browsers test' do
|
285
|
+
it 'should work' do
|
286
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
# unit tests for initialize_self_service_settings_flow_without_browser
|
291
|
+
# Initialize Settings Flow for APIs, Services, Apps, ...
|
292
|
+
# 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. 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).
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
|
295
|
+
# @return [SelfServiceSettingsFlow]
|
296
|
+
describe 'initialize_self_service_settings_flow_without_browser test' do
|
297
|
+
it 'should work' do
|
298
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
# unit tests for initialize_self_service_verification_flow_for_browsers
|
303
|
+
# Initialize Verification Flow for Browser Clients
|
304
|
+
# 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).
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @return [SelfServiceVerificationFlow]
|
307
|
+
describe 'initialize_self_service_verification_flow_for_browsers test' do
|
308
|
+
it 'should work' do
|
309
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
# unit tests for initialize_self_service_verification_flow_without_browser
|
314
|
+
# Initialize Verification Flow for APIs, Services, Apps, ...
|
315
|
+
# 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).
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @return [SelfServiceVerificationFlow]
|
318
|
+
describe 'initialize_self_service_verification_flow_without_browser test' do
|
319
|
+
it 'should work' do
|
320
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
# unit tests for submit_self_service_login_flow
|
325
|
+
# Submit a Login Flow
|
326
|
+
# :::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).
|
327
|
+
# @param flow The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`).
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @option opts [SubmitSelfServiceLoginFlowBody] :submit_self_service_login_flow_body
|
330
|
+
# @return [SuccessfulSelfServiceLoginWithoutBrowser]
|
331
|
+
describe 'submit_self_service_login_flow test' do
|
332
|
+
it 'should work' do
|
333
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
# unit tests for submit_self_service_logout_flow
|
338
|
+
# Complete Self-Service Logout
|
339
|
+
# 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).
|
340
|
+
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [String] :token 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.
|
342
|
+
# @return [nil]
|
343
|
+
describe 'submit_self_service_logout_flow test' do
|
344
|
+
it 'should work' do
|
345
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
# unit tests for submit_self_service_logout_flow_without_browser
|
350
|
+
# Perform Logout for APIs, Services, Apps, ...
|
351
|
+
# 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.
|
352
|
+
# @param submit_self_service_logout_flow_without_browser_body
|
353
|
+
# @param [Hash] opts the optional parameters
|
354
|
+
# @return [nil]
|
355
|
+
describe 'submit_self_service_logout_flow_without_browser test' do
|
356
|
+
it 'should work' do
|
357
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
# unit tests for submit_self_service_recovery_flow
|
362
|
+
# Complete Recovery Flow
|
363
|
+
# 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).
|
364
|
+
# @param flow The Recovery Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`).
|
365
|
+
# @param [Hash] opts the optional parameters
|
366
|
+
# @option opts [String] :token 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.
|
367
|
+
# @option opts [SubmitSelfServiceRecoveryFlowBody] :submit_self_service_recovery_flow_body
|
368
|
+
# @return [SelfServiceRecoveryFlow]
|
369
|
+
describe 'submit_self_service_recovery_flow test' do
|
370
|
+
it 'should work' do
|
371
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
# unit tests for submit_self_service_registration_flow
|
376
|
+
# Submit a Registration Flow
|
377
|
+
# 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).
|
378
|
+
# @param flow The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`).
|
379
|
+
# @param [Hash] opts the optional parameters
|
380
|
+
# @option opts [SubmitSelfServiceRegistrationFlowBody] :submit_self_service_registration_flow_body
|
381
|
+
# @return [SuccessfulSelfServiceRegistrationWithoutBrowser]
|
382
|
+
describe 'submit_self_service_registration_flow test' do
|
383
|
+
it 'should work' do
|
384
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
# unit tests for submit_self_service_settings_flow
|
389
|
+
# Complete Settings Flow
|
390
|
+
# Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate. Browser flows 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. 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. HTTP 400 on form validation errors. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
|
391
|
+
# @param flow The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`).
|
392
|
+
# @param [Hash] opts the optional parameters
|
393
|
+
# @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
|
394
|
+
# @option opts [SubmitSelfServiceSettingsFlowBody] :submit_self_service_settings_flow_body
|
395
|
+
# @return [SuccessfulSelfServiceSettingsWithoutBrowser]
|
396
|
+
describe 'submit_self_service_settings_flow test' do
|
397
|
+
it 'should work' do
|
398
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
# unit tests for submit_self_service_verification_flow
|
403
|
+
# Complete Verification Flow
|
404
|
+
# 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).
|
405
|
+
# @param flow The Verification Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`).
|
406
|
+
# @param [Hash] opts the optional parameters
|
407
|
+
# @option opts [String] :token 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.
|
408
|
+
# @option opts [SubmitSelfServiceVerificationFlowBody] :submit_self_service_verification_flow_body
|
409
|
+
# @return [SelfServiceVerificationFlow]
|
410
|
+
describe 'submit_self_service_verification_flow test' do
|
411
|
+
it 'should work' do
|
412
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
413
|
+
end
|
414
|
+
end
|
415
|
+
|
416
|
+
# unit tests for to_session
|
417
|
+
# Check Who the Current HTTP Session Belongs To
|
418
|
+
# 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) ``` 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.
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @option opts [String] :x_session_token Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
|
421
|
+
# @option opts [String] :cookie 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.
|
422
|
+
# @return [Session]
|
423
|
+
describe 'to_session test' do
|
424
|
+
it 'should work' do
|
425
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
426
|
+
end
|
427
|
+
end
|
428
|
+
|
429
|
+
end
|