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



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 ||=
    if  != :auto
      
    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 (value=:auto)
  (value)
end

#account_mapping_mode_value(value = nil) ⇒ Object



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

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)


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

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)


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

def using_no_mapping?
   == :none
end

#using_rpx_mapping?Boolean

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

Returns:

  • (Boolean)


75
76
77
# File 'lib/authlogic_rpx/acts_as_authentic.rb', line 75

def using_rpx_mapping?
   == :rpxnow
end