Sha256: e83fc75d7fb750364cefcc2fb00b0d4d5c279dd326e8c478b1b3486e6fd4cef9

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

module AuthlogicConnect::Openid::Process

  include AuthlogicConnect::Openid::Variables
  
  # want to do this after the final save
  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
  
  def validate_by_openid
    errors.add(:tokens, "had the following error: #{@openid_error}") if @openid_error
  end
  
  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
  
  def restore_attributes
    # Restore any attributes which were saved before redirecting to the auth server
    self.attributes = auth_session[:auth_attributes]
  end
  
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
lsdr-authlogic-connect-0.0.3.9 lib/authlogic_connect/openid/process.rb
authlogic-connect-0.0.3.9 lib/authlogic_connect/openid/process.rb
authlogic-connect-0.0.3.8 lib/authlogic_connect/openid/process.rb
authlogic-connect-0.0.3.6 lib/authlogic_connect/openid/process.rb