You've already forked matrix-js-sdk
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:
@@ -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
|
||||
// ===============
|
||||
|
||||
|
||||
Reference in New Issue
Block a user