[대상향] 로그인시 SSO 만기됬을 경우에 대한 처리
This commit is contained in:
parent
eb440304ff
commit
ed05045e43
|
@ -47,7 +47,8 @@ import {
|
|||
LoginInfo,
|
||||
KEY_LOGIN_INFO,
|
||||
EnvironmentsInfo,
|
||||
KEY_ENVIRONMENTS_INFO
|
||||
KEY_ENVIRONMENTS_INFO,
|
||||
KEY_URL_INFO
|
||||
} from '@app/types';
|
||||
import { AppAuthenticationService } from '@app/services/authentication.service';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
|
@ -71,6 +72,7 @@ import {
|
|||
ServiceProtocolService,
|
||||
UserPasswordSetResponse
|
||||
} from '@ucap-webmessenger/protocol-service';
|
||||
import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
|
||||
|
||||
@Injectable()
|
||||
export class Effects {
|
||||
|
@ -287,35 +289,62 @@ export class Effects {
|
|||
}
|
||||
|
||||
if (!loginRes.passwordValid) {
|
||||
const result = await this.dialogService.open<
|
||||
ChangePasswordDialogComponent,
|
||||
ChangePasswordDialogData,
|
||||
ChangePasswordDialogResult
|
||||
>(ChangePasswordDialogComponent, {
|
||||
width: '500px',
|
||||
height: '500px',
|
||||
disableClose: false,
|
||||
// [Daesang]
|
||||
const urlInfo: DaesangUrlInfoResponse = this.sessionStorageService.get<
|
||||
DaesangUrlInfoResponse
|
||||
>(KEY_URL_INFO);
|
||||
|
||||
await this.dialogService.open<
|
||||
AlertDialogComponent,
|
||||
AlertDialogData,
|
||||
AlertDialogResult
|
||||
>(AlertDialogComponent, {
|
||||
data: {
|
||||
loginId: loginInfo.loginId,
|
||||
encryptedLoginPw: loginInfo.loginPw,
|
||||
phoneNumber: loginRes.userInfo.hpNumber
|
||||
title: '비밀번호 만기',
|
||||
html: `비밀번호가 만료되었습니다.<br/>비밀번호 변경 후 다시 로그인 하세요.`
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && result.choice) {
|
||||
this.store.dispatch(
|
||||
userPasswordSet({
|
||||
req: {
|
||||
companyCode: loginInfo.companyCode,
|
||||
loginId: loginInfo.loginId,
|
||||
oldLoginPw: result.currentLoginPw,
|
||||
newLoginPw: result.newLoginPw
|
||||
}
|
||||
})
|
||||
);
|
||||
} else {
|
||||
return;
|
||||
const passwordChangeUrl = urlInfo.webLink.filter(
|
||||
weblink => weblink.key === 'WebLinkChgPassword'
|
||||
);
|
||||
if (passwordChangeUrl.length > 0) {
|
||||
this.nativeService.openDefaultBrowser(passwordChangeUrl[0].url);
|
||||
}
|
||||
|
||||
this.store.dispatch(logout());
|
||||
|
||||
// // [GROUP]
|
||||
// const result = await this.dialogService.open<
|
||||
// ChangePasswordDialogComponent,
|
||||
// ChangePasswordDialogData,
|
||||
// ChangePasswordDialogResult
|
||||
// >(ChangePasswordDialogComponent, {
|
||||
// width: '500px',
|
||||
// height: '500px',
|
||||
// disableClose: false,
|
||||
// data: {
|
||||
// loginId: loginInfo.loginId,
|
||||
// encryptedLoginPw: loginInfo.loginPw,
|
||||
// phoneNumber: loginRes.userInfo.hpNumber
|
||||
// }
|
||||
// });
|
||||
|
||||
// if (!!result && result.choice) {
|
||||
// this.store.dispatch(
|
||||
// userPasswordSet({
|
||||
// req: {
|
||||
// companyCode: loginInfo.companyCode,
|
||||
// loginId: loginInfo.loginId,
|
||||
// oldLoginPw: result.currentLoginPw,
|
||||
// newLoginPw: result.newLoginPw
|
||||
// }
|
||||
// })
|
||||
// );
|
||||
// } else {
|
||||
// this.store.dispatch(logout());
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
})
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user