|
|
|
|
@ -201,7 +201,7 @@ export class AuthenticationService {
|
|
|
|
|
* @param result check activation code result
|
|
|
|
|
*/
|
|
|
|
|
public setAuthenticatedUser(
|
|
|
|
|
result: CheckActivationCodeResponse
|
|
|
|
|
result: SMSCheckResponse
|
|
|
|
|
): Observable<boolean> {
|
|
|
|
|
return Observable.create(observer => {
|
|
|
|
|
this.loadAuthenticatedUser().subscribe(
|
|
|
|
|
@ -230,17 +230,17 @@ export class AuthenticationService {
|
|
|
|
|
this.publishUserChangeEvent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public setAuthenticatedMemberFamilyUser(result: CheckActivationCodeResponse) {
|
|
|
|
|
const authUser = new AuthenticatedUser();
|
|
|
|
|
AuthenticationService.requireRelogin = false;
|
|
|
|
|
this.startIdleMonitoring();
|
|
|
|
|
const user = this.updateAuthenticatedUser(result, authUser);
|
|
|
|
|
// public setAuthenticatedMemberFamilyUser(result: CheckActivationCodeResponse) {
|
|
|
|
|
// const authUser = new AuthenticatedUser();
|
|
|
|
|
// AuthenticationService.requireRelogin = false;
|
|
|
|
|
// this.startIdleMonitoring();
|
|
|
|
|
// const user = this.updateAuthenticatedUser(result, authUser);
|
|
|
|
|
|
|
|
|
|
// user["hello"]= "ok";
|
|
|
|
|
/* we store in hd without token but with token in memory*/
|
|
|
|
|
AuthenticationService.user = user;
|
|
|
|
|
this.publishFamilyMemeberUserChangeEvent();
|
|
|
|
|
}
|
|
|
|
|
// // user["hello"]= "ok";
|
|
|
|
|
// /* we store in hd without token but with token in memory*/
|
|
|
|
|
// AuthenticationService.user = user;
|
|
|
|
|
// this.publishFamilyMemeberUserChangeEvent();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
public updateLoggedInUser(newUser: AuthenticatedUser): Observable<boolean> {
|
|
|
|
|
return Observable.create(observer => {
|
|
|
|
|
@ -297,7 +297,7 @@ export class AuthenticationService {
|
|
|
|
|
*update new authenticated user from previously stored and loaded user
|
|
|
|
|
*/
|
|
|
|
|
private updateAuthenticatedUser(
|
|
|
|
|
result: CheckActivationCodeResponse,
|
|
|
|
|
result: SMSCheckResponse,
|
|
|
|
|
loadedUser: AuthenticatedUser
|
|
|
|
|
): AuthenticatedUser {
|
|
|
|
|
const user = result.MemberInformationList[0];
|
|
|
|
|
|