File tree Expand file tree Collapse file tree
generators/doorkeeper/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,17 +55,11 @@ def validate_token_reuse_limit
5555 def validate_custom_access_token_attributes
5656 return if custom_access_token_attributes . blank?
5757
58- # Need lib/doorkeeper#configure to set up the orm and initialize
59- # the access token and grant models before we can access them.
60- Doorkeeper . configuration
61-
6258 custom_access_token_attributes . each do |attribute_name |
6359 [ access_token_model , access_grant_model ] . each do |model |
6460 next if model . has_attribute? ( attribute_name )
6561
66- raise Doorkeeper ::Errors ::ConfigError ,
67- "#{ model } does not recognize custom attribute: #{ attribute_name } . Please disable the " \
68- "'custom_access_token_attributes' configuration option and make the necessary model changes."
62+ raise Doorkeeper ::Errors ::ConfigError , "#{ model } does not recognize custom attribute: #{ attribute_name } ."
6963 end
7064 end
7165 end
Original file line number Diff line number Diff line change 396396 # The 'authorizations/new' page will need to be overridden to include this additional data
397397 # in the request params when granting access. The access grant and access token models
398398 # will both need to respond to these additional data fields, and have a database column
399- # to store them in. This configuration option should not be enabled until the access
400- # grant and access token models repond to the specified attributes.
399+ # to store them in.
401400 #
402401 # Example:
403402 # You have a multi-tenanted platform and want to be able to grant access to a specific
Original file line number Diff line number Diff line change @@ -579,15 +579,4 @@ def authorize(redirect_url)
579579 expect ( access_token . tenant_name ) . to eq ( "Tenant 1" )
580580 end
581581 end
582-
583- context "when custom_access_token_attributes aren't recognized by models" do
584- it "raises a config error" do
585- expect do
586- Doorkeeper . configure do
587- orm DOORKEEPER_ORM
588- custom_access_token_attributes [ :unrecognized_attribute ]
589- end
590- end . to raise_error ( Doorkeeper ::Errors ::ConfigError )
591- end
592- end
593582end
You can’t perform that action at this time.
0 commit comments