]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
Log any use of basic authentication
[rails.git] / app / controllers / api_controller.rb
index 050c455cdf64f6bf09bf4e01db8849683fb0cc31..83a35e15f0ecc8aa4bdec8a81067cf44db9e940b 100644 (file)
@@ -109,6 +109,8 @@ class ApiController < ApplicationController
                           else
                             User.authenticate(:username => username, :password => passwd) # basic auth
                           end
+      # log if we have authenticated using basic auth
+      logger.info "Authenticated as user #{current_user.id} using basic authentication" if current_user
     end
 
     # have we identified the user?