Module: AuthlogicRpx::ActsAsAuthentic::Config
- Defined in:
- lib/authlogic_rpx/acts_as_authentic.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#account_mapping_mode(value = :auto) ⇒ Object
(also: #account_mapping_mode=)
account_mapping_mode is used to explicitly set/override the mapping behaviour.
- #account_mapping_mode_value(value = nil) ⇒ Object
-
#account_merge_enabled(value = false) ⇒ Object
(also: #account_merge_enabled=)
account_merge_enabled is used to enable merging of accounts.
- #account_merge_enabled_value(value = nil) ⇒ Object
-
#using_internal_mapping? ⇒ Boolean
determines if internal account mapping is enabled (behaviour added in authlogic_rpx v1.1.0).
-
#using_no_mapping? ⇒ Boolean
determines if no account mapping is supported (the only behaviour in authlogic_rpx v1.0.4).
-
#using_rpx_mapping? ⇒ Boolean
determines if rpxnow account mapping is enabled (currently not implemented).
Instance Attribute Details
#account_mapping_mode_used ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 52 def account_mapping_mode_used @account_mapping_mode_used ||= if account_mapping_mode_value != :auto account_mapping_mode_value elsif RPXIdentifier.table_exists? :internal elsif self.column_names.include?("rpx_identifier") :none else AuthlogicRpx::ActsAsAuthentic::ConfigurationError.new end end |
Instance Method Details
#account_mapping_mode(value = :auto) ⇒ Object Also known as: account_mapping_mode=
account_mapping_mode is used to explicitly set/override the mapping behaviour.
-
Default:
:auto -
Accepts:
:auto, :none, :internal, :rpxnow
40 41 42 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 40 def account_mapping_mode(value=:auto) account_mapping_mode_value(value) end |
#account_mapping_mode_value(value = nil) ⇒ Object
43 44 45 46 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 43 def account_mapping_mode_value(value=nil) raise AuthlogicRpx::ActsAsAuthentic::ConfigurationError.new unless value.nil? || [:auto,:none,:internal].include?( value ) rw_config(:account_mapping_mode,value,:auto) end |
#account_merge_enabled(value = false) ⇒ Object Also known as: account_merge_enabled=
account_merge_enabled is used to enable merging of accounts.
-
Default:
false -
Accepts:
boolean
27 28 29 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 27 def account_merge_enabled(value=false) account_merge_enabled_value(value) end |
#account_merge_enabled_value(value = nil) ⇒ Object
30 31 32 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 30 def account_merge_enabled_value(value=nil) rw_config(:account_merge_enabled,value,false) end |
#using_internal_mapping? ⇒ Boolean
determines if internal account mapping is enabled (behaviour added in authlogic_rpx v1.1.0)
71 72 73 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 71 def using_internal_mapping? account_mapping_mode_used == :internal end |
#using_no_mapping? ⇒ Boolean
determines if no account mapping is supported (the only behaviour in authlogic_rpx v1.0.4)
67 68 69 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 67 def using_no_mapping? account_mapping_mode_used == :none end |
#using_rpx_mapping? ⇒ Boolean
determines if rpxnow account mapping is enabled (currently not implemented)
75 76 77 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 75 def using_rpx_mapping? account_mapping_mode_used == :rpxnow end |