class WebAuthn::FakeAuthenticator
def make_credential(
def make_credential( rp_id:, client_data_hash:, user_present: true, user_verified: false, backup_eligibility: false, backup_state: false, attested_credential_data: true, algorithm: nil, sign_count: nil, extensions: nil ) credential_id, credential_key, credential_sign_count = new_credential(algorithm) sign_count ||= credential_sign_count credentials[rp_id] ||= {} credentials[rp_id][credential_id] = { credential_key: credential_key, sign_count: sign_count + 1 } AttestationObject.new( client_data_hash: client_data_hash, rp_id_hash: hashed(rp_id), 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 ).serialize end