Module: AuthlogicConnect::Openid::Process

Includes:
Variables
Included in:
Session::InstanceMethods
Defined in:
lib/authlogic_connect/openid/process.rb

Instance Method Summary collapse

Methods included from Variables

#openid_identifier, #openid_provider

Methods included from State

#allow_openid_redirect?, #authenticating_with_openid?, #openid_identifier?, #openid_provider?, #openid_request?, #openid_response?, #redirecting_to_openid_server?, #using_openid?, #validate_password_with_openid?

Instance Method Details

#cleanup_openid_sessionObject

want to do this after the final save



6
7
8
9
10
11
# File 'lib/authlogic_connect/openid/process.rb', line 6

def cleanup_openid_session
  [:auth_attributes, :authentication_type, :auth_callback_method].each {|key| auth_session.delete(key)}
  auth_session.each_key do |key|
    auth_session.delete(key) if key.to_s =~ /^OpenID/
  end
end

#restore_attributesObject



25
26
27
28
# File 'lib/authlogic_connect/openid/process.rb', line 25

def restore_attributes
  # Restore any attributes which were saved before redirecting to the auth server
  self.attributes = auth_session[:auth_attributes]
end

#save_openid_sessionObject



17
18
19
20
21
22
23
# File 'lib/authlogic_connect/openid/process.rb', line 17

def save_openid_session
  # Tell our rack callback filter what method the current request is using
  auth_session[:auth_callback_method]   = auth_controller.request.method
  auth_session[:auth_attributes]        = attributes_to_save
  auth_session[:authentication_type]    = auth_params[:authentication_type]
  auth_session[:auth_method]            = "openid"
end

#validate_by_openidObject



13
14
15
# File 'lib/authlogic_connect/openid/process.rb', line 13

def validate_by_openid
  errors.add(:tokens, "had the following error: #{@openid_error}") if @openid_error
end