ory-kratos-client 0.6.2.alpha1 → 0.7.1.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +135 -147
- data/docs/AdminApi.md +15 -13
- data/docs/AdminCreateIdentityBody.md +20 -0
- data/docs/AdminCreateSelfServiceRecoveryLinkBody.md +20 -0
- data/docs/AdminUpdateIdentityBody.md +22 -0
- data/docs/AuthenticateOKBody.md +2 -2
- 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 +16 -4
- 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 +14 -4
- data/docs/IdentityCredentials.md +7 -3
- 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 +18 -0
- data/docs/LoginFlow.md +5 -1
- 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/PublicApi.md +216 -210
- data/docs/RecoveryAddress.md +6 -2
- data/docs/SelfServiceError.md +24 -0
- data/docs/SelfServiceErrorContainer.md +24 -0
- data/docs/SelfServiceLoginFlow.md +36 -0
- data/docs/SelfServiceLogoutUrl.md +18 -0
- data/docs/SelfServiceRecoveryFlow.md +32 -0
- data/docs/SelfServiceRecoveryFlowState.md +15 -0
- data/docs/SelfServiceRecoveryLink.md +20 -0
- data/docs/SelfServiceRegistrationFlow.md +30 -0
- data/docs/SelfServiceSettingsFlow.md +34 -0
- data/docs/SelfServiceSettingsFlowState.md +15 -0
- data/docs/SelfServiceVerificationFlow.md +32 -0
- data/docs/SelfServiceVerificationFlowState.md +15 -0
- data/docs/ServiceUpdateResponse.md +2 -2
- data/docs/Session.md +6 -6
- data/docs/SettingsProfileFormConfig.md +2 -2
- data/docs/SubmitSelfServiceLoginFlowBody.md +76 -0
- data/docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md +24 -0
- data/docs/SubmitSelfServiceLogoutFlowWithoutBrowserBody.md +18 -0
- data/docs/SubmitSelfServiceRecoveryFlowBody.md +75 -0
- data/docs/SubmitSelfServiceRecoveryFlowWithLinkMethodBody.md +22 -0
- data/docs/SubmitSelfServiceRegistrationFlowBody.md +76 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md +22 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowBody.md +79 -0
- data/docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethodBody.md +22 -0
- data/docs/SubmitSelfServiceSettingsFlowWithProfileMethodBody.md +22 -0
- data/docs/SubmitSelfServiceVerificationFlowBody.md +75 -0
- data/docs/SubmitSelfServiceVerificationFlowWithLinkMethodBody.md +22 -0
- data/docs/SuccessfulSelfServiceLoginWithoutBrowser.md +20 -0
- data/docs/SuccessfulSelfServiceRegistrationWithoutBrowser.md +22 -0
- data/docs/SuccessfulSelfServiceSettingsWithoutBrowser.md +20 -0
- data/docs/UiContainer.md +2 -2
- data/docs/UiNode.md +2 -2
- data/docs/UiNodeAnchorAttributes.md +2 -2
- data/docs/UiNodeAttributes.md +4 -4
- data/docs/UiNodeImageAttributes.md +2 -2
- data/docs/UiNodeInputAttributes.md +3 -3
- data/docs/UiNodeTextAttributes.md +2 -2
- data/docs/UiText.md +2 -2
- data/docs/V0alpha1Api.md +2167 -0
- data/docs/VerifiableIdentityAddress.md +32 -0
- data/docs/Version.md +2 -2
- data/docs/Volume.md +2 -2
- data/docs/VolumeUsageData.md +2 -2
- data/lib/ory-kratos-client/api/admin_api.rb +7 -4
- data/lib/ory-kratos-client/api/metadata_api.rb +248 -0
- data/lib/ory-kratos-client/api/public_api.rb +171 -162
- data/lib/ory-kratos-client/api/v0alpha1_api.rb +2054 -0
- data/lib/ory-kratos-client/api_client.rb +4 -4
- data/lib/ory-kratos-client/api_error.rb +3 -3
- data/lib/ory-kratos-client/configuration.rb +11 -32
- data/lib/ory-kratos-client/models/admin_create_identity_body.rb +239 -0
- data/lib/ory-kratos-client/models/admin_create_self_service_recovery_link_body.rb +250 -0
- data/lib/ory-kratos-client/models/admin_update_identity_body.rb +248 -0
- data/lib/ory-kratos-client/models/authenticate_ok_body.rb +6 -6
- data/lib/ory-kratos-client/models/container_change_response_item.rb +6 -6
- data/lib/ory-kratos-client/models/container_create_created_body.rb +6 -6
- data/lib/ory-kratos-client/models/container_top_ok_body.rb +6 -6
- data/lib/ory-kratos-client/models/container_update_ok_body.rb +6 -6
- data/lib/ory-kratos-client/models/container_wait_ok_body.rb +6 -6
- data/lib/ory-kratos-client/models/container_wait_ok_body_error.rb +6 -6
- data/lib/ory-kratos-client/models/create_identity.rb +1 -1
- data/lib/ory-kratos-client/models/create_recovery_link.rb +1 -1
- data/lib/ory-kratos-client/models/error_response.rb +6 -6
- data/lib/ory-kratos-client/models/generic_error.rb +81 -14
- data/lib/ory-kratos-client/models/graph_driver_data.rb +6 -6
- data/lib/ory-kratos-client/models/health_not_ready_status.rb +6 -6
- data/lib/ory-kratos-client/models/health_status.rb +6 -6
- data/lib/ory-kratos-client/models/id_response.rb +6 -6
- data/lib/ory-kratos-client/models/identity.rb +62 -14
- data/lib/ory-kratos-client/models/identity_credentials.rb +30 -10
- data/lib/ory-kratos-client/models/identity_state.rb +37 -0
- data/lib/ory-kratos-client/models/image_delete_response_item.rb +6 -6
- data/lib/ory-kratos-client/models/image_summary.rb +6 -6
- data/lib/ory-kratos-client/models/inline_response200.rb +6 -6
- data/lib/ory-kratos-client/models/inline_response2001.rb +6 -6
- data/lib/ory-kratos-client/models/inline_response503.rb +6 -6
- data/lib/ory-kratos-client/models/json_error.rb +224 -0
- data/lib/ory-kratos-client/models/login_flow.rb +25 -5
- data/lib/ory-kratos-client/models/login_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/meta.rb +6 -6
- data/lib/ory-kratos-client/models/plugin.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_config.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_config_args.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_config_interface.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_config_linux.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_config_network.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_config_rootfs.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_config_user.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_device.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_env.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_interface_type.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_mount.rb +6 -6
- data/lib/ory-kratos-client/models/plugin_settings.rb +6 -6
- data/lib/ory-kratos-client/models/port.rb +6 -6
- data/lib/ory-kratos-client/models/recovery_address.rb +27 -7
- data/lib/ory-kratos-client/models/recovery_flow.rb +1 -1
- data/lib/ory-kratos-client/models/recovery_link.rb +1 -1
- data/lib/ory-kratos-client/models/registration_flow.rb +1 -1
- data/lib/ory-kratos-client/models/registration_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/revoke_session.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_error.rb +252 -0
- data/lib/ory-kratos-client/models/self_service_error_container.rb +260 -0
- data/lib/ory-kratos-client/models/self_service_login_flow.rb +338 -0
- data/lib/ory-kratos-client/models/self_service_logout_url.rb +219 -0
- data/lib/ory-kratos-client/models/self_service_recovery_flow.rb +317 -0
- data/lib/ory-kratos-client/models/self_service_recovery_flow_state.rb +38 -0
- data/lib/ory-kratos-client/models/self_service_recovery_link.rb +234 -0
- data/lib/ory-kratos-client/models/self_service_registration_flow.rb +302 -0
- data/lib/ory-kratos-client/models/self_service_settings_flow.rb +331 -0
- data/lib/ory-kratos-client/models/self_service_settings_flow_state.rb +37 -0
- data/lib/ory-kratos-client/models/self_service_verification_flow.rb +307 -0
- data/lib/ory-kratos-client/models/self_service_verification_flow_state.rb +38 -0
- data/lib/ory-kratos-client/models/service_update_response.rb +6 -6
- data/lib/ory-kratos-client/models/session.rb +11 -21
- data/lib/ory-kratos-client/models/settings_flow.rb +1 -1
- data/lib/ory-kratos-client/models/settings_profile_form_config.rb +6 -6
- data/lib/ory-kratos-client/models/settings_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_browser_settings_oidc_flow_payload.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_password_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_password_method_body.rb +298 -0
- data/lib/ory-kratos-client/models/submit_self_service_logout_flow_without_browser_body.rb +225 -0
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_body.rb +53 -0
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_with_link_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_password_method.rb +22 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_password_method_body.rb +299 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_body.rb +56 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +255 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_password_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_password_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_profile_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_with_link_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_with_link_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/successful_self_service_login_without_browser.rb +234 -0
- data/lib/ory-kratos-client/models/successful_self_service_registration_without_browser.rb +243 -0
- data/lib/ory-kratos-client/models/successful_self_service_settings_without_browser.rb +238 -0
- data/lib/ory-kratos-client/models/ui_container.rb +6 -6
- data/lib/ory-kratos-client/models/ui_node.rb +6 -6
- data/lib/ory-kratos-client/models/ui_node_anchor_attributes.rb +6 -6
- data/lib/ory-kratos-client/models/ui_node_attributes.rb +4 -4
- data/lib/ory-kratos-client/models/ui_node_image_attributes.rb +6 -6
- data/lib/ory-kratos-client/models/ui_node_input_attributes.rb +9 -7
- data/lib/ory-kratos-client/models/ui_node_input_attributes_value.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_text_attributes.rb +6 -6
- data/lib/ory-kratos-client/models/ui_text.rb +6 -6
- data/lib/ory-kratos-client/models/update_identity.rb +1 -1
- data/lib/ory-kratos-client/models/verifiable_identity_address.rb +313 -0
- data/lib/ory-kratos-client/models/verification_flow.rb +1 -1
- data/lib/ory-kratos-client/models/version.rb +6 -6
- data/lib/ory-kratos-client/models/volume.rb +6 -6
- data/lib/ory-kratos-client/models/volume_usage_data.rb +6 -6
- data/lib/ory-kratos-client/version.rb +4 -4
- data/lib/ory-kratos-client.rb +41 -33
- data/ory-kratos-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_client_spec.rb +31 -31
- data/spec/configuration_spec.rb +8 -8
- 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/identity_state_spec.rb +28 -0
- data/spec/models/json_error_spec.rb +34 -0
- data/spec/models/self_service_error_container_spec.rb +52 -0
- data/spec/models/self_service_error_spec.rb +52 -0
- data/spec/models/self_service_login_flow_spec.rb +88 -0
- data/spec/models/self_service_logout_url_spec.rb +34 -0
- data/spec/models/self_service_recovery_flow_spec.rb +76 -0
- data/spec/models/self_service_recovery_flow_state_spec.rb +28 -0
- data/spec/models/self_service_recovery_link_spec.rb +40 -0
- data/spec/models/self_service_registration_flow_spec.rb +70 -0
- data/spec/models/self_service_settings_flow_spec.rb +82 -0
- data/spec/models/self_service_settings_flow_state_spec.rb +28 -0
- data/spec/models/self_service_verification_flow_spec.rb +76 -0
- data/spec/models/self_service_verification_flow_state_spec.rb +28 -0
- data/spec/models/submit_self_service_login_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_login_flow_with_oidc_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_login_flow_with_password_method_body_spec.rb +56 -0
- data/spec/models/submit_self_service_logout_flow_without_browser_body_spec.rb +34 -0
- data/spec/models/submit_self_service_recovery_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_recovery_flow_with_link_method_body_spec.rb +50 -0
- data/spec/models/submit_self_service_registration_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_registration_flow_with_oidc_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_registration_flow_with_password_method_body_spec.rb +56 -0
- data/spec/models/submit_self_service_settings_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_settings_flow_with_oidc_method_body_spec.rb +52 -0
- data/spec/models/submit_self_service_settings_flow_with_password_method_body_spec.rb +50 -0
- data/spec/models/submit_self_service_settings_flow_with_profile_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_verification_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_verification_flow_with_link_method_body_spec.rb +50 -0
- data/spec/models/successful_self_service_login_without_browser_spec.rb +40 -0
- data/spec/models/successful_self_service_registration_without_browser_spec.rb +46 -0
- data/spec/models/successful_self_service_settings_without_browser_spec.rb +40 -0
- data/spec/models/verifiable_identity_address_spec.rb +76 -0
- data/spec/spec_helper.rb +2 -2
- metadata +154 -2
@@ -0,0 +1,38 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory Kratos API
|
3
|
+
|
4
|
+
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.7.1-alpha.2
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryKratosClient
|
17
|
+
class SelfServiceVerificationFlowState
|
18
|
+
CHOOSE_METHOD = "choose_method".freeze
|
19
|
+
SENT_EMAIL = "sent_email".freeze
|
20
|
+
PASSED_CHALLENGE = "passed_challenge".freeze
|
21
|
+
|
22
|
+
# Builds the enum from string
|
23
|
+
# @param [String] The enum value in the form of the string
|
24
|
+
# @return [String] The enum value
|
25
|
+
def self.build_from_hash(value)
|
26
|
+
new.build_from_hash(value)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def build_from_hash(value)
|
33
|
+
constantValues = SelfServiceVerificationFlowState.constants.select { |c| SelfServiceVerificationFlowState::const_get(c) == value }
|
34
|
+
raise "Invalid ENUM value #{value} for class #SelfServiceVerificationFlowState" if constantValues.empty?
|
35
|
+
value
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -3,17 +3,17 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.
|
6
|
+
The version of the OpenAPI document: v0.7.1-alpha.2
|
7
7
|
Contact: hi@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 OryKratosClient
|
17
17
|
# ServiceUpdateResponse service update response
|
18
18
|
class ServiceUpdateResponse
|
19
19
|
# Optional warning messages
|
@@ -48,13 +48,13 @@ module OryHydraClient
|
|
48
48
|
# @param [Hash] attributes Model attributes in the form of hash
|
49
49
|
def initialize(attributes = {})
|
50
50
|
if (!attributes.is_a?(Hash))
|
51
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryKratosClient::ServiceUpdateResponse` initialize method"
|
52
52
|
end
|
53
53
|
|
54
54
|
# check to see if the attribute exists and convert string to symbol for hash key
|
55
55
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
56
|
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryKratosClient::ServiceUpdateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
58
|
end
|
59
59
|
h[k.to_sym] = v
|
60
60
|
}
|
@@ -166,7 +166,7 @@ module OryHydraClient
|
|
166
166
|
end
|
167
167
|
else # model
|
168
168
|
# models (e.g. Pet) or oneOf
|
169
|
-
klass =
|
169
|
+
klass = OryKratosClient.const_get(type)
|
170
170
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
171
|
end
|
172
172
|
end
|
@@ -3,28 +3,33 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.
|
6
|
+
The version of the OpenAPI document: v0.7.1-alpha.2
|
7
7
|
Contact: hi@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 OryKratosClient
|
17
|
+
# A Session
|
17
18
|
class Session
|
19
|
+
# Whether or not the session is active.
|
18
20
|
attr_accessor :active
|
19
21
|
|
22
|
+
# The Session Authentication Timestamp When this session was authenticated at.
|
20
23
|
attr_accessor :authenticated_at
|
21
24
|
|
25
|
+
# The Session Expiry When this session expires at.
|
22
26
|
attr_accessor :expires_at
|
23
27
|
|
24
28
|
attr_accessor :id
|
25
29
|
|
26
30
|
attr_accessor :identity
|
27
31
|
|
32
|
+
# The Session Issuance Timestamp When this session was authenticated at.
|
28
33
|
attr_accessor :issued_at
|
29
34
|
|
30
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -66,13 +71,13 @@ module OryHydraClient
|
|
66
71
|
# @param [Hash] attributes Model attributes in the form of hash
|
67
72
|
def initialize(attributes = {})
|
68
73
|
if (!attributes.is_a?(Hash))
|
69
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryKratosClient::Session` initialize method"
|
70
75
|
end
|
71
76
|
|
72
77
|
# check to see if the attribute exists and convert string to symbol for hash key
|
73
78
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
74
79
|
if (!self.class.attribute_map.key?(k.to_sym))
|
75
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryKratosClient::Session`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
81
|
end
|
77
82
|
h[k.to_sym] = v
|
78
83
|
}
|
@@ -106,14 +111,6 @@ module OryHydraClient
|
|
106
111
|
# @return Array for valid properties with the reasons
|
107
112
|
def list_invalid_properties
|
108
113
|
invalid_properties = Array.new
|
109
|
-
if @authenticated_at.nil?
|
110
|
-
invalid_properties.push('invalid value for "authenticated_at", authenticated_at cannot be nil.')
|
111
|
-
end
|
112
|
-
|
113
|
-
if @expires_at.nil?
|
114
|
-
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
115
|
-
end
|
116
|
-
|
117
114
|
if @id.nil?
|
118
115
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
119
116
|
end
|
@@ -122,21 +119,14 @@ module OryHydraClient
|
|
122
119
|
invalid_properties.push('invalid value for "identity", identity cannot be nil.')
|
123
120
|
end
|
124
121
|
|
125
|
-
if @issued_at.nil?
|
126
|
-
invalid_properties.push('invalid value for "issued_at", issued_at cannot be nil.')
|
127
|
-
end
|
128
|
-
|
129
122
|
invalid_properties
|
130
123
|
end
|
131
124
|
|
132
125
|
# Check to see if the all the properties in the model are valid
|
133
126
|
# @return true if the model is valid
|
134
127
|
def valid?
|
135
|
-
return false if @authenticated_at.nil?
|
136
|
-
return false if @expires_at.nil?
|
137
128
|
return false if @id.nil?
|
138
129
|
return false if @identity.nil?
|
139
|
-
return false if @issued_at.nil?
|
140
130
|
true
|
141
131
|
end
|
142
132
|
|
@@ -232,7 +222,7 @@ module OryHydraClient
|
|
232
222
|
end
|
233
223
|
else # model
|
234
224
|
# models (e.g. Pet) or oneOf
|
235
|
-
klass =
|
225
|
+
klass = OryKratosClient.const_get(type)
|
236
226
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
237
227
|
end
|
238
228
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.6.
|
6
|
+
The version of the OpenAPI document: v0.6.3-alpha.1
|
7
7
|
Contact: hi@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.1.1
|
@@ -3,17 +3,17 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.
|
6
|
+
The version of the OpenAPI document: v0.7.1-alpha.2
|
7
7
|
Contact: hi@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 OryKratosClient
|
17
17
|
class SettingsProfileFormConfig
|
18
18
|
# Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`.
|
19
19
|
attr_accessor :action
|
@@ -60,13 +60,13 @@ module OryHydraClient
|
|
60
60
|
# @param [Hash] attributes Model attributes in the form of hash
|
61
61
|
def initialize(attributes = {})
|
62
62
|
if (!attributes.is_a?(Hash))
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryKratosClient::SettingsProfileFormConfig` initialize method"
|
64
64
|
end
|
65
65
|
|
66
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
67
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
68
|
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryKratosClient::SettingsProfileFormConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
70
|
end
|
71
71
|
h[k.to_sym] = v
|
72
72
|
}
|
@@ -210,7 +210,7 @@ module OryHydraClient
|
|
210
210
|
end
|
211
211
|
else # model
|
212
212
|
# models (e.g. Pet) or oneOf
|
213
|
-
klass =
|
213
|
+
klass = OryKratosClient.const_get(type)
|
214
214
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
215
|
end
|
216
216
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.6.
|
6
|
+
The version of the OpenAPI document: v0.6.3-alpha.1
|
7
7
|
Contact: hi@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.1.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.6.
|
6
|
+
The version of the OpenAPI document: v0.6.3-alpha.1
|
7
7
|
Contact: hi@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.1.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v0.6.
|
6
|
+
The version of the OpenAPI document: v0.6.3-alpha.1
|
7
7
|
Contact: hi@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.1.1
|
@@ -0,0 +1,54 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory Kratos API
|
3
|
+
|
4
|
+
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.7.1-alpha.2
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryKratosClient
|
17
|
+
module SubmitSelfServiceLoginFlowBody
|
18
|
+
class << self
|
19
|
+
# List of class defined in oneOf (OpenAPI v3)
|
20
|
+
def openapi_one_of
|
21
|
+
[
|
22
|
+
:'SubmitSelfServiceLoginFlowWithPasswordMethodBody'
|
23
|
+
]
|
24
|
+
end
|
25
|
+
|
26
|
+
# Discriminator's property name (OpenAPI v3)
|
27
|
+
def openapi_discriminator_name
|
28
|
+
:'method'
|
29
|
+
end
|
30
|
+
|
31
|
+
# Discriminator's mapping (OpenAPI v3)
|
32
|
+
def openapi_discriminator_mapping
|
33
|
+
{
|
34
|
+
:'oidc' => :'SubmitSelfServiceLoginFlowWithOidcMethodBody',
|
35
|
+
:'password' => :'SubmitSelfServiceLoginFlowWithPasswordMethodBody'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Builds the object
|
40
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
41
|
+
# @return [Object] Returns the model or the data itself
|
42
|
+
def build(data)
|
43
|
+
discriminator_value = data[openapi_discriminator_name]
|
44
|
+
return nil unless discriminator_value
|
45
|
+
|
46
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_sym]
|
47
|
+
return nil unless klass
|
48
|
+
|
49
|
+
OryKratosClient.const_get(klass).build_from_hash(data)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,250 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory Kratos API
|
3
|
+
|
4
|
+
#Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v0.7.1-alpha.2
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryKratosClient
|
17
|
+
# SubmitSelfServiceLoginFlowWithOidcMethodBody is used to decode the login form payload when using the oidc method.
|
18
|
+
class SubmitSelfServiceLoginFlowWithOidcMethodBody
|
19
|
+
# The CSRF Token
|
20
|
+
attr_accessor :csrf_token
|
21
|
+
|
22
|
+
# Method to use This field must be set to `oidc` when using the oidc method.
|
23
|
+
attr_accessor :method
|
24
|
+
|
25
|
+
# The provider to register with
|
26
|
+
attr_accessor :traits
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'csrf_token' => :'csrf_token',
|
32
|
+
:'method' => :'method',
|
33
|
+
:'traits' => :'traits'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'csrf_token' => :'String',
|
46
|
+
:'method' => :'String',
|
47
|
+
:'traits' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryKratosClient::SubmitSelfServiceLoginFlowWithOidcMethodBody` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryKratosClient::SubmitSelfServiceLoginFlowWithOidcMethodBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'csrf_token')
|
73
|
+
self.csrf_token = attributes[:'csrf_token']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'method')
|
77
|
+
self.method = attributes[:'method']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'traits')
|
81
|
+
self.traits = attributes[:'traits']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
if @method.nil?
|
90
|
+
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
91
|
+
end
|
92
|
+
|
93
|
+
if @traits.nil?
|
94
|
+
invalid_properties.push('invalid value for "traits", traits cannot be nil.')
|
95
|
+
end
|
96
|
+
|
97
|
+
invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
return false if @method.nil?
|
104
|
+
return false if @traits.nil?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
csrf_token == o.csrf_token &&
|
114
|
+
method == o.method &&
|
115
|
+
traits == o.traits
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
def hash
|
127
|
+
[csrf_token, method, traits].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def self.build_from_hash(attributes)
|
134
|
+
new.build_from_hash(attributes)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
143
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
+
self.send("#{key}=", nil)
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
146
|
+
# check to ensure the input is an array given that the attribute
|
147
|
+
# is documented as an array but the input is not
|
148
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
+
end
|
151
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def _deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :Time
|
166
|
+
Time.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :Boolean
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
# models (e.g. Pet) or oneOf
|
197
|
+
klass = OryKratosClient.const_get(type)
|
198
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
if value.nil?
|
221
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
222
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
223
|
+
end
|
224
|
+
|
225
|
+
hash[param] = _to_hash(value)
|
226
|
+
end
|
227
|
+
hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Outputs non-array value in the form of hash
|
231
|
+
# For object, use to_hash. Otherwise, just return the value
|
232
|
+
# @param [Object] value Any valid value
|
233
|
+
# @return [Hash] Returns the value in the form of hash
|
234
|
+
def _to_hash(value)
|
235
|
+
if value.is_a?(Array)
|
236
|
+
value.compact.map { |v| _to_hash(v) }
|
237
|
+
elsif value.is_a?(Hash)
|
238
|
+
{}.tap do |hash|
|
239
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
240
|
+
end
|
241
|
+
elsif value.respond_to? :to_hash
|
242
|
+
value.to_hash
|
243
|
+
else
|
244
|
+
value
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
end
|
249
|
+
|
250
|
+
end
|