Configure base_controller of Doorkeeper
This commit is contained in:
parent
c32bcc8dcb
commit
c59715381e
1 changed files with 2 additions and 7 deletions
|
@ -2,6 +2,8 @@ Doorkeeper.configure do
|
||||||
# Change the ORM that doorkeeper will use (needs plugins)
|
# Change the ORM that doorkeeper will use (needs plugins)
|
||||||
orm :active_record
|
orm :active_record
|
||||||
|
|
||||||
|
base_controller 'ApplicationController'
|
||||||
|
|
||||||
# This block will be called to check whether the resource owner is authenticated or not.
|
# This block will be called to check whether the resource owner is authenticated or not.
|
||||||
resource_owner_authenticator do
|
resource_owner_authenticator do
|
||||||
authenticate
|
authenticate
|
||||||
|
@ -111,10 +113,3 @@ Doorkeeper.configure do
|
||||||
# WWW-Authenticate Realm (default "Doorkeeper").
|
# WWW-Authenticate Realm (default "Doorkeeper").
|
||||||
realm 'Foodsoft'
|
realm 'Foodsoft'
|
||||||
end
|
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
|
|
||||||
|
|
Loading…
Reference in a new issue