aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2014-05-07 13:36:35 +0200
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2014-05-07 13:36:35 +0200
commite2a2694c1889d7a315c73b9f96cdbf15b49174f7 (patch)
tree93272fce51bbfe2c0af99fd4bdaf97a522053b90
parentec4cc7ad4911487c4d6c8fc0a1c96fe38bad1c1d (diff)
downloadecs2-e2a2694c1889d7a315c73b9f96cdbf15b49174f7.tar.gz
ecs2-e2a2694c1889d7a315c73b9f96cdbf15b49174f7.zip
Changed info logging while participant authentication.
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 2cb218b..62567f7 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -67,11 +67,11 @@ class ApplicationController < ActionController::Base
protected
def authentication
- logger.info "X-EcsAuthId: #{request.headers['X-EcsAuthId']}" unless request.headers['X-EcsAuthId'].blank?
if ECS_CONFIG["participants"]["allow_anonymous"]
# new anonymous participant
if request.headers["X-EcsAuthId"].blank? and request.headers["Cookie"].blank?
@participant, @cookie = Participant.generate_anonymous_participant
+ logger.info "Cookie (new anonymous participant): #{@cookie} -- Participant-ID: #{@participant.id}"
return @participant
end
# anonymous participants
@@ -81,6 +81,7 @@ protected
elsif (participant = identity.participant).blank?
raise Ecs::AuthenticationException, "Cookie: #{@cookie}\" is not assigned any participant"
else
+ logger.info "Cookie: #{@cookie} -- Participant-ID: #{participant.id}"
return @participant = participant
end
end
@@ -93,6 +94,7 @@ protected
elsif (participant = identity.participant).blank?
raise Ecs::AuthenticationException, "\"X-EcsAuthId: #{auth_id}\" is not assigned any participant"
else
+ logger.info "X-EcsAuthId: #{auth_id} -- Participant-ID: #{participant.id}"
return @participant = participant
end
end