module JkoApi::ControllerHelpers

Public Instance Methods

authenticate(*args) click to toggle source
# File lib/jko_api/controller_helpers.rb, line 16
def authenticate(*args)
  options, model_classes = args.extract_options!, args
  options.reverse_merge! optional: false
  # This is for use with Devise.
  # TODO: make this configurable
  # options[:fallback_to_devise] = !options.delete(:optional)
  # model_classes.each do |model_class|
  #   acts_as_token_authentication_handler_for model_class, options
  # end
  self.authenticated = true
end
skip_authentication() click to toggle source
# File lib/jko_api/controller_helpers.rb, line 28
def skip_authentication
  self.authenticated = true
end