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

devise.rb « strategies « otp « auth « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 93068d6c9b0861c53f72ef4c6b88cd1b79a7364f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Gitlab
  module Auth
    module Otp
      module Strategies
        class Devise < Base
          def validate(otp_code)
            user.validate_and_consume_otp!(otp_code) ? success : error('invalid OTP code')
          end
        end
      end
    end
  end
end