debian-mirror-gitlab/lib/gitlab/auth/otp/strategies/base.rb
2021-01-30 21:13:32 +05:30

32 lines
572 B
Ruby

# frozen_string_literal: true
module Gitlab
module Auth
module Otp
module Strategies
class Base
def initialize(user)
@user = user
end
private
attr_reader :user
def success
{ status: :success }
end
def error(message, http_status = nil)
result = { message: message,
status: :error }
result[:http_status] = http_status if http_status
result
end
end
end
end
end
end