ory-kratos-client 0.6.0.alpha17 → 0.7.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +82 -95
- data/docs/AdminApi.md +15 -13
- data/docs/AdminCreateIdentityBody.md +20 -0
- data/docs/AdminCreateSelfServiceRecoveryLinkBody.md +20 -0
- data/docs/AdminUpdateIdentityBody.md +22 -0
- data/docs/GenericError.md +14 -2
- data/docs/Identity.md +12 -4
- data/docs/IdentityCredentials.md +5 -1
- data/docs/JsonError.md +18 -0
- data/docs/LoginFlow.md +5 -1
- data/docs/MetadataApi.md +254 -0
- data/docs/PublicApi.md +216 -210
- data/docs/RecoveryAddress.md +4 -0
- data/docs/SelfServiceError.md +24 -0
- data/docs/SelfServiceErrorContainer.md +24 -0
- data/docs/SelfServiceLoginFlow.md +36 -0
- data/docs/SelfServiceLogoutUrl.md +18 -0
- data/docs/SelfServiceRecoveryFlow.md +32 -0
- data/docs/SelfServiceRecoveryFlowState.md +15 -0
- data/docs/SelfServiceRecoveryLink.md +20 -0
- data/docs/SelfServiceRegistrationFlow.md +30 -0
- data/docs/SelfServiceSettingsFlow.md +34 -0
- data/docs/SelfServiceSettingsFlowState.md +15 -0
- data/docs/SelfServiceVerificationFlow.md +32 -0
- data/docs/SelfServiceVerificationFlowState.md +15 -0
- data/docs/Session.md +4 -4
- data/docs/SubmitSelfServiceLoginFlowBody.md +76 -0
- data/docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md +22 -0
- data/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md +24 -0
- data/docs/SubmitSelfServiceLogoutFlowWithoutBrowserBody.md +18 -0
- data/docs/SubmitSelfServiceRecoveryFlowBody.md +75 -0
- data/docs/SubmitSelfServiceRecoveryFlowWithLinkMethodBody.md +22 -0
- data/docs/SubmitSelfServiceRegistrationFlowBody.md +76 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md +22 -0
- data/docs/SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowBody.md +79 -0
- data/docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md +24 -0
- data/docs/SubmitSelfServiceSettingsFlowWithPasswordMethodBody.md +22 -0
- data/docs/SubmitSelfServiceSettingsFlowWithProfileMethodBody.md +22 -0
- data/docs/SubmitSelfServiceVerificationFlowBody.md +75 -0
- data/docs/SubmitSelfServiceVerificationFlowWithLinkMethodBody.md +22 -0
- data/docs/SuccessfulSelfServiceLoginWithoutBrowser.md +20 -0
- data/docs/SuccessfulSelfServiceRegistrationWithoutBrowser.md +22 -0
- data/docs/SuccessfulSelfServiceSettingsWithoutBrowser.md +20 -0
- data/docs/UiNodeInputAttributes.md +1 -1
- data/docs/V0alpha1Api.md +2167 -0
- data/docs/VerifiableIdentityAddress.md +32 -0
- data/lib/ory-kratos-client.rb +37 -30
- data/lib/ory-kratos-client/api/admin_api.rb +7 -4
- data/lib/ory-kratos-client/api/metadata_api.rb +248 -0
- data/lib/ory-kratos-client/api/public_api.rb +171 -162
- data/lib/ory-kratos-client/api/v0alpha1_api.rb +2054 -0
- data/lib/ory-kratos-client/api_client.rb +1 -1
- data/lib/ory-kratos-client/api_error.rb +1 -1
- data/lib/ory-kratos-client/configuration.rb +9 -30
- data/lib/ory-kratos-client/models/admin_create_identity_body.rb +239 -0
- data/lib/ory-kratos-client/models/admin_create_self_service_recovery_link_body.rb +250 -0
- data/lib/ory-kratos-client/models/admin_update_identity_body.rb +245 -0
- data/lib/ory-kratos-client/models/authenticate_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_change_response_item.rb +1 -1
- data/lib/ory-kratos-client/models/container_create_created_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_top_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_update_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_wait_ok_body.rb +1 -1
- data/lib/ory-kratos-client/models/container_wait_ok_body_error.rb +1 -1
- data/lib/ory-kratos-client/models/create_identity.rb +1 -1
- data/lib/ory-kratos-client/models/create_recovery_link.rb +1 -1
- data/lib/ory-kratos-client/models/error_container.rb +1 -1
- data/lib/ory-kratos-client/models/error_response.rb +1 -1
- data/lib/ory-kratos-client/models/generic_error.rb +76 -9
- data/lib/ory-kratos-client/models/generic_error_payload.rb +1 -1
- data/lib/ory-kratos-client/models/graph_driver_data.rb +1 -1
- data/lib/ory-kratos-client/models/health_not_ready_status.rb +1 -1
- data/lib/ory-kratos-client/models/health_status.rb +1 -1
- data/lib/ory-kratos-client/models/id_response.rb +1 -1
- data/lib/ory-kratos-client/models/identity.rb +56 -15
- data/lib/ory-kratos-client/models/identity_credentials.rb +25 -5
- data/lib/ory-kratos-client/models/image_delete_response_item.rb +1 -1
- data/lib/ory-kratos-client/models/image_summary.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response200.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response2001.rb +1 -1
- data/lib/ory-kratos-client/models/inline_response503.rb +1 -1
- data/lib/ory-kratos-client/models/json_error.rb +224 -0
- data/lib/ory-kratos-client/models/login_flow.rb +25 -5
- data/lib/ory-kratos-client/models/login_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/meta.rb +1 -1
- data/lib/ory-kratos-client/models/plugin.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_args.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_interface.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_linux.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_network.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_rootfs.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_config_user.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_device.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_env.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_interface_type.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_mount.rb +1 -1
- data/lib/ory-kratos-client/models/plugin_settings.rb +1 -1
- data/lib/ory-kratos-client/models/port.rb +1 -1
- data/lib/ory-kratos-client/models/recovery_address.rb +22 -2
- data/lib/ory-kratos-client/models/recovery_flow.rb +1 -1
- data/lib/ory-kratos-client/models/recovery_link.rb +1 -1
- data/lib/ory-kratos-client/models/registration_flow.rb +1 -1
- data/lib/ory-kratos-client/models/registration_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/revoke_session.rb +1 -1
- data/lib/ory-kratos-client/models/self_service_error.rb +252 -0
- data/lib/ory-kratos-client/models/self_service_error_container.rb +260 -0
- data/lib/ory-kratos-client/models/self_service_login_flow.rb +338 -0
- data/lib/ory-kratos-client/models/self_service_logout_url.rb +219 -0
- data/lib/ory-kratos-client/models/self_service_recovery_flow.rb +317 -0
- data/lib/ory-kratos-client/models/self_service_recovery_flow_state.rb +38 -0
- data/lib/ory-kratos-client/models/self_service_recovery_link.rb +234 -0
- data/lib/ory-kratos-client/models/self_service_registration_flow.rb +302 -0
- data/lib/ory-kratos-client/models/self_service_settings_flow.rb +331 -0
- data/lib/ory-kratos-client/models/self_service_settings_flow_state.rb +37 -0
- data/lib/ory-kratos-client/models/self_service_verification_flow.rb +307 -0
- data/lib/ory-kratos-client/models/self_service_verification_flow_state.rb +38 -0
- data/lib/ory-kratos-client/models/service_update_response.rb +1 -1
- data/lib/ory-kratos-client/models/session.rb +6 -16
- data/lib/ory-kratos-client/models/settings_flow.rb +1 -1
- data/lib/ory-kratos-client/models/settings_profile_form_config.rb +1 -1
- data/lib/ory-kratos-client/models/settings_via_api_response.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_browser_settings_oidc_flow_payload.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_password_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_login_flow_with_password_method_body.rb +298 -0
- data/lib/ory-kratos-client/models/submit_self_service_logout_flow_without_browser_body.rb +225 -0
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_body.rb +53 -0
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_with_link_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_password_method.rb +22 -1
- data/lib/ory-kratos-client/models/submit_self_service_registration_flow_with_password_method_body.rb +299 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_body.rb +56 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +255 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_password_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_password_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_profile_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +250 -0
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_body.rb +54 -0
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_with_link_method.rb +1 -1
- data/lib/ory-kratos-client/models/submit_self_service_verification_flow_with_link_method_body.rb +283 -0
- data/lib/ory-kratos-client/models/successful_self_service_login_without_browser.rb +234 -0
- data/lib/ory-kratos-client/models/successful_self_service_registration_without_browser.rb +243 -0
- data/lib/ory-kratos-client/models/successful_self_service_settings_without_browser.rb +238 -0
- data/lib/ory-kratos-client/models/ui_container.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_anchor_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_image_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_input_attributes.rb +4 -2
- data/lib/ory-kratos-client/models/ui_node_input_attributes_value.rb +1 -1
- data/lib/ory-kratos-client/models/ui_node_text_attributes.rb +1 -1
- data/lib/ory-kratos-client/models/ui_text.rb +1 -1
- data/lib/ory-kratos-client/models/update_identity.rb +1 -1
- data/lib/ory-kratos-client/models/verifiable_address.rb +1 -1
- data/lib/ory-kratos-client/models/verifiable_identity_address.rb +313 -0
- data/lib/ory-kratos-client/models/verification_flow.rb +1 -1
- data/lib/ory-kratos-client/models/version.rb +1 -1
- data/lib/ory-kratos-client/models/volume.rb +1 -1
- data/lib/ory-kratos-client/models/volume_usage_data.rb +1 -1
- data/lib/ory-kratos-client/version.rb +2 -2
- data/ory-kratos-client.gemspec +1 -1
- data/spec/api/metadata_api_spec.rb +79 -0
- data/spec/api/v0alpha1_api_spec.rb +429 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/admin_create_identity_body_spec.rb +40 -0
- data/spec/models/admin_create_self_service_recovery_link_body_spec.rb +40 -0
- data/spec/models/admin_update_identity_body_spec.rb +46 -0
- data/spec/models/json_error_spec.rb +34 -0
- data/spec/models/self_service_error_container_spec.rb +52 -0
- data/spec/models/self_service_error_spec.rb +52 -0
- data/spec/models/self_service_login_flow_spec.rb +88 -0
- data/spec/models/self_service_logout_url_spec.rb +34 -0
- data/spec/models/self_service_recovery_flow_spec.rb +76 -0
- data/spec/models/self_service_recovery_flow_state_spec.rb +28 -0
- data/spec/models/self_service_recovery_link_spec.rb +40 -0
- data/spec/models/self_service_registration_flow_spec.rb +70 -0
- data/spec/models/self_service_settings_flow_spec.rb +82 -0
- data/spec/models/self_service_settings_flow_state_spec.rb +28 -0
- data/spec/models/self_service_verification_flow_spec.rb +76 -0
- data/spec/models/self_service_verification_flow_state_spec.rb +28 -0
- data/spec/models/submit_self_service_login_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_login_flow_with_oidc_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_login_flow_with_password_method_body_spec.rb +56 -0
- data/spec/models/submit_self_service_logout_flow_without_browser_body_spec.rb +34 -0
- data/spec/models/submit_self_service_recovery_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_recovery_flow_with_link_method_body_spec.rb +50 -0
- data/spec/models/submit_self_service_registration_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_registration_flow_with_oidc_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_registration_flow_with_password_method_body_spec.rb +56 -0
- data/spec/models/submit_self_service_settings_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_settings_flow_with_oidc_method_body_spec.rb +52 -0
- data/spec/models/submit_self_service_settings_flow_with_password_method_body_spec.rb +50 -0
- data/spec/models/submit_self_service_settings_flow_with_profile_method_body_spec.rb +46 -0
- data/spec/models/submit_self_service_verification_flow_body_spec.rb +43 -0
- data/spec/models/submit_self_service_verification_flow_with_link_method_body_spec.rb +50 -0
- data/spec/models/successful_self_service_login_without_browser_spec.rb +40 -0
- data/spec/models/successful_self_service_registration_without_browser_spec.rb +46 -0
- data/spec/models/successful_self_service_settings_without_browser_spec.rb +40 -0
- data/spec/models/verifiable_identity_address_spec.rb +76 -0
- data/spec/spec_helper.rb +1 -1
- metadata +150 -2
@@ -0,0 +1,331 @@
|
|
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.0-alpha.1
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryHydraClient
|
17
|
+
# This flow is used when an identity wants to update settings (e.g. profile data, passwords, ...) in a selfservice manner. We recommend reading the [User Settings Documentation](../self-service/flows/user-settings)
|
18
|
+
class SelfServiceSettingsFlow
|
19
|
+
# Active, if set, contains the registration method that is being used. It is initially not set.
|
20
|
+
attr_accessor :active
|
21
|
+
|
22
|
+
# ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting, a new flow has to be initiated.
|
23
|
+
attr_accessor :expires_at
|
24
|
+
|
25
|
+
attr_accessor :id
|
26
|
+
|
27
|
+
attr_accessor :identity
|
28
|
+
|
29
|
+
# IssuedAt is the time (UTC) when the flow occurred.
|
30
|
+
attr_accessor :issued_at
|
31
|
+
|
32
|
+
# RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
|
33
|
+
attr_accessor :request_url
|
34
|
+
|
35
|
+
attr_accessor :state
|
36
|
+
|
37
|
+
# The flow type can either be `api` or `browser`.
|
38
|
+
attr_accessor :type
|
39
|
+
|
40
|
+
attr_accessor :ui
|
41
|
+
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'active' => :'active',
|
46
|
+
:'expires_at' => :'expires_at',
|
47
|
+
:'id' => :'id',
|
48
|
+
:'identity' => :'identity',
|
49
|
+
:'issued_at' => :'issued_at',
|
50
|
+
:'request_url' => :'request_url',
|
51
|
+
:'state' => :'state',
|
52
|
+
:'type' => :'type',
|
53
|
+
:'ui' => :'ui'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Returns all the JSON keys this model knows about
|
58
|
+
def self.acceptable_attributes
|
59
|
+
attribute_map.values
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.openapi_types
|
64
|
+
{
|
65
|
+
:'active' => :'String',
|
66
|
+
:'expires_at' => :'Time',
|
67
|
+
:'id' => :'String',
|
68
|
+
:'identity' => :'Identity',
|
69
|
+
:'issued_at' => :'Time',
|
70
|
+
:'request_url' => :'String',
|
71
|
+
:'state' => :'SelfServiceSettingsFlowState',
|
72
|
+
:'type' => :'String',
|
73
|
+
:'ui' => :'UiContainer'
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# List of attributes with nullable: true
|
78
|
+
def self.openapi_nullable
|
79
|
+
Set.new([
|
80
|
+
])
|
81
|
+
end
|
82
|
+
|
83
|
+
# Initializes the object
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
def initialize(attributes = {})
|
86
|
+
if (!attributes.is_a?(Hash))
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::SelfServiceSettingsFlow` initialize method"
|
88
|
+
end
|
89
|
+
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
92
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::SelfServiceSettingsFlow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
94
|
+
end
|
95
|
+
h[k.to_sym] = v
|
96
|
+
}
|
97
|
+
|
98
|
+
if attributes.key?(:'active')
|
99
|
+
self.active = attributes[:'active']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'expires_at')
|
103
|
+
self.expires_at = attributes[:'expires_at']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'id')
|
107
|
+
self.id = attributes[:'id']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'identity')
|
111
|
+
self.identity = attributes[:'identity']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'issued_at')
|
115
|
+
self.issued_at = attributes[:'issued_at']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'request_url')
|
119
|
+
self.request_url = attributes[:'request_url']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'state')
|
123
|
+
self.state = attributes[:'state']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'type')
|
127
|
+
self.type = attributes[:'type']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.key?(:'ui')
|
131
|
+
self.ui = attributes[:'ui']
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
136
|
+
# @return Array for valid properties with the reasons
|
137
|
+
def list_invalid_properties
|
138
|
+
invalid_properties = Array.new
|
139
|
+
if @expires_at.nil?
|
140
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
141
|
+
end
|
142
|
+
|
143
|
+
if @id.nil?
|
144
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
145
|
+
end
|
146
|
+
|
147
|
+
if @identity.nil?
|
148
|
+
invalid_properties.push('invalid value for "identity", identity cannot be nil.')
|
149
|
+
end
|
150
|
+
|
151
|
+
if @issued_at.nil?
|
152
|
+
invalid_properties.push('invalid value for "issued_at", issued_at cannot be nil.')
|
153
|
+
end
|
154
|
+
|
155
|
+
if @request_url.nil?
|
156
|
+
invalid_properties.push('invalid value for "request_url", request_url cannot be nil.')
|
157
|
+
end
|
158
|
+
|
159
|
+
if @state.nil?
|
160
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
161
|
+
end
|
162
|
+
|
163
|
+
if @ui.nil?
|
164
|
+
invalid_properties.push('invalid value for "ui", ui cannot be nil.')
|
165
|
+
end
|
166
|
+
|
167
|
+
invalid_properties
|
168
|
+
end
|
169
|
+
|
170
|
+
# Check to see if the all the properties in the model are valid
|
171
|
+
# @return true if the model is valid
|
172
|
+
def valid?
|
173
|
+
return false if @expires_at.nil?
|
174
|
+
return false if @id.nil?
|
175
|
+
return false if @identity.nil?
|
176
|
+
return false if @issued_at.nil?
|
177
|
+
return false if @request_url.nil?
|
178
|
+
return false if @state.nil?
|
179
|
+
return false if @ui.nil?
|
180
|
+
true
|
181
|
+
end
|
182
|
+
|
183
|
+
# Checks equality by comparing each attribute.
|
184
|
+
# @param [Object] Object to be compared
|
185
|
+
def ==(o)
|
186
|
+
return true if self.equal?(o)
|
187
|
+
self.class == o.class &&
|
188
|
+
active == o.active &&
|
189
|
+
expires_at == o.expires_at &&
|
190
|
+
id == o.id &&
|
191
|
+
identity == o.identity &&
|
192
|
+
issued_at == o.issued_at &&
|
193
|
+
request_url == o.request_url &&
|
194
|
+
state == o.state &&
|
195
|
+
type == o.type &&
|
196
|
+
ui == o.ui
|
197
|
+
end
|
198
|
+
|
199
|
+
# @see the `==` method
|
200
|
+
# @param [Object] Object to be compared
|
201
|
+
def eql?(o)
|
202
|
+
self == o
|
203
|
+
end
|
204
|
+
|
205
|
+
# Calculates hash code according to all attributes.
|
206
|
+
# @return [Integer] Hash code
|
207
|
+
def hash
|
208
|
+
[active, expires_at, id, identity, issued_at, request_url, state, type, ui].hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Builds the object from hash
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
213
|
+
# @return [Object] Returns the model itself
|
214
|
+
def self.build_from_hash(attributes)
|
215
|
+
new.build_from_hash(attributes)
|
216
|
+
end
|
217
|
+
|
218
|
+
# Builds the object from hash
|
219
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
220
|
+
# @return [Object] Returns the model itself
|
221
|
+
def build_from_hash(attributes)
|
222
|
+
return nil unless attributes.is_a?(Hash)
|
223
|
+
self.class.openapi_types.each_pair do |key, type|
|
224
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
225
|
+
self.send("#{key}=", nil)
|
226
|
+
elsif type =~ /\AArray<(.*)>/i
|
227
|
+
# check to ensure the input is an array given that the attribute
|
228
|
+
# is documented as an array but the input is not
|
229
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
230
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
231
|
+
end
|
232
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
233
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
self
|
238
|
+
end
|
239
|
+
|
240
|
+
# Deserializes the data based on type
|
241
|
+
# @param string type Data type
|
242
|
+
# @param string value Value to be deserialized
|
243
|
+
# @return [Object] Deserialized data
|
244
|
+
def _deserialize(type, value)
|
245
|
+
case type.to_sym
|
246
|
+
when :Time
|
247
|
+
Time.parse(value)
|
248
|
+
when :Date
|
249
|
+
Date.parse(value)
|
250
|
+
when :String
|
251
|
+
value.to_s
|
252
|
+
when :Integer
|
253
|
+
value.to_i
|
254
|
+
when :Float
|
255
|
+
value.to_f
|
256
|
+
when :Boolean
|
257
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
258
|
+
true
|
259
|
+
else
|
260
|
+
false
|
261
|
+
end
|
262
|
+
when :Object
|
263
|
+
# generic object (usually a Hash), return directly
|
264
|
+
value
|
265
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
266
|
+
inner_type = Regexp.last_match[:inner_type]
|
267
|
+
value.map { |v| _deserialize(inner_type, v) }
|
268
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
269
|
+
k_type = Regexp.last_match[:k_type]
|
270
|
+
v_type = Regexp.last_match[:v_type]
|
271
|
+
{}.tap do |hash|
|
272
|
+
value.each do |k, v|
|
273
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
else # model
|
277
|
+
# models (e.g. Pet) or oneOf
|
278
|
+
klass = OryHydraClient.const_get(type)
|
279
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Returns the string representation of the object
|
284
|
+
# @return [String] String presentation of the object
|
285
|
+
def to_s
|
286
|
+
to_hash.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# to_body is an alias to to_hash (backward compatibility)
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
291
|
+
def to_body
|
292
|
+
to_hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Returns the object in the form of hash
|
296
|
+
# @return [Hash] Returns the object in the form of hash
|
297
|
+
def to_hash
|
298
|
+
hash = {}
|
299
|
+
self.class.attribute_map.each_pair do |attr, param|
|
300
|
+
value = self.send(attr)
|
301
|
+
if value.nil?
|
302
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
303
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
304
|
+
end
|
305
|
+
|
306
|
+
hash[param] = _to_hash(value)
|
307
|
+
end
|
308
|
+
hash
|
309
|
+
end
|
310
|
+
|
311
|
+
# Outputs non-array value in the form of hash
|
312
|
+
# For object, use to_hash. Otherwise, just return the value
|
313
|
+
# @param [Object] value Any valid value
|
314
|
+
# @return [Hash] Returns the value in the form of hash
|
315
|
+
def _to_hash(value)
|
316
|
+
if value.is_a?(Array)
|
317
|
+
value.compact.map { |v| _to_hash(v) }
|
318
|
+
elsif value.is_a?(Hash)
|
319
|
+
{}.tap do |hash|
|
320
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
321
|
+
end
|
322
|
+
elsif value.respond_to? :to_hash
|
323
|
+
value.to_hash
|
324
|
+
else
|
325
|
+
value
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
end
|
330
|
+
|
331
|
+
end
|
@@ -0,0 +1,37 @@
|
|
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.0-alpha.1
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryHydraClient
|
17
|
+
class SelfServiceSettingsFlowState
|
18
|
+
SHOW_FORM = "show_form".freeze
|
19
|
+
SUCCESS = "success".freeze
|
20
|
+
|
21
|
+
# Builds the enum from string
|
22
|
+
# @param [String] The enum value in the form of the string
|
23
|
+
# @return [String] The enum value
|
24
|
+
def self.build_from_hash(value)
|
25
|
+
new.build_from_hash(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Builds the enum from string
|
29
|
+
# @param [String] The enum value in the form of the string
|
30
|
+
# @return [String] The enum value
|
31
|
+
def build_from_hash(value)
|
32
|
+
constantValues = SelfServiceSettingsFlowState.constants.select { |c| SelfServiceSettingsFlowState::const_get(c) == value }
|
33
|
+
raise "Invalid ENUM value #{value} for class #SelfServiceSettingsFlowState" if constantValues.empty?
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,307 @@
|
|
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.0-alpha.1
|
7
|
+
Contact: hi@ory.sh
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryHydraClient
|
17
|
+
# Used to verify an out-of-band communication channel such as an email address or a phone number. For more information head over to: https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation
|
18
|
+
class SelfServiceVerificationFlow
|
19
|
+
# Active, if set, contains the registration method that is being used. It is initially not set.
|
20
|
+
attr_accessor :active
|
21
|
+
|
22
|
+
# ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address, a new request has to be initiated.
|
23
|
+
attr_accessor :expires_at
|
24
|
+
|
25
|
+
attr_accessor :id
|
26
|
+
|
27
|
+
# IssuedAt is the time (UTC) when the request occurred.
|
28
|
+
attr_accessor :issued_at
|
29
|
+
|
30
|
+
# RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
|
31
|
+
attr_accessor :request_url
|
32
|
+
|
33
|
+
attr_accessor :state
|
34
|
+
|
35
|
+
# The flow type can either be `api` or `browser`.
|
36
|
+
attr_accessor :type
|
37
|
+
|
38
|
+
attr_accessor :ui
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'active' => :'active',
|
44
|
+
:'expires_at' => :'expires_at',
|
45
|
+
:'id' => :'id',
|
46
|
+
:'issued_at' => :'issued_at',
|
47
|
+
:'request_url' => :'request_url',
|
48
|
+
:'state' => :'state',
|
49
|
+
:'type' => :'type',
|
50
|
+
:'ui' => :'ui'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Returns all the JSON keys this model knows about
|
55
|
+
def self.acceptable_attributes
|
56
|
+
attribute_map.values
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.openapi_types
|
61
|
+
{
|
62
|
+
:'active' => :'String',
|
63
|
+
:'expires_at' => :'Time',
|
64
|
+
:'id' => :'String',
|
65
|
+
:'issued_at' => :'Time',
|
66
|
+
:'request_url' => :'String',
|
67
|
+
:'state' => :'SelfServiceVerificationFlowState',
|
68
|
+
:'type' => :'String',
|
69
|
+
:'ui' => :'UiContainer'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# List of attributes with nullable: true
|
74
|
+
def self.openapi_nullable
|
75
|
+
Set.new([
|
76
|
+
])
|
77
|
+
end
|
78
|
+
|
79
|
+
# Initializes the object
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
def initialize(attributes = {})
|
82
|
+
if (!attributes.is_a?(Hash))
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::SelfServiceVerificationFlow` initialize method"
|
84
|
+
end
|
85
|
+
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
88
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::SelfServiceVerificationFlow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
90
|
+
end
|
91
|
+
h[k.to_sym] = v
|
92
|
+
}
|
93
|
+
|
94
|
+
if attributes.key?(:'active')
|
95
|
+
self.active = attributes[:'active']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'expires_at')
|
99
|
+
self.expires_at = attributes[:'expires_at']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'id')
|
103
|
+
self.id = attributes[:'id']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'issued_at')
|
107
|
+
self.issued_at = attributes[:'issued_at']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'request_url')
|
111
|
+
self.request_url = attributes[:'request_url']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'state')
|
115
|
+
self.state = attributes[:'state']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'type')
|
119
|
+
self.type = attributes[:'type']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'ui')
|
123
|
+
self.ui = attributes[:'ui']
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
128
|
+
# @return Array for valid properties with the reasons
|
129
|
+
def list_invalid_properties
|
130
|
+
invalid_properties = Array.new
|
131
|
+
if @id.nil?
|
132
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
133
|
+
end
|
134
|
+
|
135
|
+
if @state.nil?
|
136
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
137
|
+
end
|
138
|
+
|
139
|
+
if @type.nil?
|
140
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
141
|
+
end
|
142
|
+
|
143
|
+
if @ui.nil?
|
144
|
+
invalid_properties.push('invalid value for "ui", ui cannot be nil.')
|
145
|
+
end
|
146
|
+
|
147
|
+
invalid_properties
|
148
|
+
end
|
149
|
+
|
150
|
+
# Check to see if the all the properties in the model are valid
|
151
|
+
# @return true if the model is valid
|
152
|
+
def valid?
|
153
|
+
return false if @id.nil?
|
154
|
+
return false if @state.nil?
|
155
|
+
return false if @type.nil?
|
156
|
+
return false if @ui.nil?
|
157
|
+
true
|
158
|
+
end
|
159
|
+
|
160
|
+
# Checks equality by comparing each attribute.
|
161
|
+
# @param [Object] Object to be compared
|
162
|
+
def ==(o)
|
163
|
+
return true if self.equal?(o)
|
164
|
+
self.class == o.class &&
|
165
|
+
active == o.active &&
|
166
|
+
expires_at == o.expires_at &&
|
167
|
+
id == o.id &&
|
168
|
+
issued_at == o.issued_at &&
|
169
|
+
request_url == o.request_url &&
|
170
|
+
state == o.state &&
|
171
|
+
type == o.type &&
|
172
|
+
ui == o.ui
|
173
|
+
end
|
174
|
+
|
175
|
+
# @see the `==` method
|
176
|
+
# @param [Object] Object to be compared
|
177
|
+
def eql?(o)
|
178
|
+
self == o
|
179
|
+
end
|
180
|
+
|
181
|
+
# Calculates hash code according to all attributes.
|
182
|
+
# @return [Integer] Hash code
|
183
|
+
def hash
|
184
|
+
[active, expires_at, id, issued_at, request_url, state, type, ui].hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Builds the object from hash
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
189
|
+
# @return [Object] Returns the model itself
|
190
|
+
def self.build_from_hash(attributes)
|
191
|
+
new.build_from_hash(attributes)
|
192
|
+
end
|
193
|
+
|
194
|
+
# Builds the object from hash
|
195
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
196
|
+
# @return [Object] Returns the model itself
|
197
|
+
def build_from_hash(attributes)
|
198
|
+
return nil unless attributes.is_a?(Hash)
|
199
|
+
self.class.openapi_types.each_pair do |key, type|
|
200
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
201
|
+
self.send("#{key}=", nil)
|
202
|
+
elsif type =~ /\AArray<(.*)>/i
|
203
|
+
# check to ensure the input is an array given that the attribute
|
204
|
+
# is documented as an array but the input is not
|
205
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
206
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
207
|
+
end
|
208
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
209
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
self
|
214
|
+
end
|
215
|
+
|
216
|
+
# Deserializes the data based on type
|
217
|
+
# @param string type Data type
|
218
|
+
# @param string value Value to be deserialized
|
219
|
+
# @return [Object] Deserialized data
|
220
|
+
def _deserialize(type, value)
|
221
|
+
case type.to_sym
|
222
|
+
when :Time
|
223
|
+
Time.parse(value)
|
224
|
+
when :Date
|
225
|
+
Date.parse(value)
|
226
|
+
when :String
|
227
|
+
value.to_s
|
228
|
+
when :Integer
|
229
|
+
value.to_i
|
230
|
+
when :Float
|
231
|
+
value.to_f
|
232
|
+
when :Boolean
|
233
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
234
|
+
true
|
235
|
+
else
|
236
|
+
false
|
237
|
+
end
|
238
|
+
when :Object
|
239
|
+
# generic object (usually a Hash), return directly
|
240
|
+
value
|
241
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
242
|
+
inner_type = Regexp.last_match[:inner_type]
|
243
|
+
value.map { |v| _deserialize(inner_type, v) }
|
244
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
245
|
+
k_type = Regexp.last_match[:k_type]
|
246
|
+
v_type = Regexp.last_match[:v_type]
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each do |k, v|
|
249
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
else # model
|
253
|
+
# models (e.g. Pet) or oneOf
|
254
|
+
klass = OryHydraClient.const_get(type)
|
255
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
# Returns the string representation of the object
|
260
|
+
# @return [String] String presentation of the object
|
261
|
+
def to_s
|
262
|
+
to_hash.to_s
|
263
|
+
end
|
264
|
+
|
265
|
+
# to_body is an alias to to_hash (backward compatibility)
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
267
|
+
def to_body
|
268
|
+
to_hash
|
269
|
+
end
|
270
|
+
|
271
|
+
# Returns the object in the form of hash
|
272
|
+
# @return [Hash] Returns the object in the form of hash
|
273
|
+
def to_hash
|
274
|
+
hash = {}
|
275
|
+
self.class.attribute_map.each_pair do |attr, param|
|
276
|
+
value = self.send(attr)
|
277
|
+
if value.nil?
|
278
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
279
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
280
|
+
end
|
281
|
+
|
282
|
+
hash[param] = _to_hash(value)
|
283
|
+
end
|
284
|
+
hash
|
285
|
+
end
|
286
|
+
|
287
|
+
# Outputs non-array value in the form of hash
|
288
|
+
# For object, use to_hash. Otherwise, just return the value
|
289
|
+
# @param [Object] value Any valid value
|
290
|
+
# @return [Hash] Returns the value in the form of hash
|
291
|
+
def _to_hash(value)
|
292
|
+
if value.is_a?(Array)
|
293
|
+
value.compact.map { |v| _to_hash(v) }
|
294
|
+
elsif value.is_a?(Hash)
|
295
|
+
{}.tap do |hash|
|
296
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
297
|
+
end
|
298
|
+
elsif value.respond_to? :to_hash
|
299
|
+
value.to_hash
|
300
|
+
else
|
301
|
+
value
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
end
|
306
|
+
|
307
|
+
end
|