From ed5d8a6f39aca9e0ac1ffe1e29dd922f0c283904 Mon Sep 17 00:00:00 2001 From: ansariakhtar Date: Sun, 30 Jun 2019 09:59:15 +0300 Subject: [PATCH 1/2] 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; } From d4b0ccb2572c867167fea50fecbd6e8e00c3f44e Mon Sep 17 00:00:00 2001 From: ansariakhtar Date: Sun, 30 Jun 2019 10:01:01 +0300 Subject: [PATCH 2/2] Authentication code update --- Mohem/package-lock.json | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Mohem/package-lock.json b/Mohem/package-lock.json index 32c46d95..4d338f22 100644 --- a/Mohem/package-lock.json +++ b/Mohem/package-lock.json @@ -6200,12 +6200,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6220,17 +6222,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -6347,7 +6352,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6359,6 +6365,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6373,6 +6380,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6380,12 +6388,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -6404,6 +6414,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6484,7 +6495,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6496,6 +6508,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6617,6 +6630,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",