Class: Gitlab::Auth::Otp::Strategies::Devise

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/auth/otp/strategies/devise.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Auth::Otp::Strategies::Base

Instance Method Details

#validate(otp_code) ⇒ Object


8
9
10
# File 'lib/gitlab/auth/otp/strategies/devise.rb', line 8

def validate(otp_code)
  user.validate_and_consume_otp!(otp_code) ? success : error('invalid OTP code')
end