summaryrefslogtreecommitdiff
path: root/lib/gitlab/devise_failure.rb
blob: eb475307f27790964622284cea23c75fa05df172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Gitlab
  class DeviseFailure < Devise::FailureApp
    include ::SessionsHelper

    # If the request format is not known, send a redirect instead of a 401
    # response, since this is the outcome we're most likely to want
    def http_auth?
      request_format && super
    end

    def respond
      limit_session_time

      super
    end
  end
end