|
|
@ -53,6 +53,8 @@ module Devise |
|
|
|
@@ldap_base = nil |
|
|
|
@@ldap_base = nil |
|
|
|
mattr_accessor :ldap_uid |
|
|
|
mattr_accessor :ldap_uid |
|
|
|
@@ldap_uid = nil |
|
|
|
@@ldap_uid = nil |
|
|
|
|
|
|
|
mattr_accessor :ldap_mail |
|
|
|
|
|
|
|
@@ldap_mail = nil |
|
|
|
mattr_accessor :ldap_bind_dn |
|
|
|
mattr_accessor :ldap_bind_dn |
|
|
|
@@ldap_bind_dn = nil |
|
|
|
@@ldap_bind_dn = nil |
|
|
|
mattr_accessor :ldap_password |
|
|
|
mattr_accessor :ldap_password |
|
|
@ -369,8 +371,9 @@ Devise.setup do |config| |
|
|
|
config.ldap_bind_dn = ENV.fetch('LDAP_BIND_DN') |
|
|
|
config.ldap_bind_dn = ENV.fetch('LDAP_BIND_DN') |
|
|
|
config.ldap_password = ENV.fetch('LDAP_PASSWORD') |
|
|
|
config.ldap_password = ENV.fetch('LDAP_PASSWORD') |
|
|
|
config.ldap_uid = ENV.fetch('LDAP_UID', 'cn') |
|
|
|
config.ldap_uid = ENV.fetch('LDAP_UID', 'cn') |
|
|
|
|
|
|
|
config.ldap_mail = ENV.fetch('LDAP_MAIL', 'mail') |
|
|
|
config.ldap_tls_no_verify = ENV['LDAP_TLS_NO_VERIFY'] == 'true' |
|
|
|
config.ldap_tls_no_verify = ENV['LDAP_TLS_NO_VERIFY'] == 'true' |
|
|
|
config.ldap_search_filter = ENV.fetch('LDAP_SEARCH_FILTER', '%{uid}=%{email}') |
|
|
|
config.ldap_search_filter = ENV.fetch('LDAP_SEARCH_FILTER', '(|(%{uid}=%{email})(%{mail}=%{email}))') |
|
|
|
config.ldap_uid_conversion_enabled = ENV['LDAP_UID_CONVERSION_ENABLED'] == 'true' |
|
|
|
config.ldap_uid_conversion_enabled = ENV['LDAP_UID_CONVERSION_ENABLED'] == 'true' |
|
|
|
config.ldap_uid_conversion_search = ENV.fetch('LDAP_UID_CONVERSION_SEARCH', '.,- ') |
|
|
|
config.ldap_uid_conversion_search = ENV.fetch('LDAP_UID_CONVERSION_SEARCH', '.,- ') |
|
|
|
config.ldap_uid_conversion_replace = ENV.fetch('LDAP_UID_CONVERSION_REPLACE', '_') |
|
|
|
config.ldap_uid_conversion_replace = ENV.fetch('LDAP_UID_CONVERSION_REPLACE', '_') |
|
|
|