Module: Oauned::Models::Oauthable::ClassMethods

Defined in:
lib/oauned/models/oauthable.rb

Instance Method Summary collapse

Instance Method Details

#find_for_oauth_authentication(access_token) ⇒ Object



10
11
12
13
# File 'lib/oauned/models/oauthable.rb', line 10

def find_for_oauth_authentication(access_token)
  token = Oauned::Models['connection'].where(['access_token LIKE ?', access_token]).first
  token.user if (token && !token.expired?)
end