Class: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/proximitybeacon_v1beta1/classes.rb,
generated/google/apis/proximitybeacon_v1beta1/representations.rb,
generated/google/apis/proximitybeacon_v1beta1/representations.rb

Overview

Write-only registration parameters for beacons using Eddystone-EID format. Two ways of securely registering an Eddystone-EID beacon with the service are supported: 1. Perform an ECDH key exchange via this API, including a previous call to GET /v1beta1/eidparams. In this case the fields beacon_ecdh_public_key and service_ecdh_public_key should be populated and beacon_identity_key should not be populated. This method ensures that only the two parties in the ECDH key exchange can compute the identity key, which becomes a secret between them. 2. Derive or obtain the beacon's identity key via other secure means (perhaps an ECDH key exchange between the beacon and a mobile device or any other secure method), and then submit the resulting identity key to the service. In this case beacon_identity_key field should be populated, and neither of beacon_ecdh_public_key nor service_ecdh_public_key fields should be. The security of this method depends on how securely the parties involved (in particular the bluetooth client) handle the identity key, and obviously on how securely the identity key was generated. See the Eddystone specification at GitHub.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ EphemeralIdRegistration

Returns a new instance of EphemeralIdRegistration.


315
316
317
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 315

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#beacon_ecdh_public_keyString

The beacon's public key used for the Elliptic curve Diffie-Hellman key exchange. When this field is populated, service_ecdh_public_key must also be populated, and beacon_identity_key must not be. Corresponds to the JSON property beaconEcdhPublicKey

Returns:

  • (String)

272
273
274
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 272

def beacon_ecdh_public_key
  @beacon_ecdh_public_key
end

#beacon_identity_keyString

The private key of the beacon. If this field is populated, beacon_ecdh_public_key and service_ecdh_public_key must not be populated. Corresponds to the JSON property beaconIdentityKey

Returns:

  • (String)

285
286
287
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 285

def beacon_identity_key
  @beacon_identity_key
end

#initial_clock_valueString

The initial clock value of the beacon. The beacon's clock must have begun counting at this value immediately prior to transmitting this value to the resolving service. Significant delay in transmitting this value to the service risks registration or resolution failures. If a value is not provided, the default is zero. Corresponds to the JSON property initialClockValue

Returns:

  • (String)

304
305
306
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 304

def initial_clock_value
  @initial_clock_value
end

#initial_eidString

An initial ephemeral ID calculated using the clock value submitted as initial_clock_value, and the secret key generated by the Diffie-Hellman key exchange using service_ecdh_public_key and service_ecdh_public_key. This initial EID value will be used by the service to confirm that the key exchange process was successful. Corresponds to the JSON property initialEid

Returns:

  • (String)

313
314
315
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 313

def initial_eid
  @initial_eid
end

#rotation_period_exponentFixnum

Indicates the nominal period between each rotation of the beacon's ephemeral ID. "Nominal" because the beacon should randomize the actual interval. See the spec at github for details. This value corresponds to a power-of-two scaler on the beacon's clock: when the scaler value is K, the beacon will begin broadcasting a new ephemeral ID on average every 2^K seconds. Corresponds to the JSON property rotationPeriodExponent

Returns:

  • (Fixnum)

295
296
297
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 295

def rotation_period_exponent
  @rotation_period_exponent
end

#service_ecdh_public_keyString

The service's public key used for the Elliptic curve Diffie-Hellman key exchange. When this field is populated, beacon_ecdh_public_key must also be populated, and beacon_identity_key must not be. Corresponds to the JSON property serviceEcdhPublicKey

Returns:

  • (String)

279
280
281
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 279

def service_ecdh_public_key
  @service_ecdh_public_key
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


320
321
322
323
324
325
326
327
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 320

def update!(**args)
  @beacon_ecdh_public_key = args[:beacon_ecdh_public_key] if args.key?(:beacon_ecdh_public_key)
  @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key)
  @beacon_identity_key = args[:beacon_identity_key] if args.key?(:beacon_identity_key)
  @rotation_period_exponent = args[:rotation_period_exponent] if args.key?(:rotation_period_exponent)
  @initial_clock_value = args[:initial_clock_value] if args.key?(:initial_clock_value)
  @initial_eid = args[:initial_eid] if args.key?(:initial_eid)
end