test
This commit is contained in:
parent
5f8fd477e0
commit
a50e9535e0
@ -33,8 +33,8 @@ declare function SHA512(param1: any): any;
|
||||
export class UserService {
|
||||
// 0: Not hide password; 1 hide password;
|
||||
private identificationVersion: number = 1;
|
||||
private cookiesRememberMe = 'karauth-remember-me';
|
||||
private cookiesToken = 'karauth-token';
|
||||
private cookiesRememberMe = 'remember-me';
|
||||
private cookiesToken = 'token';
|
||||
|
||||
constructor(
|
||||
private storageService: StorageService,
|
||||
@ -86,11 +86,13 @@ export class UserService {
|
||||
// And in the mlain application position, the route does not have curently root the page
|
||||
let pathName = window.location.pathname;
|
||||
console.log("start Path-name: '" + pathName + "'");
|
||||
console.log("check with: '" + environment.applName + "/sso/" + "'");
|
||||
if (pathName.startsWith("/sso/") || pathName.startsWith(environment.applName + "/sso/")) {
|
||||
console.log(" ==> SSo section");
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
console.log(" ==> Check if need reconnect?");
|
||||
let rememberMe = self.storageService.get(self.cookiesRememberMe)==="true";
|
||||
// TODO: in case of jest reload ==> no need to manage the SSO ==> just keep the token ... it in enought...
|
||||
let token = self.storageService.getSession(self.cookiesToken);
|
||||
@ -108,6 +110,7 @@ export class UserService {
|
||||
self.ssoService.requestSignIn();
|
||||
reject();
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user