Convert SSOLoginHelper.js to ts
This commit is contained in:
parent
a1367f8e72
commit
c54ca168ed
2 changed files with 6 additions and 4 deletions
|
@ -28,7 +28,7 @@ import {Sync, SyncStatus} from "./Sync.js";
|
||||||
import {Session} from "./Session.js";
|
import {Session} from "./Session.js";
|
||||||
import {PasswordLoginMethod} from "./login/PasswordLoginMethod";
|
import {PasswordLoginMethod} from "./login/PasswordLoginMethod";
|
||||||
import {TokenLoginMethod} from "./login/TokenLoginMethod";
|
import {TokenLoginMethod} from "./login/TokenLoginMethod";
|
||||||
import {SSOLoginHelper} from "./login/SSOLoginHelper.js";
|
import {SSOLoginHelper} from "./login/SSOLoginHelper";
|
||||||
import {getDehydratedDevice} from "./e2ee/Dehydration.js";
|
import {getDehydratedDevice} from "./e2ee/Dehydration.js";
|
||||||
|
|
||||||
export const LoadStatus = createEnum(
|
export const LoadStatus = createEnum(
|
||||||
|
|
|
@ -15,13 +15,15 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export class SSOLoginHelper{
|
export class SSOLoginHelper{
|
||||||
constructor(homeserver) {
|
private _homeserver: string;
|
||||||
|
|
||||||
|
constructor(homeserver: string) {
|
||||||
this._homeserver = homeserver;
|
this._homeserver = homeserver;
|
||||||
}
|
}
|
||||||
|
|
||||||
get homeserver() { return this._homeserver; }
|
get homeserver(): string { return this._homeserver; }
|
||||||
|
|
||||||
createSSORedirectURL(returnURL) {
|
createSSORedirectURL(returnURL: string): string {
|
||||||
return `${this._homeserver}/_matrix/client/r0/login/sso/redirect?redirectUrl=${returnURL}`;
|
return `${this._homeserver}/_matrix/client/r0/login/sso/redirect?redirectUrl=${returnURL}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in a new issue