Authentication code update

production
ansariakhtar 6 years ago
parent 93b5ee0ab5
commit ed5d8a6f39

@ -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];

@ -10,4 +10,6 @@ export class CheckActivationCodeResponse extends Response {
EMPLOYEE_MOBILE_NUMBER:string;
TokenID:string;
MemberInformationList:AuthenticatedUser[];
CompanyImageDescription: string;
CompanyImageURL : string;
}

@ -11,4 +11,6 @@ export class SMSCheckResponse extends Response {
public MobileNumber : string;
public LogInTokenID : string;
public EMPLOYEE_MOBILE_NUMBER:string;
CompanyImageDescription : string;
CompanyImageURL : string;
}

Loading…
Cancel
Save