Class: Devise::Passkeys::PasskeyIssuer::CredentialFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/devise/passkeys/passkey_issuer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_class:) ⇒ CredentialFinder

Returns a new instance of CredentialFinder.



27
28
29
# File 'lib/devise/passkeys/passkey_issuer.rb', line 27

def initialize(resource_class:)
  @resource_class = resource_class
end

Instance Attribute Details

#resource_classObject (readonly)

Returns the value of attribute resource_class.



25
26
27
# File 'lib/devise/passkeys/passkey_issuer.rb', line 25

def resource_class
  @resource_class
end

Instance Method Details

#find_with_credential_id(encoded_credential_id) ⇒ Object



31
32
33
# File 'lib/devise/passkeys/passkey_issuer.rb', line 31

def find_with_credential_id(encoded_credential_id)
  resource_class.passkeys_class.where(external_id: encoded_credential_id).first
end