forked from External/greenlight
Added ability to map attributes for LDAP (#1779)
This commit is contained in:
parent
2c1a11e9a3
commit
cf794db595
2
Gemfile
2
Gemfile
|
@ -52,7 +52,7 @@ gem 'omniauth-twitter'
|
||||||
gem 'omniauth-google-oauth2'
|
gem 'omniauth-google-oauth2'
|
||||||
gem 'omniauth-bn-launcher', '~> 0.1.3'
|
gem 'omniauth-bn-launcher', '~> 0.1.3'
|
||||||
gem 'net-ldap'
|
gem 'net-ldap'
|
||||||
gem 'bn-ldap-authentication', '~> 0.1.3'
|
gem 'bn-ldap-authentication', '~> 0.1.4'
|
||||||
gem 'omniauth-bn-office365', '~> 0.1.1'
|
gem 'omniauth-bn-office365', '~> 0.1.1'
|
||||||
|
|
||||||
# BigBlueButton API wrapper.
|
# BigBlueButton API wrapper.
|
||||||
|
|
|
@ -62,7 +62,7 @@ GEM
|
||||||
bigbluebutton-api-ruby (1.7.0)
|
bigbluebutton-api-ruby (1.7.0)
|
||||||
xml-simple (~> 1.1)
|
xml-simple (~> 1.1)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
bn-ldap-authentication (0.1.3)
|
bn-ldap-authentication (0.1.4)
|
||||||
net-ldap (~> 0)
|
net-ldap (~> 0)
|
||||||
bootsnap (1.4.6)
|
bootsnap (1.4.6)
|
||||||
msgpack (~> 1.0)
|
msgpack (~> 1.0)
|
||||||
|
@ -337,7 +337,7 @@ DEPENDENCIES
|
||||||
action-cable-testing
|
action-cable-testing
|
||||||
bcrypt (~> 3.1.7)
|
bcrypt (~> 3.1.7)
|
||||||
bigbluebutton-api-ruby
|
bigbluebutton-api-ruby
|
||||||
bn-ldap-authentication (~> 0.1.3)
|
bn-ldap-authentication (~> 0.1.4)
|
||||||
bootsnap (>= 1.1.0)
|
bootsnap (>= 1.1.0)
|
||||||
bootstrap (~> 4.3.1)
|
bootstrap (~> 4.3.1)
|
||||||
byebug
|
byebug
|
||||||
|
|
|
@ -146,7 +146,7 @@ class SessionsController < ApplicationController
|
||||||
|
|
||||||
return redirect_to(ldap_signin_path, alert: I18n.t("invalid_credentials")) unless result
|
return redirect_to(ldap_signin_path, alert: I18n.t("invalid_credentials")) unless result
|
||||||
|
|
||||||
@auth = parse_auth(result.first, ENV['LDAP_ROLE_FIELD'])
|
@auth = parse_auth(result.first, ENV['LDAP_ROLE_FIELD'], ENV['LDAP_ATTRIBUTE_MAPPING'])
|
||||||
|
|
||||||
begin
|
begin
|
||||||
process_signin
|
process_signin
|
||||||
|
|
|
@ -73,6 +73,7 @@ OAUTH2_REDIRECT=
|
||||||
# LDAP_PASSWORD=password
|
# LDAP_PASSWORD=password
|
||||||
# LDAP_ROLE_FIELD=ou
|
# LDAP_ROLE_FIELD=ou
|
||||||
# LDAP_FILTER=(&(attr1=value1)(attr2=value2))
|
# LDAP_FILTER=(&(attr1=value1)(attr2=value2))
|
||||||
|
# LDAP_ATTRIBUTE_MAPPING=name=displayName;uid=uid; (See link above for more details)
|
||||||
LDAP_SERVER=
|
LDAP_SERVER=
|
||||||
LDAP_PORT=
|
LDAP_PORT=
|
||||||
LDAP_METHOD=
|
LDAP_METHOD=
|
||||||
|
@ -83,6 +84,7 @@ LDAP_AUTH=
|
||||||
LDAP_PASSWORD=
|
LDAP_PASSWORD=
|
||||||
LDAP_ROLE_FIELD=
|
LDAP_ROLE_FIELD=
|
||||||
LDAP_FILTER=
|
LDAP_FILTER=
|
||||||
|
LDAP_ATTRIBUTE_MAPPING=
|
||||||
|
|
||||||
# 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