设计ldap身份验证只会给出无效的用户名或密码错误

时间:2013-02-05 16:45:52

标签: ruby-on-rails-3 devise ldap

我已经按照设计ldap github网站上的教程进行了操作。当我尝试登录时,我会在日志中得到这个:

Started POST "/users/sign_in" for 127.0.0.1 at Tue Feb 05 11:37:04 -0500 2013
  Processing by Devise::SessionsController#create as HTML
  Parameters: {"authenticity_token"=>"Cl2fTO6guIUMNVCV2+TXSZRNR56RFqiAurbicwyfito=",    "commit"=>"Sign in", "user"=>{"remember_me"=>"0", "password"=>"[FILTERED]", "login"=>"jchoi"}, "utf8"=>"���"}
  SQL (7.9ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,    a.attnotnull
  FROM pg_attribute a LEFT JOIN pg_attrdef d
  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
  WHERE a.attrelid = '"users"'::regclass
  AND a.attnum > 0 AND NOT a.attisdropped
  ORDER BY a.attnum

   User Load (1.1ms)  SELECT "users".* FROM "users" WHERE "users"."login" = 'jchoi' LIMIT 1
   SQL (3.4ms)   SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
   FROM pg_attribute a LEFT JOIN pg_attrdef d
   ON a.attrelid = d.adrelid AND a.attnum = d.adnum
   WHERE a.attrelid = '"users"'::regclass
   AND a.attnum > 0 AND NOT a.attisdropped
   ORDER BY a.attnum

    LDAP: LDAP dn lookup: =jchoi
    LDAP: LDAP search for login: =jchoi
    LDAP: Authorizing user =jchoi,ou=Root,dc=complay,dc=com
    LDAP: LDAP dn lookup: =jchoi
    LDAP: LDAP search for login: =jchoi
    Completed   in 53ms
     Processing by Devise::SessionsController#new as HTML
     Parameters: {"authenticity_token"=>"Cl2fTO6guIUMNVCV2+TXSZRNR56RFqiAurbicwyfito=", "commit"=>"Sign in", "user"=>{"remember_me"=>"0", "password"=>"[FILTERED]", "login"=>"jchoi"}, "utf8"=>"���"}
     Rendered devise/shared/_links.erb (1.6ms)
     Rendered devise/sessions/new.html.erb within layouts/application (13.8ms)
     Completed 200 OK in 23ms (Views: 20.7ms | ActiveRecord

这是否意味着ldap连接已经通过,我的ruby代码有问题,或者它无法访问并检查我的用户名和密码,只是抛出了无效的用户名和密码错误?

谢谢

0 个答案:

没有答案