PLT-3412 WebRTC Server side & System Console (#3706)

* WebRTC Server side

* WebRTC System Console

* Consistency on variable names

* Add turn and stun uri validation
Этот коммит содержится в:
enahum
2016-09-15 09:35:44 -03:00
коммит произвёл Christopher Speller
родитель 3b4c9d7588
Коммит b180bb46e3
20 изменённых файлов: 592 добавлений и 3 удалений

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

@@ -1898,3 +1898,14 @@ func (c *Client) SamlCertificateStatus(filename string) (map[string]interface{},
return StringInterfaceFromJson(r.Body), nil
}
}
// GetWebrtcToken if Successful returns a map with a valid token, stun server and turn server with credentials to use with
// the Mattermost WebRTC service, otherwise returns an AppError. Must be authenticated user.
func (c *Client) GetWebrtcToken() (map[string]string, *AppError) {
if r, err := c.DoApiPost("/webrtc/token", ""); err != nil {
return nil, err
} else {
defer closeBody(r)
return MapFromJson(r.Body), nil
}
}