fbe9252db1
- Use plain client data json everywhere - Expose AAGUID and backed_up on Credentials - Make attestation verifiers configurable - Auto-suggest names for passkeys and show icons
13 lines
409 B
Ruby
13 lines
409 B
Ruby
class Identity::Credential::Authenticator < Data.define(:name, :icon)
|
|
REGISTRY = Rails.application.config_for(:passkey_aaguids).each_with_object({}) do |(_key, attrs), hash|
|
|
authenticator = new(name: attrs[:name], icon: attrs[:icon])
|
|
attrs[:aaguids].each { |aaguid| hash[aaguid] = authenticator }
|
|
end.freeze
|
|
|
|
class << self
|
|
def find_by_aaguid(aaguid)
|
|
REGISTRY[aaguid]
|
|
end
|
|
end
|
|
end
|