You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-18 05:42:00 +03:00
Add client functions around new synapse CAS login
This commit is contained in:
@@ -1728,6 +1728,31 @@ MatrixClient.prototype.loginWithSAML2 = function(relayState, callback) {
|
|||||||
}, callback);
|
}, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {module:client.callback} callback Optional.
|
||||||
|
* @return {module:client.Promise} Resolves: TODO
|
||||||
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
|
*/
|
||||||
|
MatrixClient.prototype.getCasServer = function(callback) {
|
||||||
|
return this._http.authedRequest(
|
||||||
|
callback, "GET", "/login/cas", undefined, undefined
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} ticket (Received from CAS)
|
||||||
|
* @param {string} service Service to which the token was granted
|
||||||
|
* @param {module:client.callback} callback Optional.
|
||||||
|
* @return {module:client.Promise} Resolves: TODO
|
||||||
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
|
*/
|
||||||
|
MatrixClient.prototype.loginWithCas = function(ticket, service, callback) {
|
||||||
|
return this.login("m.login.cas", {
|
||||||
|
ticket: ticket,
|
||||||
|
service: service
|
||||||
|
}, callback);
|
||||||
|
};
|
||||||
|
|
||||||
// Push operations
|
// Push operations
|
||||||
// ===============
|
// ===============
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user