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
Update CAS login to return url rather than update location as the JS SDK may not be run within a browser env
This commit is contained in:
@@ -1722,12 +1722,14 @@ MatrixClient.prototype.loginWithSAML2 = function(relayState, callback) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} redirectUrl URL to which to be redirect to after
|
||||
* @param {string} redirectUrl URL to which to be redirected to after
|
||||
* HS authenticates with CAS and issues login token
|
||||
* Will redirect to homeserver to complete CAS login
|
||||
* @return {string} CAS login URL
|
||||
*/
|
||||
MatrixClient.prototype.loginWithCas = function(redirectUrl) {
|
||||
this._http.redirect("/login/cas/redirect", {"redirectUrl": redirectUrl}, httpApi.PREFIX_V1);
|
||||
MatrixClient.prototype.getCasLoginUrl = function(redirectUrl) {
|
||||
return this._http.getUrl("/login/cas/redirect", {
|
||||
"redirectUrl": redirectUrl
|
||||
}, httpApi.PREFIX_V1);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user