module Doorkeeper::ApplicationMixin::ClassMethods

Public Instance Methods

by_uid(uid) click to toggle source

Returns an instance of the Doorkeeper::Application with specific UID.

@param uid [#to_s] UID (any object that responds to `#to_s`)

@return [Doorkeeper::Application, nil] Application instance or nil

if there is no record with such UID
# File lib/doorkeeper/models/application_mixin.rb, line 30
def by_uid(uid)
  find_by(uid: uid.to_s)
end
by_uid_and_secret(uid, secret) click to toggle source

Returns an instance of the Doorkeeper::Application with specific UID and secret.

@param uid [#to_s] UID (any object that responds to `#to_s`) @param secret [#to_s] secret (any object that responds to `#to_s`)

@return [Doorkeeper::Application, nil] Application instance or nil

if there is no record with such credentials
# File lib/doorkeeper/models/application_mixin.rb, line 19
def by_uid_and_secret(uid, secret)
  find_by(uid: uid.to_s, secret: secret.to_s)
end