lib/doorkeeper/oauth/token.rb in doorkeeper-1.4.2 vs lib/doorkeeper/oauth/token.rb in doorkeeper-2.0.0.alpha1
- old
+ new
@@ -52,11 +52,12 @@
break credentials unless credentials.blank?
end
end
def self.authenticate(request, *methods)
- token = from_request request, *methods
- AccessToken.authenticate(token) if token
+ if token = from_request(request, *methods)
+ AccessToken.by_token(token)
+ end
end
end
end
end