module Doorkeeper::ApplicationMixin::ClassMethods

def by_uid(uid)

def by_uid(uid)
  where(uid: uid.to_s).limit(1).to_a.first
end

def by_uid_and_secret(uid, secret)

def by_uid_and_secret(uid, secret)
  where(uid: uid.to_s, secret: secret.to_s).limit(1).to_a.first
end