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