Removes validation for non-service authentication

This commit is contained in:
Dean Putney 2014-09-29 00:41:10 -07:00
parent 6073fb2a92
commit 05563022c7

View file

@ -4,19 +4,9 @@ module TumblrConcern
included do
include Oauthable
validate :validate_tumblr_options
valid_oauth_providers :tumblr
end
def validate_tumblr_options
unless tumblr_consumer_key.present? &&
tumblr_consumer_secret.present? &&
tumblr_oauth_token.present? &&
tumblr_oauth_token_secret.present?
errors.add(:base, "Tumblr consumer_key, consumer_secret, oauth_token, and oauth_token_secret are required to authenticate with the Tumblr API. You can provide these as options to this Agent, or as Credentials with the same names, but starting with 'tumblr_'.")
end
end
def tumblr_consumer_key
ENV['TUMBLR_OAUTH_KEY']
end