From ed5d8a6f39aca9e0ac1ffe1e29dd922f0c283904 Mon Sep 17 00:00:00 2001 From: ansariakhtar Date: Sun, 30 Jun 2019 09:59:15 +0300 Subject: [PATCH] Authentication code update --- .../authentication/authentication.service.ts | 24 +++++++++---------- .../models/check-activation-code.response.ts | 2 ++ .../models/smscheck.response.ts | 2 ++ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts index 210c3e6a..a1a9af44 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -201,7 +201,7 @@ export class AuthenticationService { * @param result check activation code result */ public setAuthenticatedUser( - result: CheckActivationCodeResponse + result: SMSCheckResponse ): Observable { 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 { 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]; diff --git a/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts b/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts index 44749b80..1c87f5ef 100644 --- a/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts +++ b/Mohem/src/app/hmg-common/services/authentication/models/check-activation-code.response.ts @@ -10,4 +10,6 @@ export class CheckActivationCodeResponse extends Response { EMPLOYEE_MOBILE_NUMBER:string; TokenID:string; MemberInformationList:AuthenticatedUser[]; + CompanyImageDescription: string; + CompanyImageURL : string; } diff --git a/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts index 741288ce..f8fafce8 100644 --- a/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts +++ b/Mohem/src/app/hmg-common/services/authentication/models/smscheck.response.ts @@ -11,4 +11,6 @@ export class SMSCheckResponse extends Response { public MobileNumber : string; public LogInTokenID : string; public EMPLOYEE_MOBILE_NUMBER:string; + CompanyImageDescription : string; + CompanyImageURL : string; }