about summary refs log tree commit diff
path: root/spec/fabricators/webauthn_credential_fabricator.rb
blob: 496a7a7351bb8108d30f1e43cc6b01b75d98c325 (plain) (blame)
1
2
3
4
5
6
7
Fabricator(:webauthn_credential) do
  user_id { Fabricate(:user).id }
  external_id { Base64.urlsafe_encode64(SecureRandom.random_bytes(16)) }
  public_key { OpenSSL::PKey::EC.new("prime256v1").generate_key.public_key }
  nickname 'USB key'
  sign_count 0
end