]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/oauth_token.rb
Switch to using oauth-plugin as a gem
[rails.git] / app / models / oauth_token.rb
index f64ec53dbaf4869712d0b2bd1abc1f19a1dd1870..5fca40ce203e425965a59a222615976cf70eb5e4 100644 (file)
@@ -5,16 +5,6 @@ class OauthToken < ActiveRecord::Base
   validates_presence_of :client_application, :token, :secret
   before_validation_on_create :generate_keys
   
   validates_presence_of :client_application, :token, :secret
   before_validation_on_create :generate_keys
   
-  def self.find_token(token_key)
-    token = OauthToken.find_by_token(token_key, :include => :client_application)
-    if token && token.authorized?
-      logger.info "Loaded #{token.token} which was authorized by (user_id=#{token.user_id}) on the #{token.authorized_at}"
-      token
-    else
-      nil
-    end
-  end
-  
   def invalidated?
     invalidated_at != nil
   end
   def invalidated?
     invalidated_at != nil
   end