Class CGI::Session
In: lib/facebooker/rails/facebook_session_handling.rb
Parent: Object

Methods

External Aliases

initialize -> initialize_aliased_by_facebooker
create_new_id -> create_new_id_aliased_by_facebooker

Attributes

initialization_options  [R] 
request  [R] 

Public Class methods

[Source]

# File lib/facebooker/rails/facebook_session_handling.rb, line 30
      def initialize(request, option={})
        @request = request
        @initialization_options = option
        option['session_id'] ||= set_session_id
        initialize_aliased_by_facebooker(request, option)
      end

Public Instance methods

[Source]

# File lib/facebooker/rails/facebook_session_handling.rb, line 63
      def create_new_id
        @new_session = true
        @session_id || create_new_id_aliased_by_facebooker
      end

[Source]

# File lib/facebooker/rails/facebook_session_handling.rb, line 57
      def facebook_session_key
        'fb_sig_session_key'
      end

[Source]

# File lib/facebooker/rails/facebook_session_handling.rb, line 45
      def request_parameters
        request.instance_variable_get("@request_params")
      end

[Source]

# File lib/facebooker/rails/facebook_session_handling.rb, line 53
      def session_key
        initialization_options['session_key'] || '_session_id'
      end

[Source]

# File lib/facebooker/rails/facebook_session_handling.rb, line 49
      def session_key_should_be_set_with_facebook_session_key?
        request_parameters[session_key].blank? && !request_parameters[facebook_session_key].blank?
      end

[Source]

# File lib/facebooker/rails/facebook_session_handling.rb, line 37
      def set_session_id
        if session_key_should_be_set_with_facebook_session_key? 
          request_parameters[facebook_session_key]
        else 
          request_parameters[session_key]
        end
      end

[Validate]