Class: WebAuthn::Context::Registration

Inherits:
WebAuthn::Context show all
Defined in:
lib/web_authn/context/registration.rb

Instance Attribute Summary collapse

Attributes inherited from WebAuthn::Context

#client_data_json

Instance Method Summary collapse

Methods inherited from WebAuthn::Context

#authentication?, for, #initialize, #verify_session!

Constructor Details

This class inherits a constructor from WebAuthn::Context

Instance Attribute Details

#attestation_objectObject

Returns the value of attribute attestation_object.



4
5
6
# File 'lib/web_authn/context/registration.rb', line 4

def attestation_object
  @attestation_object
end

Instance Method Details

#registration?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/web_authn/context/registration.rb', line 12

def registration?
  true
end

#verify!(encoded_attestation_object) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/web_authn/context/registration.rb', line 16

def verify!(encoded_attestation_object)
  self.attestation_object = AttestationObject.decode(
    encoded_attestation_object
  )
  verify_flags!
  verify_signature!
  self
end