Configure base_controller of Doorkeeper

This commit is contained in:
Patrick Gansterer 2022-02-20 03:30:27 +01:00
parent c32bcc8dcb
commit c59715381e

View file

@ -2,6 +2,8 @@ Doorkeeper.configure do
# Change the ORM that doorkeeper will use (needs plugins)
orm :active_record
base_controller 'ApplicationController'
# This block will be called to check whether the resource owner is authenticated or not.
resource_owner_authenticator do
authenticate
@ -111,10 +113,3 @@ Doorkeeper.configure do
# WWW-Authenticate Realm (default "Doorkeeper").
realm 'Foodsoft'
end
# my take on https://github.com/doorkeeper-gem/doorkeeper/issues/465
ActiveSupport.on_load(:after_initialize) do
Doorkeeper::ApplicationController.send :include, Concerns::Locale
Doorkeeper::ApplicationController.send :include, Concerns::FoodcoopScope
Doorkeeper::ApplicationController.send :include, Concerns::Auth
end