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

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

Instance Method Summary collapse

Instance Method Details

#find_by_code(code) ⇒ Object


37
38
39
# File 'lib/oauth2/provider/models/mongoid/authorization_code.rb', line 37

def find_by_code(code)
  where(:code => code).first
end

#find_by_code_and_redirect_uri(code, redirect_uri) ⇒ Object


29
30
31
# File 'lib/oauth2/provider/models/mongoid/authorization_code.rb', line 29

def find_by_code_and_redirect_uri(code, redirect_uri)
  where(:code => code, :redirect_uri => redirect_uri).first
end

#find_by_id(id) ⇒ Object


33
34
35
# File 'lib/oauth2/provider/models/mongoid/authorization_code.rb', line 33

def find_by_id(id)
  where(:id => id).first
end