summaryrefslogtreecommitdiffstats
path: root/webapp/components/login
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-07-05 15:49:00 -0400
committerGitHub <noreply@github.com>2016-07-05 15:49:00 -0400
commit5f04dc4f45b9657d46380499f92ae6e5c1bf5506 (patch)
tree86670cb20e038f9716eca3ab9dcb7f2f71263286 /webapp/components/login
parentf91b9d4a654ff27777580651d853b6372a425af6 (diff)
downloadchat-5f04dc4f45b9657d46380499f92ae6e5c1bf5506.tar.gz
chat-5f04dc4f45b9657d46380499f92ae6e5c1bf5506.tar.bz2
chat-5f04dc4f45b9657d46380499f92ae6e5c1bf5506.zip
SAML support (#3494)
* PLT-3073: Implement SAML/Okta Server side (EE) (#3422) * PLT-3137 Support for SAML configuration * PLT-3410 SAML Database Store * PLT-3411 CLI to add Identity Provider Certificate and Service Provider Private Key * PLT-3409 SAML Interface for EE * PLT-3139 Handle SAML authentication server side * Add localization messages * PLT-3443 SAML Obtain SP metadata * PLT-3142 Login & Switch to/from SAML * Remove Certs for Database & Clean SAML Request * Make required Username, FirstName and LastName * PLT-3140 Add SAML to System Console (#3476) * PLT-3140 Add SAML to System Console * Move web_client functions to client.jsx * Fix issues found by PM * update package.json mattermost driver * Fix text messages for SAML
Diffstat (limited to 'webapp/components/login')
-rw-r--r--webapp/components/login/login_controller.jsx18
1 files changed, 17 insertions, 1 deletions
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index 653908654..cd4175d3c 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -43,6 +43,7 @@ export default class LoginController extends React.Component {
ldapEnabled: global.window.mm_license.IsLicensed === 'true' && global.window.mm_config.EnableLdap === 'true',
usernameSigninEnabled: global.window.mm_config.EnableSignInWithUsername === 'true',
emailSigninEnabled: global.window.mm_config.EnableSignInWithEmail === 'true',
+ samlEnabled: global.window.mm_license.IsLicensed === 'true' && global.window.mm_config.EnableSaml === 'true',
loginId: '', // the browser will set a default for this
password: '',
showMfa: false
@@ -319,6 +320,7 @@ export default class LoginController extends React.Component {
const ldapEnabled = this.state.ldapEnabled;
const gitlabSigninEnabled = global.window.mm_config.EnableSignUpWithGitLab === 'true';
const googleSigninEnabled = global.window.mm_config.EnableSignUpWithGoogle === 'true';
+ const samlSigninEnabled = this.state.samlEnabled;
const usernameSigninEnabled = this.state.usernameSigninEnabled;
const emailSigninEnabled = this.state.emailSigninEnabled;
@@ -416,7 +418,7 @@ export default class LoginController extends React.Component {
);
}
- if ((emailSigninEnabled || usernameSigninEnabled || ldapEnabled) && (gitlabSigninEnabled || googleSigninEnabled)) {
+ if ((emailSigninEnabled || usernameSigninEnabled || ldapEnabled) && (gitlabSigninEnabled || googleSigninEnabled || samlSigninEnabled)) {
loginControls.push(
<div
key='divider'
@@ -475,6 +477,20 @@ export default class LoginController extends React.Component {
);
}
+ if (samlSigninEnabled) {
+ loginControls.push(
+ <a
+ className='btn btn-custom-login saml'
+ key='gitlab'
+ href={'/login/sso/saml' + this.props.location.search}
+ >
+ <span>
+ {window.mm_config.SamlLoginButtonText}
+ </span>
+ </a>
+ );
+ }
+
return (
<div>
{extraBox}