Class: OryClient::UpdateSettingsFlowWithDeviceAuthnMethodAdd
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- OryClient::UpdateSettingsFlowWithDeviceAuthnMethodAdd
- Defined in:
- lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#attestation_ios ⇒ Object
Returns the value of attribute attestation_ios.
-
#certificate_chain_android ⇒ Object
CertificateChainAndroid is a list of base64 strings for creating a key on Android.
-
#device_name ⇒ Object
DeviceName is a human-readable name for the device e.g.
-
#pin_protected ⇒ Object
PINProtected indicates that the key is protected by a PIN.
-
#transport_public_key ⇒ Object
TransportPubKey is the transport public key (HPKE) used to seal the returned pin_secret so only this device can open it.
-
#user_verification ⇒ Object
Declares how the key's holder is verified at use time.
-
#version ⇒ Object
Version is the version number for the cryptography.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateSettingsFlowWithDeviceAuthnMethodAdd
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ UpdateSettingsFlowWithDeviceAuthnMethodAdd
Initializes the object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 104 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::UpdateSettingsFlowWithDeviceAuthnMethodAdd` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `OryClient::UpdateSettingsFlowWithDeviceAuthnMethodAdd`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'attestation_ios') self.attestation_ios = attributes[:'attestation_ios'] end if attributes.key?(:'certificate_chain_android') if (value = attributes[:'certificate_chain_android']).is_a?(Array) self.certificate_chain_android = value end end if attributes.key?(:'device_name') self.device_name = attributes[:'device_name'] else self.device_name = nil end if attributes.key?(:'pin_protected') self.pin_protected = attributes[:'pin_protected'] end if attributes.key?(:'transport_public_key') self.transport_public_key = attributes[:'transport_public_key'] end if attributes.key?(:'user_verification') self.user_verification = attributes[:'user_verification'] end if attributes.key?(:'version') self.version = attributes[:'version'] end end |
Instance Attribute Details
#attestation_ios ⇒ Object
Returns the value of attribute attestation_ios.
18 19 20 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 18 def attestation_ios @attestation_ios end |
#certificate_chain_android ⇒ Object
CertificateChainAndroid is a list of base64 strings for creating a key on Android. Each element is a certificate. The first element is the leaf, corresponding to the on-device key, the last is the root (Google CA).
21 22 23 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 21 def certificate_chain_android @certificate_chain_android end |
#device_name ⇒ Object
DeviceName is a human-readable name for the device e.g. 'My work phone'.
24 25 26 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 24 def device_name @device_name end |
#pin_protected ⇒ Object
PINProtected indicates that the key is protected by a PIN. When true, the server must issue a sealed pin_secret in the response.
27 28 29 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 27 def pin_protected @pin_protected end |
#transport_public_key ⇒ Object
TransportPubKey is the transport public key (HPKE) used to seal the returned pin_secret so only this device can open it. It is base64-encoded in JSON and decoded to raw bytes here.
30 31 32 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 30 def transport_public_key @transport_public_key end |
#user_verification ⇒ Object
Declares how the key's holder is verified at use time. One of "pin", "platform", or "none" (or empty, which maps to "none"). "pin" is implied by pin_protected and need not be set explicitly. For "platform" the server cross-checks the attestation on Android and trusts the declaration on iOS, since App Attest cannot prove biometric gating.
33 34 35 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 33 def user_verification @user_verification end |
#version ⇒ Object
Version is the version number for the cryptography. For now only 1 is supported which corresponds to SHA256 + EC.
36 37 38 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 36 def version @version end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
74 75 76 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 74 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
79 80 81 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 79 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 61 def self.attribute_map { :'attestation_ios' => :'attestation_ios', :'certificate_chain_android' => :'certificate_chain_android', :'device_name' => :'device_name', :'pin_protected' => :'pin_protected', :'transport_public_key' => :'transport_public_key', :'user_verification' => :'user_verification', :'version' => :'version' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 210 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
97 98 99 100 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 97 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 84 def self.openapi_types { :'attestation_ios' => :'String', :'certificate_chain_android' => :'Array<String>', :'device_name' => :'String', :'pin_protected' => :'Boolean', :'transport_public_key' => :'String', :'user_verification' => :'UserVerification', :'version' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 183 def ==(o) return true if self.equal?(o) self.class == o.class && attestation_ios == o.attestation_ios && certificate_chain_android == o.certificate_chain_android && device_name == o.device_name && pin_protected == o.pin_protected && transport_public_key == o.transport_public_key && user_verification == o.user_verification && version == o.version end |
#eql?(o) ⇒ Boolean
197 198 199 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 197 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
203 204 205 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 203 def hash [attestation_ios, certificate_chain_android, device_name, pin_protected, transport_public_key, user_verification, version].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
153 154 155 156 157 158 159 160 161 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 153 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @device_name.nil? invalid_properties.push('invalid value for "device_name", device_name cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 232 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
165 166 167 168 169 |
# File 'lib/ory-client/models/update_settings_flow_with_device_authn_method_add.rb', line 165 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @device_name.nil? true end |