markdown [RAILS]使用设计进行LDAP身份验证

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown [RAILS]使用设计进行LDAP身份验证相关的知识,希望对你有一定的参考价值。

# LDAP authentication with Devise
  * If LDAP authentication is by username (not email), add to Devise the possibility to login with username:

    https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-using-their-username-or-email-address
    https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address
    https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-with-something-other-than-their-email-address


  * Add to Gemfile the gem net-ldap:
  
    https://rubygems.org/gems/net-ldap/versions/0.15.0
    https://github.com/ruby-ldap/ruby-net-ldap

    <code>
    gem 'net-ldap', '~> 0.15.0'
    </code>

  * Follow the instructions on:
  
    https://github.com/plataformatec/devise/wiki/How-To:-Authenticate-via-LDAP

  * In <code>config/initializers/ldap_authenticatable.rb</code> replace:

    [YOUR LDAP HOSTNAME]

    [YOUR LDAP HOSTNAME PORT] # 389 default port






以上是关于markdown [RAILS]使用设计进行LDAP身份验证的主要内容,如果未能解决你的问题,请参考以下文章