Skip to content

Commit

Permalink
added feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed Mar 27, 2020
1 parent c51112b commit cfc9d3e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def authenticate_user_with_basic_auth!
def authenticate_user!
type, credentials = type_and_credentials_from_request_headers
return false if credentials.blank?
raise JWT::VerificationError if (ENV['JWT_BLACKLISTED'] == credentials)
raise JWT::VerificationError if ENV["JWT_BLACKLISTED"].split(",").include?(credentials)

@current_user = User.new(credentials, type: type)
fail CanCan::AuthorizationNotPerformed if @current_user.errors.present?
Expand Down
2 changes: 0 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
ENV['MG_DOMAIN'] ||= "mg.datacite.org"
ENV['HANDLES_MINTED'] ||= "10132"
ENV['REALM'] ||= ENV['API_URL']
ENV['JWT_BLACKLISTED'] ||= ENV['JWT_BLACKLISTED']


module Lupo
class Application < Rails::Application
Expand Down

0 comments on commit cfc9d3e

Please sign in to comment.