Class: Authn::TokenField::Finders::BaseEncryptedPartitioned

Inherits:
BaseEncrypted
  • Object
show all
Defined in:
lib/authn/token_field/finders/base_encrypted_partitioned.rb

Direct Known Subclasses

Ci::Jobs::PartitionedTokenFinder

Instance Method Summary collapse

Methods inherited from BaseEncrypted

#initialize

Constructor Details

This class inherits a constructor from Authn::TokenField::Finders::BaseEncrypted

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
# File 'lib/authn/token_field/finders/base_encrypted_partitioned.rb', line 7

def execute
  if partition_key.present?
    record = partition_scope.find_by(encrypted_field => tokens) # rubocop:disable CodeReuse/ActiveRecord -- have to use find_by
    return record if record
  end

  base_scope.find_by(encrypted_field => tokens) # rubocop:disable CodeReuse/ActiveRecord -- have to use find_by
end