summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-08-16 15:32:09 +0200
committerSamuel Mannehed <samuel@cendio.se>2018-08-16 15:36:43 +0200
commit16f0861501acf013ddd9a379dde89e801c238c2d (patch)
tree33afcc0c5dbb2ae2a442b8151d4c6d90d3dff938
parent22000b93d5aa3d12823e7440533e8eb25739e9c0 (diff)
downloadnovnc-16f0861501acf013ddd9a379dde89e801c238c2d.tar.gz
Support password auth recordings for playback
When password auth is enabled on the server, the RFB object sends a 'credentialsrequired' event to the UI. This commit adds support for this event to our recoding playback.
-rw-r--r--tests/playback.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/playback.js b/tests/playback.js
index c48a2a4..fe551eb 100644
--- a/tests/playback.js
+++ b/tests/playback.js
@@ -79,6 +79,8 @@ export default class RecordingPlayer {
this._rfb.viewOnly = true;
this._rfb.addEventListener("disconnect",
this._handleDisconnect.bind(this));
+ this._rfb.addEventListener("credentialsrequired",
+ this._handleCredentials.bind(this));
this._enablePlaybackMode();
// reset the frame index and timer
@@ -191,4 +193,10 @@ export default class RecordingPlayer {
this._running = false;
this._disconnected(evt.detail.clean, this._frame_index);
}
+
+ _handleCredentials(evt) {
+ this._rfb.sendCredentials({"username": "Foo",
+ "password": "Bar",
+ "target": "Baz"});
+ }
}