Skip to content


Subversion checkout URL

You can clone with
Download ZIP

LDAP Authentication

DArrigoni edited this page · 8 revisions


    use OmniAuth::Strategies::LDAP, 
      :host => '', 
      :port => 389, 
      :method => :plain, 
      :base => 'dc=intridea, dc=com', 
      :uid => 'sAMAccountName', 
      :try_sasl => true, 
      :sasl_mechanisms => [ "GSS-SPNEGO" ], 
      :bind_dn => "cn=John Smith,ou=LA Office,dc=intridea,dc=com", 
      :password => "JOHN_SMITH_SECRET"


  • :host (required) - The LDAP server host.
  • :port (required) - The LDAP server port.
  • :method (required) - May be :plain, :ssl, or :tls.
  • :base (required) - The distinguished name (DN) for your organization; all users should be searchable under this base.
  • :uid (required) - The LDAP attribute name for the user name in the login form. Typically AD would be 'sAMAccountName' or 'UniquePersonalIdentifier', while OpenLDAP is 'uid'. You can also use 'dn' for the user to put in the dn in the login form (but usually is too long for user to remember or know).
  • :try_sasl - Try to use SASL connection to server.
  • :sasl_mechanisms - Mechanisms supported are 'DIGEST-MD5' and 'GSS-SPNEGO'
  • :bind_dn - Optional DN to use when authenticating. Default use is anonymous
  • :password - Password for binding
Something went wrong with that request. Please try again.