Authentication code update

production
ansariakhtar 7 years ago
parent 93b5ee0ab5
commit ed5d8a6f39

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

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

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

Loading…
Cancel
Save