Commit e71351d4 authored by Douwe Maan's avatar Douwe Maan

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

Skip `authenticate_user!` for Doorkeeper controllers

Closes #44639

See merge request gitlab-org/gitlab-ce!18599
parents 5af7fd59 0f593b1c
---
title: Fix redirection error for applications using OpenID
merge_request: 18599
author:
type: fixed
......@@ -104,5 +104,5 @@ Doorkeeper.configure do
# 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 @@ describe 'OpenID Connect requests' do
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