Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-27 13:56:34 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-27 13:56:34 +0300
commit00e4d918a3cf14a96d25822b6d65c7b6d8f00b63 (patch)
tree9aed0c16c8bd612dcfd1852cde5c2ac5c3a7f882 /lib/gitlab/auth
parentc44541a506347225539afeb2e124f3210c8b2065 (diff)
Add authentication metrics for sessionless sign in
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r--lib/gitlab/auth/activity.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/auth/activity.rb b/lib/gitlab/auth/activity.rb
index d5d1428ba58..2004d1f393e 100644
--- a/lib/gitlab/auth/activity.rb
+++ b/lib/gitlab/auth/activity.rb
@@ -14,6 +14,7 @@ module Gitlab
user_session_override: 'Counter of manual log-ins and sessions overrides',
user_session_destroyed: 'Counter of total user sessions being destroyed',
user_two_factor_authenticated: 'Counter of two factor authentications',
+ user_sessionless_authentication: 'Counter of sessionless authentications',
user_blocked: 'Counter of total sign in attempts when user is blocked'
}.freeze
@@ -42,8 +43,11 @@ module Gitlab
def user_session_override!
self.class.user_session_override_counter_increment!
- if @opts[:message] == :two_factor_authenticated
+ 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
end