Module: AuthlogicRpx::ActsAsAuthentic::Config

Defined in:
lib/authlogic_rpx/acts_as_authentic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#account_mapping_mode_usedObject



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 ||= (
     == :auto ?
    ( RPXIdentifier.table_exists? ? 
      :internal : 
      ( self.column_names.include?("rpx_identifier") ? :none : AuthlogicRpx::ActsAsAuthentic::ConfigurationError.new ) 
    ) :
    
  )
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 (value=:auto)
	(value)
end

#account_mapping_mode_value(value = nil) ⇒ Object



42
43
44
45
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 42

def (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 (value=false)
	(value)
end

#account_merge_enabled_value(value = nil) ⇒ Object



30
31
32
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 30

def (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)

Returns:

  • (Boolean)


68
69
70
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 68

def using_internal_mapping?
	 == :internal
end

#using_no_mapping?Boolean

determines if no account mapping is supported (the only behaviour in authlogic_rpx v1.0.4)

Returns:

  • (Boolean)


64
65
66
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 64

def using_no_mapping?
	 == :none
end

#using_rpx_mapping?Boolean

determines if rpxnow account mapping is enabled (currently not implemented)

Returns:

  • (Boolean)


72
73
74
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 72

def using_rpx_mapping?
	 == :rpxnow
end