Merge pull request #8930 from ubc/wmono/lti-sso
Feature: LTI third-party-auth providers
This commit is contained in:
@@ -35,6 +35,7 @@ define(['backbone', 'jquery', 'underscore', 'common/js/spec_helpers/ajax_helpers
|
||||
'id': 'oa2-network1',
|
||||
'name': "Network1",
|
||||
'connected': true,
|
||||
'accepts_logins': 'true',
|
||||
'connect_url': 'yetanother1.com/auth/connect',
|
||||
'disconnect_url': 'yetanother1.com/auth/disconnect'
|
||||
},
|
||||
@@ -42,6 +43,7 @@ define(['backbone', 'jquery', 'underscore', 'common/js/spec_helpers/ajax_helpers
|
||||
'id': 'oa2-network2',
|
||||
'name': "Network2",
|
||||
'connected': true,
|
||||
'accepts_logins': 'true',
|
||||
'connect_url': 'yetanother2.com/auth/connect',
|
||||
'disconnect_url': 'yetanother2.com/auth/disconnect'
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ define(['backbone', 'jquery', 'underscore', 'common/js/spec_helpers/ajax_helpers
|
||||
helpMessage: '',
|
||||
valueAttribute: 'auth-yet-another',
|
||||
connected: true,
|
||||
acceptsLogins: 'true',
|
||||
connectUrl: 'yetanother.com/auth/connect',
|
||||
disconnectUrl: 'yetanother.com/auth/disconnect'
|
||||
});
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
helpMessage: '',
|
||||
connected: provider.connected,
|
||||
connectUrl: provider.connect_url,
|
||||
acceptsLogins: provider.accepts_logins,
|
||||
disconnectUrl: provider.disconnect_url
|
||||
})
|
||||
};
|
||||
|
||||
@@ -116,11 +116,20 @@
|
||||
},
|
||||
|
||||
render: function () {
|
||||
var linkTitle;
|
||||
if (this.options.connected) {
|
||||
linkTitle = gettext('Unlink');
|
||||
} else if (this.options.acceptsLogins) {
|
||||
linkTitle = gettext('Link')
|
||||
} else {
|
||||
linkTitle = ''
|
||||
}
|
||||
|
||||
this.$el.html(this.template({
|
||||
id: this.options.valueAttribute,
|
||||
title: this.options.title,
|
||||
screenReaderTitle: this.options.screenReaderTitle,
|
||||
linkTitle: this.options.connected ? gettext('Unlink') : gettext('Link'),
|
||||
linkTitle: linkTitle,
|
||||
linkHref: '',
|
||||
message: this.helpMessage
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user