Skip to content

Commit

Permalink
Removed validation and test
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyC-za committed Mar 24, 2023
1 parent cfa74d6 commit 267e4c5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
15 changes: 0 additions & 15 deletions lib/doorkeeper/config/validations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def validate!
validate_reuse_access_token_value
validate_token_reuse_limit
validate_secret_strategies
validate_custom_access_token_attributes
end

private
Expand Down Expand Up @@ -49,20 +48,6 @@ def validate_token_reuse_limit
)
@token_reuse_limit = 100
end

# Validate that the access_token and access_grant models
# both respond to all of the custom attributes
def validate_custom_access_token_attributes
return if custom_access_token_attributes.blank?

custom_access_token_attributes.each do |attribute_name|
[access_token_model, access_grant_model].each do |model|
next if model.has_attribute?(attribute_name)

raise Doorkeeper::Errors::ConfigError, "#{model} does not recognize custom attribute: #{attribute_name}."
end
end
end
end
end
end
9 changes: 0 additions & 9 deletions spec/lib/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -533,15 +533,6 @@ class ApplicationWithOwner < ActiveRecord::Base
end
expect(config.custom_access_token_attributes).to eq([:tenant_name])
end

it "validates custom attributes to be present in the models" do
expect do
Doorkeeper.configure do
orm DOORKEEPER_ORM
custom_access_token_attributes [:none_existing_column]
end
end.to raise_error(Doorkeeper::Errors::ConfigError)
end
end

describe "application_secret_generator" do
Expand Down

0 comments on commit 267e4c5

Please sign in to comment.