Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1420)

Unified Diff: remoting/webapp/crd/js/client_session.js

Issue 787033003: [Chromoting] Add ClientSession.Capability to enable Gnubby-based auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/client_session.js
diff --git a/remoting/webapp/crd/js/client_session.js b/remoting/webapp/crd/js/client_session.js
index 66410c544364bd62a63f7b3134ae8f9f1628e239..87552510dc0f2b833c2ac1dea6ffec7e2e8fa949 100644
--- a/remoting/webapp/crd/js/client_session.js
+++ b/remoting/webapp/crd/js/client_session.js
@@ -385,7 +385,11 @@ remoting.ClientSession.Capability = {
// Indicates that the client supports 'cast'ing the video stream to a
// cast-enabled device.
- CAST: 'casting'
+ CAST: 'casting',
+
+ // When enabled, this capability results in the client informing the host
+ // that it supports Gnubby-based authentication.
+ GNUBBY_AUTH: 'gnubbyAuth'
};
/**
@@ -1543,7 +1547,8 @@ remoting.ClientSession.prototype.processGnubbyAuthMessage_ = function(data) {
* @private
*/
remoting.ClientSession.prototype.createGnubbyAuthHandler_ = function() {
- if (this.mode_ == remoting.ClientSession.Mode.ME2ME) {
+ if (this.hasCapability_(remoting.ClientSession.Capability.GNUBBY_AUTH) &&
+ this.mode_ == remoting.ClientSession.Mode.ME2ME) {
this.gnubbyAuthHandler_ = new remoting.GnubbyAuthHandler(this);
// TODO(psj): Move to more generic capabilities mechanism.
this.sendGnubbyAuthMessage({'type': 'control', 'option': 'auth-v1'});
« no previous file with comments | « no previous file | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698