diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2019-07-26 07:05:50 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-07-26 07:05:50 +0000 |
commit | 929b403d21308cb7843aa474bfba599345b706b4 (patch) | |
tree | 14238ab87d98381ccc7f140789c4829c926d32bf /lib/gitlab/auth | |
parent | 13958668854bc98676d6414c0debaeb4b91a9943 (diff) | |
download | gitlab-ce-929b403d21308cb7843aa474bfba599345b706b4.tar.gz |
Ensure Warden triggers after_authentication callback
By not triggering the callback:
- ActiveSession lookup keys are not cleaned
- Devise also misses its hook related to session cleanup
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r-- | lib/gitlab/auth/activity.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/auth/activity.rb b/lib/gitlab/auth/activity.rb index 558628b5422..988ff196193 100644 --- a/lib/gitlab/auth/activity.rb +++ b/lib/gitlab/auth/activity.rb @@ -37,14 +37,17 @@ module Gitlab def user_authenticated! self.class.user_authenticated_counter_increment! + + case @opts[:message] + when :two_factor_authenticated + self.class.user_two_factor_authenticated_counter_increment! + end end def user_session_override! self.class.user_session_override_counter_increment! case @opts[:message] - when :two_factor_authenticated - self.class.user_two_factor_authenticated_counter_increment! when :sessionless_sign_in self.class.user_sessionless_authentication_counter_increment! end |