ory-client 0.0.1.alpha12 → 0.0.1.alpha16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +79 -97
- data/docs/AdminCreateIdentityBody.md +20 -0
- data/docs/AdminCreateSelfServiceRecoveryLinkBody.md +20 -0
- data/docs/AdminUpdateIdentityBody.md +22 -0
- data/docs/Identity.md +6 -0
- data/docs/IdentityState.md +15 -0
- data/docs/MetadataApi.md +254 -0
- data/docs/SelfServiceError.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/V0alpha1Api.md +2172 -0
- data/lib/ory-client.rb +36 -26
- 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_client.rb +1 -1
- data/lib/ory-client/api_error.rb +1 -1
- data/lib/ory-client/configuration.rb +2 -16
- 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 +1 -1
- data/lib/ory-client/models/container_change_response_item.rb +1 -1
- data/lib/ory-client/models/container_create_created_body.rb +1 -1
- data/lib/ory-client/models/container_top_ok_body.rb +1 -1
- data/lib/ory-client/models/container_update_ok_body.rb +1 -1
- data/lib/ory-client/models/container_wait_ok_body.rb +1 -1
- data/lib/ory-client/models/container_wait_ok_body_error.rb +1 -1
- 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 +1 -1
- data/lib/ory-client/models/generic_error.rb +1 -1
- data/lib/ory-client/models/graph_driver_data.rb +1 -1
- data/lib/ory-client/models/health_not_ready_status.rb +1 -1
- data/lib/ory-client/models/health_status.rb +1 -1
- data/lib/ory-client/models/id_response.rb +1 -1
- data/lib/ory-client/models/identity.rb +32 -2
- data/lib/ory-client/models/identity_credentials.rb +1 -1
- data/lib/ory-client/models/identity_state.rb +37 -0
- data/lib/ory-client/models/image_delete_response_item.rb +1 -1
- data/lib/ory-client/models/image_summary.rb +1 -1
- data/lib/ory-client/models/inline_response200.rb +1 -1
- data/lib/ory-client/models/inline_response2001.rb +1 -1
- data/lib/ory-client/models/inline_response503.rb +1 -1
- data/lib/ory-client/models/json_error.rb +1 -1
- 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 +1 -1
- data/lib/ory-client/models/plugin.rb +1 -1
- data/lib/ory-client/models/plugin_config.rb +1 -1
- data/lib/ory-client/models/plugin_config_args.rb +1 -1
- data/lib/ory-client/models/plugin_config_interface.rb +1 -1
- data/lib/ory-client/models/plugin_config_linux.rb +1 -1
- data/lib/ory-client/models/plugin_config_network.rb +1 -1
- data/lib/ory-client/models/plugin_config_rootfs.rb +1 -1
- data/lib/ory-client/models/plugin_config_user.rb +1 -1
- data/lib/ory-client/models/plugin_device.rb +1 -1
- data/lib/ory-client/models/plugin_env.rb +1 -1
- data/lib/ory-client/models/plugin_interface_type.rb +1 -1
- data/lib/ory-client/models/plugin_mount.rb +1 -1
- data/lib/ory-client/models/plugin_settings.rb +1 -1
- data/lib/ory-client/models/port.rb +1 -1
- data/lib/ory-client/models/recovery_address.rb +1 -1
- 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 +338 -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 +302 -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 +1 -1
- data/lib/ory-client/models/session.rb +6 -16
- data/lib/ory-client/models/settings_flow.rb +1 -1
- data/lib/ory-client/models/settings_profile_form_config.rb +1 -1
- 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 +54 -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_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 +56 -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_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 +1 -1
- data/lib/ory-client/models/ui_node.rb +1 -1
- data/lib/ory-client/models/ui_node_anchor_attributes.rb +1 -1
- data/lib/ory-client/models/ui_node_attributes.rb +1 -1
- data/lib/ory-client/models/ui_node_image_attributes.rb +1 -1
- data/lib/ory-client/models/ui_node_input_attributes.rb +1 -1
- data/lib/ory-client/models/ui_node_text_attributes.rb +1 -1
- data/lib/ory-client/models/ui_text.rb +1 -1
- data/lib/ory-client/models/update_identity.rb +1 -1
- data/lib/ory-client/models/verifiable_identity_address.rb +1 -1
- data/lib/ory-client/models/verification_flow.rb +1 -1
- data/lib/ory-client/models/version.rb +1 -1
- data/lib/ory-client/models/volume.rb +1 -1
- data/lib/ory-client/models/volume_usage_data.rb +1 -1
- data/lib/ory-client/version.rb +2 -2
- data/ory-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 +1 -1
- 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/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/spec_helper.rb +1 -1
- metadata +142 -2
@@ -0,0 +1,37 @@
|
|
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 '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 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 '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
|
@@ -0,0 +1,38 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OryHydraClient
|
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,7 +3,7 @@
|
|
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.16
|
7
7
|
Contact: support@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 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.16
|
7
7
|
Contact: support@ory.sh
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.1.1
|
@@ -14,17 +14,22 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OryHydraClient
|
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.
|
@@ -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
|
|