Class: RailsIdentity::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
ApplicationHelper
Defined in:
app/controllers/rails_identity/application_controller.rb

Overview

The root application controller class in rails-identity.

Direct Known Subclasses

SessionsController, UsersController

Instance Method Summary collapse

Methods included from ApplicationHelper

#accept_token, #authorized?, #find_object, #get_user, #render_error, #render_errors, #require_admin_token, #require_token

Instance Method Details

#optionsObject

Renders a generic OPTIONS response. The actual controller must override this action if desired to have specific OPTIONS handling logic.



44
45
46
47
48
49
50
51
# File 'app/controllers/rails_identity/application_controller.rb', line 44

def options()
  # echo back access-control-request-headers
  if request.headers["Access-Control-Request-Headers"]
    response["Access-Control-Allow-Headers"] =
        request.headers["Access-Control-Request-Headers"]
  end
  render body: "", status: 200
end