Class: WebAuthn::FakeAuthenticator::AttestationObject
- Inherits:
-
Object
- Object
- WebAuthn::FakeAuthenticator::AttestationObject
- Defined in:
- lib/webauthn/fake_authenticator/attestation_object.rb
Instance Method Summary collapse
-
#initialize(client_data_hash:, rp_id_hash:, credential_id:, credential_key:, user_present: true, user_verified: false, backup_eligibility: false, backup_state: false, attested_credential_data: true, sign_count: 0, extensions: nil) ⇒ AttestationObject
constructor
A new instance of AttestationObject.
- #serialize ⇒ Object
Constructor Details
#initialize(client_data_hash:, rp_id_hash:, credential_id:, credential_key:, user_present: true, user_verified: false, backup_eligibility: false, backup_state: false, attested_credential_data: true, sign_count: 0, extensions: nil) ⇒ AttestationObject
Returns a new instance of AttestationObject.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/webauthn/fake_authenticator/attestation_object.rb', line 9 def initialize( client_data_hash:, rp_id_hash:, credential_id:, credential_key:, user_present: true, user_verified: false, backup_eligibility: false, backup_state: false, attested_credential_data: true, sign_count: 0, extensions: nil ) @client_data_hash = client_data_hash @rp_id_hash = rp_id_hash @credential_id = credential_id @credential_key = credential_key @user_present = user_present @user_verified = user_verified @backup_eligibility = backup_eligibility @backup_state = backup_state @attested_credential_data = attested_credential_data @sign_count = sign_count @extensions = extensions end |
Instance Method Details
#serialize ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/webauthn/fake_authenticator/attestation_object.rb', line 35 def serialize CBOR.encode( "fmt" => "none", "attStmt" => {}, "authData" => authenticator_data.serialize ) end |