Skip to content

Commit

Permalink
wip(sso): merge in bigbluebutton#1194 & bigbluebutton#1334
Browse files Browse the repository at this point in the history
  • Loading branch information
faust64 committed Sep 15, 2020
1 parent 4deefdf commit 773314f
Show file tree
Hide file tree
Showing 8 changed files with 463 additions and 29 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ gem 'sprockets', '< 4.0.0'

# Authentication.
gem 'omniauth'
gem 'omniauth-saml'
gem 'omniauth-twitter'
gem 'omniauth-google-oauth2'
gem 'omniauth_openid_connect'
gem 'omniauth-bn-launcher', '~> 0.1.3'
gem 'net-ldap'
gem 'bn-ldap-authentication', '~> 0.1.4'
gem 'omniauth-bn-office365', '~> 0.1.1'

# BigBlueButton API wrapper.
gem 'bigbluebutton-api-ruby', git: 'https://github.com/mconf/bigbluebutton-api-ruby.git', branch: 'master'
Expand Down
56 changes: 47 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ GEM
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
aes_key_wrap (1.0.1)
arel (9.0.0)
ast (2.4.0)
attr_required (1.0.1)
autoprefixer-rails (9.7.6)
execjs
aws-eventstream (1.1.0)
Expand All @@ -89,6 +91,7 @@ GEM
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.13)
bindata (2.4.7)
bindex (0.8.1)
bn-ldap-authentication (0.1.4)
net-ldap (~> 0)
Expand Down Expand Up @@ -191,6 +194,10 @@ GEM
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (2.3.0)
json-jwt (1.11.0)
activesupport (>= 4.2)
aes_key_wrap
bindata
jwt (2.2.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand Down Expand Up @@ -234,22 +241,32 @@ GEM
omniauth-bn-launcher (0.1.3)
omniauth (~> 1.3, >= 1.3.2)
omniauth-oauth2 (= 1.5.0)
omniauth-bn-office365 (0.1.1)
omniauth (>= 1.3.2)
omniauth-oauth2 (>= 1.5.0)
omniauth-google-oauth2 (0.7.0)
jwt (>= 2.0)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.5)
omniauth-oauth (1.1.0)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.5.0)
oauth2 (~> 1.1)
omniauth (~> 1.2)
omniauth-saml (1.10.1)
omniauth (~> 1.3, >= 1.3.2)
ruby-saml (~> 1.7)
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
omniauth_openid_connect (0.3.3)
addressable (~> 2.5)
omniauth (~> 1.9)
openid_connect (~> 1.1)
openid_connect (1.1.8)
activemodel
attr_required (>= 1.0.0)
json-jwt (>= 1.5.0)
rack-oauth2 (>= 1.6.1)
swd (>= 1.0.0)
tzinfo
validate_email
validate_url
webfinger (>= 1.0.1)
os (1.1.0)
pagy (3.8.1)
parallel (1.19.1)
Expand All @@ -260,6 +277,12 @@ GEM
public_suffix (4.0.5)
puma (3.12.6)
rack (2.2.3)
rack-oauth2 (1.11.0)
activesupport
attr_required
httpclient
json-jwt (>= 1.11.0)
rack (>= 2.1.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.3)
Expand Down Expand Up @@ -338,6 +361,8 @@ GEM
rubocop-ast (0.0.3)
parser (>= 2.7.0.1)
ruby-progressbar (1.10.1)
ruby-saml (1.11.0)
nokogiri (>= 1.5.10)
rubyzip (2.3.0)
safe_yaml (1.0.5)
sassc (2.3.0)
Expand Down Expand Up @@ -373,6 +398,10 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
swd (1.1.2)
activesupport (>= 3)
attr_required (>= 0.0.5)
httpclient (>= 2.4)
sync (0.5.0)
syslog_protocol (0.9.2)
term-ansicolor (1.7.1)
Expand All @@ -393,11 +422,20 @@ GEM
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.7.0)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
validate_url (1.0.8)
activemodel (>= 3.0.0)
public_suffix
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webfinger (1.1.0)
activesupport
httpclient (>= 2.4)
webmock (3.8.3)
addressable (>= 2.3.6)
crack (>= 0.3.2)
Expand Down Expand Up @@ -438,9 +476,9 @@ DEPENDENCIES
net-ldap
omniauth
omniauth-bn-launcher (~> 0.1.3)
omniauth-bn-office365 (~> 0.1.1)
omniauth-google-oauth2
omniauth-saml
omniauth-twitter
omniauth_openid_connect
pagy
pg (~> 0.18)
puma (~> 3.12)
Expand Down
78 changes: 78 additions & 0 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,84 @@
}
}

.customBtn-facebook {
@extend .customBtn;
background: #4267b2;

.customBtn-image {
background: #ffffff image-url("facebook-logo.png") no-repeat left top;
background-size: 18px 18px;
padding:10px 10px 10px 10px;
}
}

.customBtn-linkedin {
@extend .customBtn;
background: #4377b1;

.customBtn-image {
background: #ffffff image-url("linkedin-logo.png") no-repeat left top;
background-size: 18px 18px;
padding:10px 10px 10px 10px;
}
}

.customBtn-github {
@extend .customBtn;
background: #000000;

.customBtn-image {
background: #ffffff image-url("github-logo.png") no-repeat left top;
background-size: 18px 18px;
padding:10px 10px 10px 10px;
}
}

.customBtn-instagram {
@extend .customBtn;
background: linear-gradient(90deg, #c6002d, #6a0975);

.customBtn-image {
background: #ffffff image-url("instagram-logo.png") no-repeat left top;
background-size: 18px 18px;
padding:10px 10px 10px 10px;
}
}

.customBtn-apple {
@extend .customBtn;
background: #000000;

.customBtn-image {
background: #ffffff image-url("apple-logo.png") no-repeat left top;
transform: scale(2.2);
background-size: 18px 18px;
padding:10px 10px 10px 10px;
}
}

.customBtn-openid_connect {
@extend .customBtn;
background: #f7931e;

.customBtn-image {
background: #ffffff image-url("openid-logo.png") no-repeat left top;
background-size: 18px 18px;
padding:10px 10px 10px 10px;
}
}

.customBtn-saml {
@extend .customBtn;
background: $button-color-blue;

.customBtn-image {
background: #ffffff image-url("saml-logo.png") no-repeat left top;
background-size: 18px 18px;
padding:10px 10px 10px 10px;
}
}

.customBtn-microsoft_windows {
@extend .customBtn;
background: #00a1f1;
Expand Down
12 changes: 11 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@
module ApplicationHelper
# Determines which providers can show a login button in the login modal.
def iconset_providers
providers = configured_providers & [:google, :twitter, :office365, :ldap]
providers = configured_providers & [:google,
:twitter,
:office365,
:saml,
:apple,
:facebook,
:github,
:instagram,
:linkedin,
:openid_connect,
:ldap]

providers.delete(:twitter) if session[:old_twitter_user_id]

Expand Down
Loading

0 comments on commit 773314f

Please sign in to comment.