module CardController::ApiKey
add support for passing api key through header using X-API-Key
Public Instance Methods
api_key_from_header()
click to toggle source
# File lib/card_controller/api_key.rb, line 8 def api_key_from_header request.headers["X-API-Key"] end
authenticators()
click to toggle source
Calls superclass method
# File lib/card_controller/api_key.rb, line 4 def authenticators super.merge api_key: api_key_from_header || params[:api_key] end