Module: AuthlogicOpenid::Session::Config

Defined in:
lib/authlogic_openid/session.rb

Instance Method Summary collapse

Instance Method Details

#find_by_openid_identifier_method(value = nil) ⇒ Object Also known as: find_by_openid_identifier_method=

What method should we call to find a record by the openid_identifier? This is useful if you want to store multiple openid_identifiers for a single record. You could do something like:

class User < ActiveRecord::Base
  def self.find_by_openid_identifier(identifier)
    user.first(:conditions => {:openid_identifiers => {:identifier => identifier}})
  end
end

Obviously the above depends on what you are calling your assocition, etc. But you get the point.

  • Default: :find_by_openid_identifier

  • Accepts: Symbol



27
28
29
# File 'lib/authlogic_openid/session.rb', line 27

def find_by_openid_identifier_method(value = nil)
  rw_config(:find_by_openid_identifier_method, value, :find_by_openid_identifier)
end