]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/client_application.rb
Remove require_terms_agreed configuration option
[rails.git] / app / models / client_application.rb
index ef1a0110ec8bbeac3ed28303e13b49ce7e2b365f..d11942beb6434e7c393db40ad3cfd5f3c3c4849b 100644 (file)
@@ -51,12 +51,13 @@ class ClientApplication < ActiveRecord::Base
 
   def self.find_token(token_key)
     token = OauthToken.includes(:client_application).find_by(:token => token_key)
 
   def self.find_token(token_key)
     token = OauthToken.includes(:client_application).find_by(:token => token_key)
-    token if token && token.authorized?
+    token if token&.authorized?
   end
 
   def self.verify_request(request, options = {}, &block)
     signature = OAuth::Signature.build(request, options, &block)
     return false unless OauthNonce.remember(signature.request.nonce, signature.request.timestamp)
   end
 
   def self.verify_request(request, options = {}, &block)
     signature = OAuth::Signature.build(request, options, &block)
     return false unless OauthNonce.remember(signature.request.nonce, signature.request.timestamp)
+
     value = signature.verify
     value
   rescue OAuth::Signature::UnknownSignatureMethod
     value = signature.verify
     value
   rescue OAuth::Signature::UnknownSignatureMethod