1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-09-01 21:21:58 +03:00
This commit is contained in:
David Baker
2015-07-14 19:38:56 +01:00
parent 77d3add846
commit ae7f9ab871

View File

@@ -1386,26 +1386,29 @@ function _PojoToMatrixEventMapper(plainOldJsObject) {
// ==========================
/**
* @param {string} client_secret
* @param {string} email
* @param {string} client_secret
* @param {string} send_attempt
* @param {module:client.callback} callback Optional.
* @return {module:client.Promise} Resolves: TODO
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixClient.prototype.requestEmailToken = function(email, client_secret, send_attempt, callback) {
MatrixClient.prototype.requestEmailToken = function(email, client_secret,
send_attempt, callback) {
var params = {
client_secret: client_secret,
email: email,
send_attempt: send_attempt
};
return this._http.idServerRequest(
callback, "POST", "/validate/email/requestToken", params, httpApi.PREFIX_IDENTITY_V1
callback, "POST", "/validate/email/requestToken",
params, httpApi.PREFIX_IDENTITY_V1
);
};
/**
* Generates a random string suitable for use as a client secret
* @return {string} A new client secret
*/
MatrixClient.prototype.generateClientSecret = function() {
var ret = "";