module Authlogic::Session::Params::InstanceMethods

The methods available for an Authlogic::Session::Base object that make up the params / single access feature.

Private Instance Methods

params_credentials() click to toggle source
# File lib/authlogic/session/params.rb, line 95
def params_credentials
  controller.params[params_key]
end
params_enabled?() click to toggle source
# File lib/authlogic/session/params.rb, line 71
def params_enabled?
  return false if !params_credentials || !klass.column_names.include?("single_access_token")
  return controller.single_access_allowed? if controller.responds_to_single_access_allowed?
  
  case single_access_allowed_request_types
  when Array
    single_access_allowed_request_types.include?(controller.request_content_type) || single_access_allowed_request_types.include?(:all)
  else
    [:all, :any].include?(single_access_allowed_request_types)
  end
end
params_key() click to toggle source
# File lib/authlogic/session/params.rb, line 83
def params_key
  build_key(self.class.params_key)
end
persist_by_params() click to toggle source
# File lib/authlogic/session/params.rb, line 65
def persist_by_params
  return false if !params_enabled?
  self.unauthorized_record = search_for_record("find_by_single_access_token", params_credentials)
  self.single_access = valid?
end
single_access?() click to toggle source
# File lib/authlogic/session/params.rb, line 87
def single_access?
  single_access == true
end
single_access_allowed_request_types() click to toggle source
# File lib/authlogic/session/params.rb, line 91
def single_access_allowed_request_types
  self.class.single_access_allowed_request_types
end