2019-09-16 08:06:26 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
class DeviseFailure < Devise::FailureApp
|
2019-10-24 20:06:14 -04:00
|
|
|
include ::SessionsHelper
|
|
|
|
|
2019-09-16 08:06:26 -04:00
|
|
|
# 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
|
2019-10-24 20:06:14 -04:00
|
|
|
|
|
|
|
def respond
|
|
|
|
limit_session_time
|
|
|
|
|
|
|
|
super
|
|
|
|
end
|
2019-09-16 08:06:26 -04:00
|
|
|
end
|
|
|
|
end
|