Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge level security for API keys #272

Closed
scarroll32 opened this issue Aug 10, 2017 · 1 comment
Closed

Challenge level security for API keys #272

scarroll32 opened this issue Aug 10, 2017 · 1 comment
Assignees
Labels

Comments

@scarroll32
Copy link
Contributor

At present the challenge API key is verified, but it is not tied to a specific challenge.

  def auth_by_api_key
    authenticate_or_request_with_http_token do |token, options|
      challenge = Challenge.where(api_key: token).first
      (token == ENV['CROWDAI_API_KEY'] || challenge.present?)
    end
  end
@scarroll32
Copy link
Contributor Author

Closed by #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant