Skip to content

Commit 267e4c5

Browse files
committed
Removed validation and test
1 parent cfa74d6 commit 267e4c5

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

lib/doorkeeper/config/validations.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ def validate!
1111
validate_reuse_access_token_value
1212
validate_token_reuse_limit
1313
validate_secret_strategies
14-
validate_custom_access_token_attributes
1514
end
1615

1716
private
@@ -49,20 +48,6 @@ def validate_token_reuse_limit
4948
)
5049
@token_reuse_limit = 100
5150
end
52-
53-
# Validate that the access_token and access_grant models
54-
# both respond to all of the custom attributes
55-
def validate_custom_access_token_attributes
56-
return if custom_access_token_attributes.blank?
57-
58-
custom_access_token_attributes.each do |attribute_name|
59-
[access_token_model, access_grant_model].each do |model|
60-
next if model.has_attribute?(attribute_name)
61-
62-
raise Doorkeeper::Errors::ConfigError, "#{model} does not recognize custom attribute: #{attribute_name}."
63-
end
64-
end
65-
end
6651
end
6752
end
6853
end

spec/lib/config_spec.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -533,15 +533,6 @@ class ApplicationWithOwner < ActiveRecord::Base
533533
end
534534
expect(config.custom_access_token_attributes).to eq([:tenant_name])
535535
end
536-
537-
it "validates custom attributes to be present in the models" do
538-
expect do
539-
Doorkeeper.configure do
540-
orm DOORKEEPER_ORM
541-
custom_access_token_attributes [:none_existing_column]
542-
end
543-
end.to raise_error(Doorkeeper::Errors::ConfigError)
544-
end
545536
end
546537

547538
describe "application_secret_generator" do

0 commit comments

Comments
 (0)