1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

Add login with token method

This commit is contained in:
Steven Hammerton
2015-11-05 14:51:23 +00:00
parent d34f8eda1a
commit d241f5b3eb

View File

@@ -1746,6 +1746,18 @@ MatrixClient.prototype.loginWithCas = function(ticket, service, callback) {
}, callback);
};
/**
* @param {string} token Login token previously received from homeserver
* @param {module:client.callback} callback Optional.
* @return {module:client.Promise} Resolves: TODO
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixClient.prototype.loginWithToken = function(token, callback) {
return this.login("m.login.token", {
token: token
}, callback);
};
// Push operations
// ===============