PageSourceSearch

https://contract.nisshinfire.co.jp/doc/aic/js/authRule_secondFactorLoginCode_ver2.0.js

js nisshinfire.co.jp collected 2026-10-01 11:57:32 UTC 7,570 bytes, 115 lines download raw bytes

1janrain.settings.capture = janrain.settings.capture || {}
2janrain.settings.capture.beforeJanrainCaptureWidgetOnLoad = janrain.settings.capture.beforeJanrainCaptureWidgetOnLoad || []
3janrain.settings.capture.beforeJanrainCaptureWidgetOnLoad.push(function() {
4	janrain.events.onCaptureRenderComplete.addHandler(function(event) {
5		if (event.screen === "authRule_secondFactorLoginCode") {
6			if (event.flow.oneTimeRender === "authRule_secondFactor" || event.flow.oneTimeRender === "authRule_secondFactorLoginCode") {
7				$('.screen-heading').wrap('<div class="container text-center mb-5 my-5">');
8				$('.action-description').addClass('d-none');
9				$('#authRule_secondFactorLoginCode .form-action-buttons').removeClass('container');
10				$('#secondFactorCodeLoginInput').wrap('<div id="authRule_secondFactorLoginCode_authCodearea" class="container mb-2">');
11				$('#secondFactorCodeLoginInput').wrap('<div class="row justify-content-center mb-3">');
12				$('#secondFactorCodeLoginInput').wrap('<div class="mb-3 col-8 col-md-6 col-lg-4">');
13				$('#secondFactorCodeLoginInput').addClass('form-control-lg text-center');
14				$('#secondFactorCodeLoginInput').after($('#resendCodeSecondFactorLoginInvalid'));
15				$('#authRule_secondFactorLoginCode_authCodearea').after('<div id="authRule_secondFactorLoginCode_descarea" class="container mb-5"></div>');
16				$('#authRule_secondFactorLoginCode_descarea').append('<div class="row justify-content-center"></dev>');
17				$('#authRule_secondFactorLoginCode_descarea div').append('<div class="col-sm-8 col-md-6"></div>');
18				let msg = '<span id="sendSuffix">宛に認証コードを送信しました。</span>';
19				$('#secondFactorCodeLoginEmail').append(msg);
20				$('#secondFactorCodeLoginSms').append(msg);
21				$('#authRule_secondFactorLoginCode_descarea div div').append($('#secondFactorCodeLoginEmail'));
22				$('#authRule_secondFactorLoginCode_descarea div div').append($('#secondFactorCodeLoginSms'));
23				$('#authRule_secondFactorLoginCode_descarea div div').append('<p>5分以内にメールまたはショートメールに記載されている認証コードを入力してください。</p>');
24				$('#authRule_secondFactorLoginCode_descarea div div').append('<p>有効時間が過ぎてしまった場合は、認証コードの再送信をおこなってください。</p>');
25				$('#authRule_secondFactorLoginCode_descarea').after($('#resendCodeSecondFactorLogin'));
26				$('#resendCodeSecondFactorLogin').wrap('<div id="authRule_secondFactorLoginCode_resend" class="container mb-5 text-center">');
27				$('#resendCodeSecondFactorLogin p').prepend('<span>認証コードの再送信は</span>');
28				$('#resendCodeSecondFactorLogin p a').text('こちら');
29				$('#resendCodeSecondFactorLogin a').attr('id','mailResend');
30				$('#resendCodeSecondFactorLogin p a').append('<span class="h5"><svg class="nfm-icon"><use xlink:href="#chevron-right"></use></svg></span>');
31				$('#authRule_secondFactorLoginCode_resend').after('<div id="authRule_secondFactorLoginCode_notsend" class="container mb-5 text-center"></div>');
32				$('#authRule_secondFactorLoginCode_notsend').append('<p>認証コードが届かない場合は<a href="' + authCodeHelpUri +'" target="_blank">こちら<span class="h5"> <svg class="nfm-icon"><use xlink:href="#chevron-right"></use></svg></span></a></p></div>');
33				$('#submitSecondFactorCodeLoginButton').wrap('<div id="authRule_secondFactorLoginCode_next_btn" class="row justify-content-center mb-3">');
34				$('#submitSecondFactorCodeLoginButton').addClass('btn btn-primary m-1 col-6 col-md-3');
35				$('#submitSecondFactorCodeLoginButton').append('<span class="h5 ms-1"><svg class="nfm-icon"><use xlink:href="#chevron-right"></use></svg></span>');
36				$('#authRule_secondFactorLoginCode_next_btn').after('<div id="authRule_secondFactorLoginCode_cansel_btn_area" class="row justify-content-center mb-3">');
37				$('#authRule_secondFactorLoginCode_cansel_btn_area').append('<button id="authRule_secondFactorLoginCode_cansel_btn" type="button" class="btn btn-secondary text-white m-1 col-6 col-md-3">キャンセル</button>');
38				$('#authRule_secondFactorLoginCode_cansel_btn_area').after('<div class="modal fade" id="modalDispPtn" aria-hidden="true" aria-labelledby="exampleModalToggleLabel2" tabindex="-1">');
39				$('#modalDispPtn').prepend('<div class="modal-dialog modal-dialog-centered">');
40				$('.modal-dialog').prepend('<div class="modal-content">');
41				$('.modal-content').prepend('<div class="modal-body">');
42				$('.modal-body').after(' <div class="modal-footer justify-content-center">');
43				$('.modal-footer').prepend('<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">閉じる</button>');
44				
45				let arg = getUrlParams();
46				let clientId = arg.client_id;
47				let state = arg.state;
48				if (clientId === clientIdMynisshin) {
49					cancelUrl = location.protocol + "//" + location.hostname + "/" + location.pathname.split('/')[1] + "/login/authorize?client_id=" + clientId
50					+ "&prompt=login"
51					+ "&redirect_uri=" + redirectUriMynisshinLogin
52					+ "&scope=" + scope
53					+ "&response_type=code"
54					+ "&claims=" + clames
55					+ "&ui_locales=ja-JP";
56                    if (arg.pf !== undefined) {
57                        cancelUrl = cancelUrl + "&pf=" + arg.pf;
58                    }
59				} else if (clientId === clientIdOheya) {
60					cancelUrl = contentsConfOheyaUrl + state;
61				} else if (clientId === clientIdYouside) {
62					let flow = arg.flow;
63					if (flow == '1') {
64						cancelUrl = contentsConfWebrakuLoginUrl + state;
65					} else {
66						cancelUrl = contentsConfYousideUrl + state;
67					}
68				}
69				// キャンセルイベント
70				$('#authRule_secondFactorLoginCode_cansel_btn').click(function(){
71					window.location.href = cancelUrl;
72				});
73				// 再送信の項目が押された際のイベント処理用フラグの設置
74				$('#mailResend').click(function(){
75					$('body').append('<div id="reloadComp">');
76				});
77				// 再描画後にフラグを拾ってモーダル処理を実施。
78				if($('#reloadComp').length > 0){
79					var resendElement;
80					if ($('#smsResend').length > 0)  {
81						// モーダル表示はされないが処理としてわかりやすいように記載
82						// 前画面でsmsが選択されている場合の処理
83						$('#reloadComp').remove();
84					} else if ($('#eMailResend').length > 0){
85						// モーダル表示はされないが処理としてわかりやすいように記載
86						// 前画面でemailが選択されている場合の処理
87						$('#reloadComp').remove();
88					}else if ($('#secondFactorCodeLoginSms').length > 0) {
89						// 契約者携帯電話番号のみ認証済の場合
90						var resendElement = document.getElementById('secondFactorCodeLoginSmsNumber');
91						var resendText = resendElement.innerText;
92
93						$('.modal-body').prepend('<p>' + resendText + '宛に認証コードを再送信しました。');
94						var myModal = new bootstrap.Modal(document.getElementById('modalDispPtn'), {
95							keyboard: false
96						});
97						$('#reloadComp').remove();
98						myModal.show();
99					} else{
100						var resendElement = document.getElementById('secondFactorCodeLoginEmail');
101						var resendText = resendElement.childNodes[0].nodeValue.trim();
102						
103						$('.modal-body').prepend('<p>' + resendText + '宛に認証コードを再送信しました。');
104						var myModal = new bootstrap.Modal(document.getElementById('modalDispPtn'), {
105							keyboard: false
106						});
107						$('#reloadComp').remove();
108						myModal.show();
109					}
110				}
111			}
112		}
113	})
114	
115})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.