From 1a0654419d41611ed1c07cb08177866bdb22f317 Mon Sep 17 00:00:00 2001 From: Junichi Sato <22004610+sato11@users.noreply.github.com> Date: Wed, 6 Jul 2022 13:01:55 +0900 Subject: [PATCH] Controllers inherit `Doorkeeper::AppliactionMetalController` This closes #169. --- .../doorkeeper/openid_connect/discovery_controller.rb | 2 +- .../doorkeeper/openid_connect/userinfo_controller.rb | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/doorkeeper/openid_connect/discovery_controller.rb b/app/controllers/doorkeeper/openid_connect/discovery_controller.rb index e6a9a14..21f242c 100644 --- a/app/controllers/doorkeeper/openid_connect/discovery_controller.rb +++ b/app/controllers/doorkeeper/openid_connect/discovery_controller.rb @@ -2,7 +2,7 @@ module Doorkeeper module OpenidConnect - class DiscoveryController < ::Doorkeeper::ApplicationController + class DiscoveryController < ::Doorkeeper::ApplicationMetalController include Doorkeeper::Helpers::Controller WEBFINGER_RELATION = 'http://openid.net/specs/connect/1.0/issuer' diff --git a/app/controllers/doorkeeper/openid_connect/userinfo_controller.rb b/app/controllers/doorkeeper/openid_connect/userinfo_controller.rb index 9f99024..c6ace1a 100644 --- a/app/controllers/doorkeeper/openid_connect/userinfo_controller.rb +++ b/app/controllers/doorkeeper/openid_connect/userinfo_controller.rb @@ -2,10 +2,7 @@ module Doorkeeper module OpenidConnect - class UserinfoController < ::Doorkeeper::ApplicationController - unless Doorkeeper.configuration.api_only - skip_before_action :verify_authenticity_token - end + class UserinfoController < ::Doorkeeper::ApplicationMetalController before_action -> { doorkeeper_authorize! :openid } def show