Module: AuthlogicRpx::Session::Config

Defined in:
lib/authlogic_rpx/session.rb

Instance Method Summary collapse

Instance Method Details

#auto_register(value = true) ⇒ Object Also known as: auto_register=

Auto Register is enabled by default. Add this in your Session object if you need to disable auto-registration via rpx



22
23
24
# File 'lib/authlogic_rpx/session.rb', line 22

def auto_register(value=true)
  auto_register_value(value)
end

#auto_register_value(value = nil) ⇒ Object



25
26
27
# File 'lib/authlogic_rpx/session.rb', line 25

def auto_register_value(value=nil)
  rw_config(:auto_register,value,true)
end

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



14
15
16
# File 'lib/authlogic_rpx/session.rb', line 14

def find_by_rpx_identifier_method(value = nil)
  rw_config(:find_by_rpx_identifier_method, value, :find_by_rpx_identifier)
end

#rpx_extended_info(value = true) ⇒ Object Also known as: rpx_extended_info=

Add this in your Session object to set whether RPX returns extended user info By default, it will not, which is enough to get username, name, email and the rpx identified if you want to map additional information into your user details, you can request extended attributes (though not all providers give them - see the RPX docs)



49
50
51
# File 'lib/authlogic_rpx/session.rb', line 49

def rpx_extended_info(value=true)
  rpx_extended_info_value(value)
end

#rpx_extended_info_value(value = nil) ⇒ Object



52
53
54
# File 'lib/authlogic_rpx/session.rb', line 52

def rpx_extended_info_value(value=nil)
  rw_config(:rpx_extended_info,value,false)
end

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

Add this in your Session object to set the RPX API key RPX won’t work without the API key. Set it here if not already set in your app configuration.



33
34
35
# File 'lib/authlogic_rpx/session.rb', line 33

def rpx_key(value=nil)
  rpx_key_value(value)
end

#rpx_key_value(value = nil) ⇒ Object



36
37
38
39
40
41
# File 'lib/authlogic_rpx/session.rb', line 36

def rpx_key_value(value=nil)
  if !inheritable_attributes.include?(:rpx_key) 
    RPXNow.api_key = value 
  end
  rw_config(:rpx_key,value,false)
end