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 121 def params_credentials controller.params[params_key] end
params_enabled?()
click to toggle source
# File lib/authlogic/session/params.rb, line 92 def params_enabled? if !params_credentials || !klass.column_names.include?("single_access_token") return false end if controller.responds_to_single_access_allowed? return controller.single_access_allowed? end 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 %i[all any].include?(single_access_allowed_request_types) end end
params_key()
click to toggle source
# File lib/authlogic/session/params.rb, line 109 def params_key build_key(self.class.params_key) end
persist_by_params()
click to toggle source
# File lib/authlogic/session/params.rb, line 83 def persist_by_params return false unless 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 113 def single_access? single_access == true end
single_access_allowed_request_types()
click to toggle source
# File lib/authlogic/session/params.rb, line 117 def single_access_allowed_request_types self.class.single_access_allowed_request_types end