Unverified Commit cf794db5 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Added ability to map attributes for LDAP (#1779)

parent 2c1a11e9
......@@ -52,7 +52,7 @@ gem 'omniauth-twitter'
gem 'omniauth-google-oauth2'
gem 'omniauth-bn-launcher', '~> 0.1.3'
gem 'net-ldap'
gem 'bn-ldap-authentication', '~> 0.1.3'
gem 'bn-ldap-authentication', '~> 0.1.4'
gem 'omniauth-bn-office365', '~> 0.1.1'
# BigBlueButton API wrapper.
......
......@@ -62,7 +62,7 @@ GEM
bigbluebutton-api-ruby (1.7.0)
xml-simple (~> 1.1)
bindex (0.8.1)
bn-ldap-authentication (0.1.3)
bn-ldap-authentication (0.1.4)
net-ldap (~> 0)
bootsnap (1.4.6)
msgpack (~> 1.0)
......@@ -337,7 +337,7 @@ DEPENDENCIES
action-cable-testing
bcrypt (~> 3.1.7)
bigbluebutton-api-ruby
bn-ldap-authentication (~> 0.1.3)
bn-ldap-authentication (~> 0.1.4)
bootsnap (>= 1.1.0)
bootstrap (~> 4.3.1)
byebug
......
......@@ -146,7 +146,7 @@ class SessionsController < ApplicationController
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
process_signin
......
......@@ -73,6 +73,7 @@ OAUTH2_REDIRECT=
# LDAP_PASSWORD=password
# LDAP_ROLE_FIELD=ou
# LDAP_FILTER=(&(attr1=value1)(attr2=value2))
# LDAP_ATTRIBUTE_MAPPING=name=displayName;uid=uid; (See link above for more details)
LDAP_SERVER=
LDAP_PORT=
LDAP_METHOD=
......@@ -83,6 +84,7 @@ LDAP_AUTH=
LDAP_PASSWORD=
LDAP_ROLE_FIELD=
LDAP_FILTER=
LDAP_ATTRIBUTE_MAPPING=
# Set this to true if you want GreenLight to support user signup and login without
# Omniauth. For more information, see:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment