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



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

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

#find_by_oauth_identifier_and_oauth_secret(identifier, secret) ⇒ Object



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

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