Module: AuthlogicRpx::Session::Methods

Defined in:
lib/authlogic_rpx/session.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



61
62
63
64
65
66
67
68
# File 'lib/authlogic_rpx/session.rb', line 61

def self.included(klass)
	klass.class_eval do
		attr_accessor :new_registration
		attr_accessor :rpx_identifier
		after_persisting :add_rpx_identifier, :if => :adding_rpx_identifier?
		validate :validate_by_rpx, :if => :authenticating_with_rpx?
	end
end

Instance Method Details

#new_registration?Boolean

Determines if the authenticated user is also a new registration. For use in the session controller to help direct the most appropriate action to follow.

Returns:

  • (Boolean)


73
74
75
# File 'lib/authlogic_rpx/session.rb', line 73

def new_registration?
	new_registration
end

#registration_complete?Boolean

Determines if the authenticated user has a complete registration (no validation errors) For use in the session controller to help direct the most appropriate action to follow.

Returns:

  • (Boolean)


80
81
82
# File 'lib/authlogic_rpx/session.rb', line 80

def registration_complete?
	attempted_record && attempted_record.valid?
end