Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/casserver/authenticators/sql_authlogic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ def validate(credentials)
read_standard_credentials(credentials)
raise_if_not_configured

user_model = self.class.user_model

username_column = @options[:username_column] || "login"
password_column = @options[:password_column] || "crypted_password"
salt_column = @options[:salt_column]
Expand Down
5 changes: 2 additions & 3 deletions lib/casserver/authenticators/sql_encrypted.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ def generate_encryption_salt

def self.setup(options)
super(options)
user_models.each { |auth_index, model| model.__send__(:include, EncryptedPassword) }
user_model = user_models[options[:auth_index]]
user_model.__send__(:include, EncryptedPassword)
end

def validate(credentials)
read_standard_credentials(credentials)
raise_if_not_configured

user_model = self.user_model

username_column = @options[:username_column] || "username"
encrypt_function = @options[:encrypt_function] || 'user.encrypted_password == Digest::SHA256.hexdigest("#{user.encryption_salt}::#{@password}")'

Expand Down
3 changes: 1 addition & 2 deletions lib/casserver/authenticators/sql_rest_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def validate(credentials)
raise CASServer::AuthenticatorError, "You must specify a 'site_key' in the SQLRestAuth authenticator's configuration!" unless @options[:site_key]
raise CASServer::AuthenticatorError, "You must specify 'digest_streches' in the SQLRestAuth authenticator's configuration!" unless @options[:digest_streches]

user_model = self.class.user_model

username_column = @options[:username_column] || "email"

log_connection_pool_size
Expand All @@ -54,6 +52,7 @@ def validate(credentials)

def self.setup(options)
super(options)
user_model = user_models[options[:auth_index]]
user_model.__send__(:include, EncryptedPassword)
end

Expand Down