forked from External/greenlight
Allow to set a filter for LDAP authentication (#1306)
This commit is contained in:
parent
5aa1868f63
commit
8049ddbd01
|
@ -138,6 +138,7 @@ class SessionsController < ApplicationController
|
||||||
'start_tls'
|
'start_tls'
|
||||||
end
|
end
|
||||||
ldap_config[:base] = ENV['LDAP_BASE']
|
ldap_config[:base] = ENV['LDAP_BASE']
|
||||||
|
ldap_config[:filter] = ENV['LDAP_FILTER']
|
||||||
ldap_config[:uid] = ENV['LDAP_UID']
|
ldap_config[:uid] = ENV['LDAP_UID']
|
||||||
|
|
||||||
if params[:session][:username].blank? || session_params[:password].blank?
|
if params[:session][:username].blank? || session_params[:password].blank?
|
||||||
|
|
|
@ -65,6 +65,7 @@ OAUTH2_REDIRECT=
|
||||||
# LDAP_BIND_DN=cn=admin,dc=example,dc=com
|
# LDAP_BIND_DN=cn=admin,dc=example,dc=com
|
||||||
# LDAP_PASSWORD=password
|
# LDAP_PASSWORD=password
|
||||||
# LDAP_ROLE_FIELD=ou
|
# LDAP_ROLE_FIELD=ou
|
||||||
|
# LDAP_FILTER=(&(attr1=value1)(attr2=value2))
|
||||||
LDAP_SERVER=
|
LDAP_SERVER=
|
||||||
LDAP_PORT=
|
LDAP_PORT=
|
||||||
LDAP_METHOD=
|
LDAP_METHOD=
|
||||||
|
@ -74,6 +75,7 @@ LDAP_BIND_DN=
|
||||||
LDAP_AUTH=
|
LDAP_AUTH=
|
||||||
LDAP_PASSWORD=
|
LDAP_PASSWORD=
|
||||||
LDAP_ROLE_FIELD=
|
LDAP_ROLE_FIELD=
|
||||||
|
LDAP_FILTER=
|
||||||
|
|
||||||
# Set this to true if you want GreenLight to support user signup and login without
|
# Set this to true if you want GreenLight to support user signup and login without
|
||||||
# Omniauth. For more information, see:
|
# Omniauth. For more information, see:
|
||||||
|
|
Loading…
Reference in New Issue