Module: Api::Intercept

Extended by:
ActiveSupport::Concern
Includes:
ActionController::HttpAuthentication::Token::ControllerMethods, TokenAuthentication
Included in:
ApplicationController
Defined in:
app/controllers/concerns/api/intercept.rb

Instance Method Summary (collapse)

Instance Method Details

- (True, render) intercept_api

Returns If authentication is requried, as defined in the routes, then it must pass here.

Returns:

  • (True, render)

    If authentication is requried, as defined in the routes, then it must pass here.



25
26
27
28
29
30
31
32
33
# File 'app/controllers/concerns/api/intercept.rb', line 25

def intercept_api
  @api_request = true

  res = intercept_user if params[:authenticate_user]
  res = intercept_project if res && params[:authenticate_project]
  res = set_project_from_params if res && params[:project_id]

  res
end