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'}); |