PLT-3562 Switch websocket over to post-connect authentication (#4327)

* Switch websocket over to post-connect authentication

* Add ability to specify token in websocket js driver, add unit tests

* Temporarily disable client websocket tests until issues are resolved

* Minor refactoring and fix status test

* Add isAuthenticated method to WebConn and minor status updates
Этот коммит содержится в:
Joram Wilander
2016-10-31 08:59:23 -04:00
коммит произвёл Christopher Speller
родитель ef363fd88e
Коммит 316b155a42
12 изменённых файлов: 279 добавлений и 26 удалений

Просмотреть файл

@@ -1794,6 +1794,11 @@ func TestUserTyping(t *testing.T) {
defer WebSocketClient.Close()
WebSocketClient.Listen()
time.Sleep(300 * time.Millisecond)
if resp := <-WebSocketClient.ResponseChannel; resp.Status != model.STATUS_OK {
t.Fatal("should have responded OK to authentication challenge")
}
WebSocketClient.UserTyping("", "")
time.Sleep(300 * time.Millisecond)
if resp := <-WebSocketClient.ResponseChannel; resp.Error.Id != "api.websocket_handler.invalid_param.app_error" {