Class: CanvasShim::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- CanvasShim::ApplicationController
- Defined in:
- app/controllers/canvas_shim/application_controller.rb
Direct Known Subclasses
SettingsApi::SwaggerController, SettingsApi::V1::UsersController
Instance Method Summary collapse
Instance Method Details
#validate_key ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/canvas_shim/application_controller.rb', line 5 def validate_key token = SettingsService::AuthToken.authenticate( request.headers['HTTP_AUTHORIZATION'].try(:gsub, 'Bearer ', '') ) render(json: {status: 'error'}, status: 401) and return unless token end |