Module: OAuth2::Provider::Models::Mongoid::Client::Behaviour::ClassMethods

Defined in:
lib/oauth2/provider/models/mongoid/client.rb

Instance Method Summary collapse

Instance Method Details

#find_by_oauth_identifier(identifier) ⇒ Object


31
32
33
# File 'lib/oauth2/provider/models/mongoid/client.rb', line 31

def find_by_oauth_identifier(identifier)
  where(:oauth_identifier => identifier).first
end

#find_by_oauth_identifier_and_oauth_secret(identifier, secret) ⇒ Object


35
36
37
# File 'lib/oauth2/provider/models/mongoid/client.rb', line 35

def find_by_oauth_identifier_and_oauth_secret(identifier, secret)
  where(:oauth_identifier => identifier, :oauth_secret => secret).first
end