Skip to content

Commit

Permalink
No longer copying custom attributes from matching token
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyC-za committed Mar 15, 2024
1 parent d04cdba commit c4691ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion app/controllers/doorkeeper/authorizations_controller.rb
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions lib/doorkeeper/oauth/pre_authorization.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c4691ea

Please sign in to comment.