[go: nahoru, domu]

Skip to content

Commit

Permalink
Support password auth recordings for playback
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CendioOssman authored and samhed committed Aug 16, 2018
1 parent 22000b9 commit 16f0861
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/playback.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"});
}
}

0 comments on commit 16f0861

Please sign in to comment.