与OmniAuth的连接池

时间:2018-06-08 10:13:25

标签: ruby-on-rails omniauth

我们必须决定是否使用OmniAuth连接到LDAP。一个重要的设计标准是支持连接池,因为我们的LDAP连接速度很慢,但查询速度非常快。

docs声明这是建立连接的一种方式,但是如何将其合并/保持打开/重用?

use OmniAuth::Strategies::LDAP, 
    :title => "My LDAP", 
    :host => '10.101.10.1',
    :port => 389,
    :method => :plain,
    :base => 'dc=intridea, dc=com',
    :uid => 'sAMAccountName',
    :name_proc => Proc.new {|name| name.gsub(/@.*$/,'')},
    :bind_dn => 'default_bind_dn',
    # Or, alternatively:
    #:filter => '(&(uid=%{username})(memberOf=cn=myapp-users,ou=groups,dc=example,dc=com))'
    :name_proc => Proc.new {|name| name.gsub(/@.*$/,'')}
    :bind_dn => 'default_bind_dn'
    :password => 'password'

0 个答案:

没有答案
相关问题