Module: AuthlogicOpenid::ActsAsAuthentic

Defined in:
lib/authlogic_openid/acts_as_authentic.rb

Overview

This module is responsible for adding in the OpenID functionality to your models. It hooks itself into the acts_as_authentic method provided by Authlogic.

Defined Under Namespace

Modules: Methods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

Adds in the neccesary modules for acts_as_authentic to include and also disabled password validation if OpenID is being used.



9
10
11
12
13
14
15
16
# File 'lib/authlogic_openid/acts_as_authentic.rb', line 9

def self.included(klass)
  klass.class_eval do
    add_acts_as_authentic_module(Methods)
    validates_length_of_password_field_options validates_length_of_password_field_options.merge(:if => :validate_password_with_openid?)
    validates_confirmation_of_password_field_options validates_confirmation_of_password_field_options.merge(:if => :validate_password_with_openid?)
    validates_length_of_password_confirmation_field_options validates_length_of_password_confirmation_field_options.merge(:if => :validate_password_with_openid?)
  end
end