belongs_to :user
validates_uniqueness_of :token
validates_presence_of :client_application, :token, :secret
belongs_to :user
validates_uniqueness_of :token
validates_presence_of :client_application, :token, :secret
def self.find_token(token_key)
token = OauthToken.find_by_token(token_key, :include => :client_application)
def self.find_token(token_key)
token = OauthToken.find_by_token(token_key, :include => :client_application)