class Cabal::API::User

Public Instance Methods

authenticated_with?(secret_key) click to toggle source
# File lib/cabal/api/user.rb, line 21
def authenticated_with?(secret_key)
  return false unless crypted_secret_key.length > 0

  BCrypt::Password.new(crypted_secret_key) == secret_key
end
crypto_key() click to toggle source
# File lib/cabal/api/user.rb, line 17
def crypto_key
  "#{email}::#{created_at}::#{access_key}"
end