From c4691ea5ab8211590f07a50d87250d54519af4fc Mon Sep 17 00:00:00 2001 From: JeremyC-za Date: Fri, 15 Mar 2024 17:56:54 +0200 Subject: [PATCH] No longer copying custom attributes from matching token --- .../doorkeeper/authorizations_controller.rb | 1 - lib/doorkeeper/oauth/pre_authorization.rb | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/controllers/doorkeeper/authorizations_controller.rb b/app/controllers/doorkeeper/authorizations_controller.rb index 116b584aa..ebac2b03e 100644 --- a/app/controllers/doorkeeper/authorizations_controller.rb +++ b/app/controllers/doorkeeper/authorizations_controller.rb @@ -36,7 +36,6 @@ def render_success elsif Doorkeeper.configuration.api_only render json: pre_auth else - pre_auth.load_custom_attributes_from_token(matching_token?) if matching_token? render :new end end diff --git a/lib/doorkeeper/oauth/pre_authorization.rb b/lib/doorkeeper/oauth/pre_authorization.rb index 0b11ec18f..39b24a615 100644 --- a/lib/doorkeeper/oauth/pre_authorization.rb +++ b/lib/doorkeeper/oauth/pre_authorization.rb @@ -18,9 +18,7 @@ class PreAuthorization attr_reader :client, :code_challenge, :code_challenge_method, :missing_param, :redirect_uri, :resource_owner, :response_type, :state, - :authorization_response_flow, :response_mode - - attr_accessor :custom_access_token_attributes + :authorization_response_flow, :response_mode, :custom_access_token_attributes def initialize(server, parameters = {}, resource_owner = nil) @server = server @@ -67,12 +65,6 @@ def form_post_response? response_mode == "form_post" end - def load_custom_attributes_from_token(matching_token) - return if Doorkeeper.config.custom_access_token_attributes.empty? - return if matching_token.blank? - @custom_access_token_attributes = matching_token.custom_attributes - end - private attr_reader :client_id, :server