Read about our upcoming Code of Conduct on this issue

Commit 99853b7a authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'bvl-fix-openid-redirect' into 'master'

Skip `authenticate_user!` for Doorkeeper controllers

Closes #44639

See merge request gitlab-org/gitlab-ce!18599
---
title: Fix redirection error for applications using OpenID
merge_request: 18599
author:
type: fixed
......@@ -104,5 +104,5 @@
# set to true if you want this to be allowed
# wildcard_redirect_uri false
base_controller 'ApplicationController'
base_controller '::Gitlab::BaseDoorkeeperController'
end
# This is a base controller for doorkeeper.
# It adds the `can?` helper used in the views.
module Gitlab
class BaseDoorkeeperController < ActionController::Base
include Gitlab::Allowable
helper_method :can?
end
end
......@@ -153,4 +153,13 @@ def hashed_subject
end
end
end
context 'OpenID configuration information' do
it 'correctly returns the configuration' do
get '/.well-known/openid-configuration'
expect(response).to have_gitlab_http_status(200)
expect(json_response).to have_key('issuer')
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment