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
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 51 def account_mapping_mode_used @account_mapping_mode_used ||= ( account_mapping_mode_value == :auto ? ( RPXIdentifier.table_exists? ? :internal : ( self.column_names.include?("rpx_identifier") ? :none : AuthlogicRpx::ActsAsAuthentic::ConfigurationError.new ) ) : account_mapping_mode_value ) 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
39 40 41 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 39 def account_mapping_mode(value=:auto) account_mapping_mode_value(value) end |
#account_mapping_mode_value(value = nil) ⇒ Object
42 43 44 45 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 42 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)
68 69 70 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 68 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)
64 65 66 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 64 def using_no_mapping? account_mapping_mode_used == :none end |
#using_rpx_mapping? ⇒ Boolean
determines if rpxnow account mapping is enabled (currently not implemented)
72 73 74 |
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 72 def using_rpx_mapping? account_mapping_mode_used == :rpxnow end |