summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-02-20 18:38:46 +0000
committerDouwe Maan <douwe@gitlab.com>2017-02-20 18:38:46 +0000
commitc63016a379f34807212f8bdf559bf842cf913231 (patch)
tree452136bba68c2c59d26cae2e5a868fcc1471dc72 /config
parent6d6592d5c3e8c946c4c7f90d4df48800d71398b6 (diff)
parentbeb887748e8aa3bc42376656f28b689aad91dab7 (diff)
downloadgitlab-ce-c63016a379f34807212f8bdf559bf842cf913231.tar.gz
Merge branch 'authentiq-backchannel-logout' into 'master'
Remote logout functionality on Authentiq OAuth provider See merge request !9381
Diffstat (limited to 'config')
-rw-r--r--config/initializers/devise.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index a8afc36fc78..738dbeefc11 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -240,6 +240,17 @@ Devise.setup do |config|
true
end
end
+ if provider['name'] == 'authentiq'
+ provider['args'][:remote_sign_out_handler] = lambda do |request|
+ authentiq_session = request.params['sid']
+ if Gitlab::OAuth::Session.valid?(:authentiq, authentiq_session)
+ Gitlab::OAuth::Session.destroy(:authentiq, authentiq_session)
+ true
+ else
+ false
+ end
+ end
+ end
if provider['name'] == 'shibboleth'
provider['args'][:fail_with_empty_uid] = true