How can I make the password extra when using authlogic authentication and LDAP?

I am creating an application for which I am trying to use LDAP with authlogic for login authentication. I want to accept only the username and register the user if he is on an LDAP server. To do this, I need to disable password verification. How can i do this?

+3
source share
4 answers

I think you can do it like this:

class User < ActiveRecord::Base
  acts_as_authentic do |config|
    config.validate_password_field = false
  end
end
+2
source

In your user model, where you call act_as_authentic, this might do the trick:

acts_as_authentic do |config|
  config.require_password_confirmation = false
  config.ignore_blank_passwords = true
end

These configuration parameters, among other things, can be found in lib / authlogic / actions_as_authentic / password.rb (in version 2.1.3).

+1

authlogic_ldap, . , login_field :ldap_login User. stack level too deep, authlogic v3.0.3 v3.0.2, .

+1

Open ID ( , , ), users Authlogic:

class User < ActiveRecord::Base
  acts_as_authentic do |c|
    c.crypted_password_field = false
  end
end

crypted_password_field .

0

Source: https://habr.com/ru/post/1727006/


All Articles