CINXE.COM
Cisco
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script type="text/javascript" src="https://www.cisco.com/c/dam/cdc/t/ctm-core.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="robots" content="noindex,nofollow" /> <base href="https://id.cisco.com" /> <script src="widget-content/js/jquery-2.2.4.min.js"></script> <script src="widget-content/js/axios.min.js"></script> <script src="widget-content/js/jquery.i18n.min-new.js"></script> <script src="widget-content/js/bootstrap-custom.min.js"></script> <link rel="stylesheet" href="widget-content/css/bootstrap-cui.min.css"> <link rel="shortcut icon" type="image/x-icon" href="widget-content/img/logo-open-graph.gif" /> <title>Cisco</title> <!-- Core widget js and css --> <script type="text/javascript" src="https://id.cisco.com/assets/js/sdk/okta-signin-widget/7.25.0/js/okta-sign-in.min.js" integrity="sha384-oMTRqyPl7AvAzanR/7qBpHwjsijbTROdzCH9K6qzc0IfK3SKWTahMXevD33I0Gzj" crossorigin="anonymous"></script> <link rel="stylesheet" type="text/css" href="https://id.cisco.com/assets/js/sdk/okta-signin-widget/7.25.0/css/okta-sign-in.min.css" integrity="sha384-63aTBe2wMqzMRsDHNmlF/FreSWmf3p08BhUDoPlzVf3d+stbkfWtqmdyJ4He5m3m" crossorigin="anonymous"> <!-- Customizable css theme options. Link your own stylesheet or override styles inline. --> <link rel="stylesheet" type="text/css" href="" integrity="" crossorigin="anonymous"> <!-- styles for custom sign in --> <link rel="stylesheet" type="text/css" href="https://id.cisco.com/assets/loginpage/css/custom-signin.a91af2abfd04662e499bd3e151150dbf.css" integrity="sha384-BhMidK4jYIQaVFKNVHUvbfdgrt4NVlnlTZMsOMWLdWkme3j1JcshKDNQiMssd7sN" crossorigin="anonymous"> <style> body { font-family: 'CiscoSans' !important; margin: 2em; font-size: 14px !important; text-align: center; background: #f9f9f9 !important; } h1 { color: #5e5e5e !important; } @keyframes load { 0% { transform: rotate(7deg); } 100% { transform: rotate(360deg); } } /* header, widget, footer */ .container-main { position: absolute; left: 0; right: 0; margin-left: auto; margin-right: auto; width: 100%; padding-top: 30px; } .auth-container { outline: 0 !important; } /* extend white header above widget*/ .language-header { background: #ffffff; width: 400px; height: 58px; margin: 20px auto 0.1px; /* bottom cannot be 0 */ border-radius: 3px 3px 0px 0px; border-style: solid; border-width: 1px; border-color: #ddd; border-bottom: none; } .back-control { display: inline; float: left; margin: 15px 0px 0px 15px; } .icon-chevron-left, .link-back { color: #0175a2; text-decoration: none; cursor: pointer; } /* entire toggle group */ .btn-group { display: inline; float: right; margin: 10px 10px 0px 0px; display: block !important; } .btn-group.open .dropdown-toggle { box-shadow: none; } /* button */ .dropdown-toggle { background: none; border: none; } .dropdown-toggle:focus { box-shadow: 0 0 8px #51cbee !important; -webkit-box-shadow: 0 0 8px #51cbee !important; -moz-box-shadow: 0 0 8px #51cbee !important; padding: 2px; } /* box */ .dropdown-menu { width: 345px; height: 600px; left: -270px; overflow-x: hidden; border-top-color: #41bceb; /* cisco blue top border */ border-top-width: 3px; } .dropdown-menu .divider { display: none; } .dropdown-menu li, a.dropdownListItem { height: 40px; } .password-authenticator--list li { list-style-type: none; padding: 0; /* color:#e34843; */ margin: 0; } .new-style-icon { padding-right: 25px !Important; } .new-style-rule-p-error { margin-left: -10px !Important; color: #e34843; padding-bottom: 12px !Important; } .new-style-rule-p-success { margin-left: -10px !Important; color: #00853c; } a.dropdownListItem { padding-top: 8px !important; color: #6c757d !important; /* 6C757D */ } .dropdown-menu li:hover { background: #f2f2f2 !important; } /* Language code display */ .drop-text { display: inline-block; text-transform: uppercase; float: right; padding-left: 5px; color: #6c757d; /* 6C757D */ } .drop-text-pre, .drop-text-post { padding-left: 3px; } /* globe */ .icon-language { display: inline-block; margin-top: 13%; line-height: 2.5rem !important; font-size: 2.5rem !important; color: #6c757d; /* 6C757D */ } /* logo */ .icon-cisco { font-size: 4.5rem !important; color: #00bceb !important; } .dropdown-toggle:hover .icon-language { color: #00bceb; /* 00bceb */ } .btn-group.open .icon-language { color: #00bceb; /* 00bceb */ } #okta-sign-in { margin-top: 0px !important; border-radius: 0px 0px 3px 3px !important; border-top: none !important; font-family: 'CiscoSans' !important; font-size: 14px !important; } /* adjust space between language-header */ .okta-sign-in-header { font-family: 'cui-font' !important; padding-top: 0px !important; padding-bottom: 15px !important; text-align: center !important; } #okta-login-container { margin-top: 0px !important; } /* title - 'Log in' */ .o-form-head { font-size: 24px !important; font-weight: 400 !important; } .required-fields-label { display: block !important; margin-bottom: 10px !important; } ::placeholder, .required-fields-label, .registerConsent, .registration-label { color: #5E5E5E !important; opacity: 1; } /* Fields focus */ #account-recovery-username:focus, input[name='email']:focus, input[name='password']:focus, input[name='coiFirstName']:focus, input[name='coiLastName']:focus, div.chzn-container.chzn-container-single.chzn-container-active { box-shadow: 0 0 8px #51cbee !important; -webkit-box-shadow: 0 0 8px #51cbee !important; -moz-box-shadow: 0 0 8px #51cbee !important; border-color: #0074b3; } .footer-links { text-align: center; margin-top: 10px; font-size: 13px !important; display: inline; } .footer-links { padding-left: 5px !important; } .footer-links, a.registration-link, a.link { color: #0175a2 !important; } .footer-links a:hover, a.link:hover, a.registration-link:hover { color: #1e4471 !important; } .js-help { padding-left: 10px !important; } .auth-footer { font-size: 14px !important; padding-top: 20px !important; } .auth-footer a { margin-top: 12px !important; } a.link.help.js-help { aria-expanded: true !important; /* Bypassing "Need Help", auto expand options*/ display: none !important; } .footer-info .signup-info { margin-top: 20px !important; margin-bottom: 20px !important; margin-left: 0px !important; } .footer-info .signup-info .signup-link { margin-left: 8px !important; } #help-links-container { display: block !important; padding-left: 10px !important; } .button-primary { background: #0175a2 !important; /* 0175A2 */ border-color: #0175a2 !important; border-radius: 30px !important; font-family: 'CiscoSans' !important; font-size: 16px !important; } .button-primary:focus, .button-primary:active { box-shadow: 0 0 8px #51cbee !important; -webkit-box-shadow: 0 0 8px #51cbee !important; -moz-box-shadow: 0 0 8px #51cbee !important; outline: none ! important; } .o-form-button-bar { border-radius: 30px !important; padding: 0px !important; margin-bottom: 0px !important; } /* registration country dropdown (parent div) */ .o-form-input { float: none !important; width: 100% !important; } /* registration country dropdown */ .chzn-container { font-family: 'CiscoSans' !important; width: 314px !important; float: none !important; text-align: left !important; } /* country label */ .o-form-label { width: 100% !important; } .c-form-label { display: block !important; font-size: 14px !important; font-weight: 600 !important; color: #5e5e5e !important; margin-bottom: 3px !important; } .o-form-fieldset { margin-bottom: 20px !important; } /* input text fields */ input::placeholder, input[type='text'] { font-family: 'CiscoSans' !important; } .mobile-recovery-hint { padding-top: 18px !important; } .c-form-input-error { position: relative; text-align: left; line-height: 18px; font-size: 14px; color: #d93934; z-index: 1; width: 320px; margin: auto; } .input-error-idp { top: -342px; } .input-error-primary { top: -467px; } .error-text { position: relative; display: inline-block; padding-top: 8px !important; padding-left: 20px !important; width: 100%; } .error-text:before { left: 0; margin-top: -3px; } #password-msg { position: relative !important; padding-left: 2px !important; font-weight: 600 !important; } #password-msg:before { left: -20px; } .idp-discovery .o-form-button-bar { margin-top: 10px !important; } .disabled { background: #dfdfdf !important; color: hsl(225, 4%, 78%) !important; pointer-events: none !important; border: none !important; } .okta-dropdown-list { font-family: 'CiscoSans' !important; /* MFA option list */ } .auth-content { margin-top: 20px !important; text-align: left !important; /* MFA beacon blocking content below */ } #okta-sign-in .auth-content { padding: 60px 37px 20px !important; } #okta-sign-in .registration .subschema .subschema-satisfied { color: #00853c !important; } #okta-sign-in .confirm-16:before { color: #00853c !important; } .registerConsent { margin-bottom: 20px !important; font-size: 12px !important; } .registerConsent a { color: #0175a2 !important; } /* Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 10; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ } /* Modal Content/Box */ .modal-content { background-color: #fefefe; margin: 15% auto; /* 15% from the top and centered */ padding: 25px; border: 1px solid #ddd; border-radius: 3px; width: 480px; /* Could be more or less, depending on screen size */ color: #777; } .modal-content .icon-cisco { padding-bottom: 10px !important; } .modal-content .button-primary { color: #fff !important; text-decoration: none !important; padding: 14px 50px; cursor: pointer; } #okta-sign-in .infobox { hyphens: none !important; } /* The Close Button */ .close, .closePipl { float: right; font-size: 28px; font-weight: bold; } .closePipl:hover, .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; } .pipl-desc { margin-bottom: 10px !important; } p[data-i18n="ACCOUNT_UNLOCKED_DESC"] { margin-bottom: 5px !important; } #idp-discovery-submit { margin-bottom: 20px; } /* media queries for responsive design */ @media only screen and (max-width: 667px) { .language-header { width: 400px; } } @media only screen and (min-width: 421px and max-width: 600px) { .language-header { border: none; width: auto; } .chzn-container { width: 100% ! important; } .c-form-input-error { width: 295px; } } @media only screen and (max-width: 420px) { .language-header { border: none; width: auto; } .chzn-container { max-width: 242px; } .c-form-input-error { width: 295px; } } #okta-sign-in.auth-container .duo-totp { background-image: url(../img/icons/mfa/duo@2x.png); } #okta-sign-in .duo-totp-logo { background-image: url(../img/icons/mfa/duo_38x38.png); } </style> <script>(window.BOOMR_mq=window.BOOMR_mq||[]).push(["addVar",{"rua.upush":"false","rua.cpush":"false","rua.upre":"false","rua.cpre":"false","rua.uprl":"false","rua.cprl":"false","rua.cprf":"false","rua.trans":"","rua.cook":"false","rua.ims":"false","rua.ufprl":"false","rua.cfprl":"false","rua.isuxp":"false","rua.texp":"norulematch","rua.ceh":"false","rua.ueh":"false","rua.ieh.st":"0"}]);</script> <script>window.BOOMR_CONSENT_CONFIG={enabled:!0},"true"=="true"&&(window.BOOMR_CONSENT_CONFIG.optInRequired=!0),function(e){"use strict";if(void 0!==e.BOOMR_CONSENT_CONFIG&&!0===e.BOOMR_CONSENT_CONFIG.enabled){e.BOOMR=void 0!==e.BOOMR?e.BOOMR:{};var o=e.BOOMR;if(o.plugins=void 0!==o.plugins?o.plugins:{},!o.plugins.ConsentInlinedPlugin){var O={v:"2",OPT_COOKIE:"BOOMR_CONSENT",OPT_IN_COOKIE_VAL:"opted-in",OPT_OUT_COOKIE_VAL:"opted-out",COOKIE_EXP:365*86400,complete:!1,enabled:!0,firedPageReady:!1,deferredOptIn:!1,deferredOptOut:!1,rtCookieFromConfig:!1,bwCookieFromConfig:!1,optOut:function(){return o.utils.setCookie(O.OPT_COOKIE,O.OPT_OUT_COOKIE_VAL,O.COOKIE_EXP)?("function"==typeof o.disable&&o.disable(),O.complete=!1,O.removeBoomerangCookies(),!0):(o.error("Can not set Opt Out cookie","ConsentInlinedPlugin"),!1)},optIn:function(){return!0===O.complete||(o.utils.setCookie(O.OPT_COOKIE,O.OPT_IN_COOKIE_VAL,O.COOKIE_EXP)?("function"==typeof o.wakeUp&&o.wakeUp(),O.complete=!0,o.addVar("cip.in","1",!0),o.addVar("cip.v",O.v,!0),o.sendBeacon(),!0):(o.error("Can not set Opt In value","ConsentInlinedPlugin"),!1))},removeBoomerangCookies:function(){var e=O.rtCookieFromConfig||"RT",i=O.bwCookieFromConfig||"BA";o.utils.removeCookie(e),o.utils.removeCookie(i)},onPageReady:function(){O.firedPageReady||(O.firedPageReady=!0,O.deferredOptIn&&(O.optIn(),O.deferredOptIn=!1),O.deferredOptOut&&(O.optOut(),O.deferredOptOut=!1))}};e.BOOMR_OPT_OUT=function(){O.firedPageReady?O.optOut():O.deferredOptOut=!0},e.BOOMR_OPT_IN=function(){O.firedPageReady?O.optIn():O.deferredOptIn=!0},o.plugins.ConsentInlinedPlugin={init:function(i){return void 0!==i.RT&&void 0!==i.RT.cookie&&(O.rtCookieFromConfig=i.RT.cookie),void 0!==i.BW&&void 0!==i.BW.cookie&&(O.bwCookieFromConfig=i.BW.cookie),o.subscribe("page_ready",O.onPageReady,null,O),o.subscribe("spa_navigation",O.onPageReady,null,O),e.BOOMR_CONSENT_CONFIG.optInRequired&&o.utils.getCookie(O.OPT_COOKIE)!==O.OPT_IN_COOKIE_VAL?(O.complete=!1,this):o.utils.getCookie(O.OPT_COOKIE)===O.OPT_OUT_COOKIE_VAL?(void 0===i.RT&&(i.RT={}),i.RT.cookie="",void 0===i.BW&&(i.BW={}),i.BW.cookie="",O.complete=!1,this):(O.complete=!0,this)},is_complete:function(){return O.complete}}}}}(window);</script> <script>!function(e){var n="https://s.go-mpulse.net/boomerang/";if("False"=="True")e.BOOMR_config=e.BOOMR_config||{},e.BOOMR_config.PageParams=e.BOOMR_config.PageParams||{},e.BOOMR_config.PageParams.pci=!0,n="https://s2.go-mpulse.net/boomerang/";if(window.BOOMR_API_key="BSM7S-DBE46-8ZZ8T-CHGM7-AM9P9",function(){function e(){if(!o){var e=document.createElement("script");e.id="boomr-scr-as",e.src=window.BOOMR.url,e.async=!0,i.parentNode.appendChild(e),o=!0}}function t(e){o=!0;var n,t,a,r,d=document,O=window;if(window.BOOMR.snippetMethod=e?"if":"i",t=function(e,n){var t=d.createElement("script");t.id=n||"boomr-if-as",t.src=window.BOOMR.url,BOOMR_lstart=(new Date).getTime(),e=e||d.body,e.appendChild(t)},!window.addEventListener&&window.attachEvent&&navigator.userAgent.match(/MSIE [67]\./))return window.BOOMR.snippetMethod="s",void t(i.parentNode,"boomr-async");a=document.createElement("IFRAME"),a.src="about:blank",a.title="",a.role="presentation",a.loading="eager",r=(a.frameElement||a).style,r.width=0,r.height=0,r.border=0,r.display="none",i.parentNode.appendChild(a);try{O=a.contentWindow,d=O.document.open()}catch(_){n=document.domain,a.src="javascript:var d=document.open();d.domain='"+n+"';void(0);",O=a.contentWindow,d=O.document.open()}if(n)d._boomrl=function(){this.domain=n,t()},d.write("<bo"+"dy onload='document._boomrl();'>");else if(O._boomrl=function(){t()},O.addEventListener)O.addEventListener("load",O._boomrl,!1);else if(O.attachEvent)O.attachEvent("onload",O._boomrl);d.close()}function a(e){window.BOOMR_onload=e&&e.timeStamp||(new Date).getTime()}if(!window.BOOMR||!window.BOOMR.version&&!window.BOOMR.snippetExecuted){window.BOOMR=window.BOOMR||{},window.BOOMR.snippetStart=(new Date).getTime(),window.BOOMR.snippetExecuted=!0,window.BOOMR.snippetVersion=12,window.BOOMR.url=n+"BSM7S-DBE46-8ZZ8T-CHGM7-AM9P9";var i=document.currentScript||document.getElementsByTagName("script")[0],o=!1,r=document.createElement("link");if(r.relList&&"function"==typeof r.relList.supports&&r.relList.supports("preload")&&"as"in r)window.BOOMR.snippetMethod="p",r.href=window.BOOMR.url,r.rel="preload",r.as="script",r.addEventListener("load",e),r.addEventListener("error",function(){t(!0)}),setTimeout(function(){if(!o)t(!0)},3e3),BOOMR_lstart=(new Date).getTime(),i.parentNode.appendChild(r);else t(!1);if(window.addEventListener)window.addEventListener("load",a,!1);else if(window.attachEvent)window.attachEvent("onload",a)}}(),"".length>0)if(e&&"performance"in e&&e.performance&&"function"==typeof e.performance.setResourceTimingBufferSize)e.performance.setResourceTimingBufferSize();!function(){if(BOOMR=e.BOOMR||{},BOOMR.plugins=BOOMR.plugins||{},!BOOMR.plugins.AK){var n=""=="true"?1:0,t="",a="bdpnbeqxfaubaz2grxxq-f-34b6cf193-clientnsv4-s.akamaihd.net",i="false"=="true"?2:1,o={"ak.v":"39","ak.cp":"909592","ak.ai":parseInt("691541",10),"ak.ol":"0","ak.cr":1,"ak.ipv":4,"ak.proto":"http/1.1","ak.rid":"6590c4a8","ak.r":39906,"ak.a2":n,"ak.m":"dsca","ak.n":"essl","ak.bpcip":"8.222.208.0","ak.cport":60038,"ak.gh":"23.40.40.12","ak.quicv":"","ak.tlsv":"tls1.2","ak.0rtt":"","ak.0rtt.ed":"","ak.csrc":"-","ak.acc":"reno","ak.t":"1732677103","ak.ak":"hOBiQwZUYzCg5VSAfCLimQ==YoDFHvYVKx5gQFx9AvtkdJ3ePkylOTH+EQvSA1Fp4QxQ/elVDyKAG+ytV+zoan+cjUImUo6CD2tP3V0QCnVk28P77dTkaII5yX5ZKA4B7GLzIIrbIxrhMf6ytqILBi0G3M/rL+zkn2aAjUCoI9eS1RUzmLZnN1NdHx9IC7fwzRv8jXpmbZmLeVe55nShQMAbWPVCaXZThf+UVwexsj5JhGzikSdDKTZUKcyNY4KiI2EGnlq8+PBXB1N89IIg1onU6HTn1ozJPBh96I+73HmxsgH7pmGsezQ65FcQMGjASC+xdyN6iPy7+th3JCeZE6AO/79Awha+trSi9ceBCVEQ/jskGty/0RIVgggm9CU/RTyVOGvz0r9IE7eWdQmyWH3IcA9KfbuTJhLQx6e6SQ9UpGblfS6MIgr5LZ+sEMEJETM=","ak.pv":"47","ak.dpoabenc":"","ak.tf":i};if(""!==t)o["ak.ruds"]=t;var r={i:!1,av:function(n){var t="http.initiator";if(n&&(!n[t]||"spa_hard"===n[t]))o["ak.feo"]=void 0!==e.aFeoApplied?1:0,BOOMR.addVar(o)},rv:function(){var e=["ak.bpcip","ak.cport","ak.cr","ak.csrc","ak.gh","ak.ipv","ak.m","ak.n","ak.ol","ak.proto","ak.quicv","ak.tlsv","ak.0rtt","ak.0rtt.ed","ak.r","ak.acc","ak.t","ak.tf"];BOOMR.removeVar(e)}};BOOMR.plugins.AK={akVars:o,akDNSPreFetchDomain:a,init:function(){if(!r.i){var e=BOOMR.subscribe;e("before_beacon",r.av,null,null),e("onbeacon",r.rv,null,null),r.i=!0}return this},is_complete:function(){return!0}}}}()}(window);</script></head> <body> <!-- <div id="login-bg-image-id" class="login-bg-image tb--background"></div> --> <div class="container-main"> <div class="container-form"> <div class="language-header"> <div id="back" class="back-control" tabindex="0"> <a onclick="routeBack()"> <span class="icon-chevron-left" title="Back"></span> <span data-i18n="LINK_BACK" class="link-back">Back</span> </a> </div> <div class="btn-group"> <button class="dropdown-toggle" type="button" data-toggle="dropdown" tabindex="0"> <span class="icon-language" title="Language"></span> <div class="drop-text"> <span class="drop-text-pre">US</span> <br /> <span class="drop-text-post">EN</span> </div> </button> <div class="dropdown-menu scrollable-menu"></div> </div> </div> <div id="okta-login-container"></div> <div class="loader" style="position: relative; visibility: visible;width: 64px;height: 64px;border-radius: 100%;border: 3px solid #f3f3f3;border-left-color: #41bceb;animation: load 1.1s infinite linear;margin: 20% auto;"> </div> <!-- fed reg modal --> <div id="fedModal" class="modal" tabindex="-1"> <!-- Modal content --> <div class="modal-content"> <span id="close-fed" class="close" title="Close" tabindex="0">×</span> <div style="text-align: center;"> <span class="icon-cisco" title="Cisco Logo"></span> </div> <div style="padding: 20px; text-align: left;"> <p data-i18n="FED_REG_MSG_1">Your email address belongs to an organization that also manages your Cisco account login.</p> <p data-i18n="FED_REG_MSG_2">Log in to your organization to also log in to Cisco.</p> </div> <div style="text-align: center; padding: 20px;"> <a id="modalButton" class="button-primary" tabindex="0" data-i18n="FED_REG_BUTTON"> Organization Log In </a> </div> </div> </div> <!-- pipl reg modal --> <div id="piplModal" class="modal" tabindex="-1"> <!-- Modal content --> <div class="modal-content"> <span id="close-pipl" class="closePipl" tabindex="0">×</span> <div style="text-align: center;"> <span class="icon-cisco" title="Cisco Logo"></span> </div> <div style="padding: 20px; text-align: left;"> <p id="piplMsg">Description here</p> </div> </div> </div> </div> <a class="footer-links support-link" data-i18n="LINK_SUPPORT_CASE" href="mailto:web-help@cisco.com" target="_blank" tabindex="0">Contact Support</a> <a class="footer-links privacy-link" data-i18n="LINK_PRIVACY_STATEMENT" href="https://www.cisco.com/c/en/us/about/legal/privacy-full.html" target="_blank" tabindex="0">Privacy</a> <a class="footer-links" data-i18n="LINK_TERMS" href="https://www.cisco.com/c/en/us/about/legal/terms-conditions.html" target="_blank" tabindex="0">Terms & Conditions</a> <a class="footer-links" data-i18n="LINK_COOKIES_POLICY" href="https://www.cisco.com/c/en/us/about/legal/privacy-full.html#cookies" target="_blank" tabindex="0">Cookies</a> <a class="footer-links" data-i18n="LINK_TRADEMARKS" href="http://www.cisco.com/web/siteassets/legal/trademark.html" target="_blank" tabindex="0">Trademarks</a> <a class="footer-links icp-link" href="http://beian.miit.gov.cn" target="_blank" tabindex="0">京ICP备05085544号-1</a> </div> <!-- "OktaUtil" defines a global OktaUtil object that contains methods used to complete the Okta login flow. --> <div id="okta-sign-in" class="auth-container main-container unsupported-message-container" style="display:none"> <div id="unsupported-cookie" class="unsupported-message" style="display:none"> <h2 class="o-form-head">Cookies are required</h2> <p>Cookies are disabled on your browser. Please enable Cookies and refresh this page.</p> <a class="button button-primary" target="_blank" href="."> Refresh </a> </div> </div> <div id="inactive-tab-main-div" style="display:none;"> <div class="inactive-tab-container"> <div class="inactive-tab-header"> <img src="https://id.cisco.com/fs/bco/1/fs0a411g73DFKaj7K5d7" alt="Cisco Identity" class="report-org-logo"> <div class="divider"></div> </div> <div class="inactive-tab-content"> <h2 class="inactive-tab-content-title">The page has timed out</h2> <p class="inactive-tab-details">If this page does not reload automatically, please refresh your browser.</p> </div> </div> </div> <script type="text/javascript" nonce=""> var signInSuccessCallBackFunction; var oktaData = {"redirectUri":"https\x3A\x2F\x2Fid.cisco.com\x2Foauth2\x2Fdefault\x2Fv1\x2Fauthorize\x3Fresponse_type\x3Dcode\x26scope\x3Dopenid\x2520email\x2520profile\x26client_id\x3D47cfee3d\x2D3d18\x2D443c\x2D86de\x2D74ff2af89cd4\x26state\x3D5mwW65FRgecn5SM2uwQudhvA9Ao\x26redirect_uri\x3Dhttps\x253A\x252F\x252Fwww.cisco.com\x252Fc\x252Fsso\x252Faction.html\x26nonce\x3Djmk_WBT1yC_KW1iP62u75L6nb4r6jaELuiT1kO38iOs","isMobileSso":false,"fromUri":"","isMobileClientLogin":false,"requestContext":{"app":{"type":"object","value":{"name":"oidc_client","label":"WEMProdPublishOktaApplication","id":"0oaa29lg67ckLAd7A5d7"}},"authentication":{"request":{"max_age":-1,"scope":"openid\x20email\x20profile","display":"page","response_type":"code","redirect_uri":"https\x3A\x2F\x2Fwww.cisco.com\x2Fc\x2Fsso\x2Faction.html","state":"5mwW65FRgecn5SM2uwQudhvA9Ao","nonce":"jmk_WBT1yC_KW1iP62u75L6nb4r6jaELuiT1kO38iOs","response_mode":"query"},"protocol":{},"client":{"name":"oidc_client","label":"WEMProdPublishOktaApplication","id":"0oaa29lg67ckLAd7A5d7"},"type":"object","value":{"request":{"max_age":-1,"scope":"openid\x20email\x20profile","display":"page","response_type":"code","redirect_uri":"https\x3A\x2F\x2Fwww.cisco.com\x2Fc\x2Fsso\x2Faction.html","state":"5mwW65FRgecn5SM2uwQudhvA9Ao","nonce":"jmk_WBT1yC_KW1iP62u75L6nb4r6jaELuiT1kO38iOs","response_mode":"query"},"protocol":{},"issuer":{"name":"default","id":"ausk0smx3nPeljgtL5d5","uri":"https\x3A\x2F\x2Fid.cisco.com\x2Foauth2\x2Fdefault"}},"issuer":{"name":"default","id":"ausk0smx3nPeljgtL5d5","uri":"https\x3A\x2F\x2Fid.cisco.com\x2Foauth2\x2Fdefault"}},"target":{"clientId":"47cfee3d-3d18-443c-86de-74ff2af89cd4","name":"oidc_client","label":"WEMProdPublishOktaApplication"}},"countryIso":"SG","inactiveTab":{"elementId":"inactive\x2Dtab\x2Dmain\x2Ddiv","avoidPageRefresh":true,"enabled":true},"signIn":{"logoText":"Cisco\x20Identity\x20logo","brandName":"Cisco\x20Identity","language":"en","consent":{"cancel":function(){window.location.href='https\x3A\x2F\x2Fid.cisco.com\x2Flogin\x2Ftoken\x2Fredirect\x3FstateToken\x3DeyJ6aXAiOiJERUYiLCJhbGlhcyI6ImVuY3J5cHRpb25rZXkiLCJ2ZXIiOiIxIiwib2lkIjoiMDBvazB5c3hkaVdkY1ROVFY1ZDUiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..TPbZXuQKdnq3dKnt.CLVXVO_nuDaGwwFAxcnrlW6kbUKJSmbcfhK_Hf728Qqn\x2DyKnNX4MX88n1iYqSCuG06pJ4EIUQNgqHoUlKgcuCnkD4We5gBTqr7gOzQfT6SSVpmHHo65UdwAVQmNh9S74IhnxYc1N2t3U3gcf2QsK6hfsnWSrCAeh7QJHNwrJRfRzrk09DJHAoSrrid5WoAyedyrCW7qdajU\x2DSPTzw7z1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jlCp_izC9_Hd1KnSzda5hHBrUlbo583D83Thliv\x2DunB1UfZLNlFrN8zOmrO6jQl70lXDxU2HKlZxxZz6waEoWfQVMvh\x2DHOrsg7RF7qZL41pfOsObNTs\x2DOWzejnIzY2udCdk13zqivLfo_qLCtoVo4GPSI4EpkofvV6nKsHjSpCe_7wXLp_brDPoY1kPXc27EtZk_NFiMUB5bUtFsMAr95J2kv7jBhnHgIISMJDfEFzwnYWMZRWAh3ns1J5IEsiQUEqfE6s6GRWufBV2oDTk_ES9aibezW4bXgd3y\x2Dph1nO5\x2DQv4ix1cVJWNwDKJvw3KjiT0cWqBrYFtagJvhpYpH8Y0H\x2DZ_Akwt7zyPWMj2zMG1jgjrBwAtzxlKlqXdzIj0GpDQsC5Tf3OAqtudWWjw4X7XcVLyN1NYJNM_0XvFVuPFJIlWXduS3w6WfLD1ax3q8jZxbr8_TIAfkzt8NbMtduGCuUFmEXBK6j8X6HMcuEnxdHZK3mEi12go6YyhDO_npn7wNCI1QGmiyrwM8s6VWAWoyi0rTt6dGl6sQ6JTk1.UCEIyikj5ps\x2DQV27MUGxLA';}},"i18n":{"en":{"mfa.challenge.password.placeholder":"Password","help":"Help","password.forgot.email.or.username.tooltip":"Email","needhelp":"Need\x20help\x20signing\x20in\x3F","primaryauth.username.placeholder":"Email","password.forgot.email.or.username.placeholder":"Email","account.unlock.email.or.username.tooltip":"Email","unlockaccount":"Unlock\x20account\x3F","account.unlock.email.or.username.placeholder":"Email","primaryauth.password.placeholder":"Password","primaryauth.title":"Log\x20In","forgotpassword":"Forgot\x20password\x3F"}},"features":{"hideSignOutLinkInMFA":false,"emailRecovery":true,"deviceFingerprinting":true,"showIdentifier":true,"consent":true,"useDeviceFingerprintForSecurityImage":true,"customExpiredPassword":true,"router":true,"showPasswordToggleOnSignInPage":true,"securityImage":false,"autoPush":true,"smsRecovery":true,"idpDiscovery":false,"selfServiceUnlock":true,"webauthn":true,"passwordlessAuth":true,"showPasswordRequirementsAsHtmlList":true,"registration":false,"rememberMe":true,"callRecovery":false,"multiOptionalFactorEnroll":true},"baseUrl":"https\x3A\x2F\x2Fid.cisco.com","assets":{"baseUrl":"https\x3A\x2F\x2Fid.cisco.com\x2Fassets\x2Fjs\x2Fsdk\x2Fokta\x2Dsignin\x2Dwidget\x2F7.25.0"},"customButtons":[],"idpDiscovery":{"requestContext":"eyJ6aXAiOiJERUYiLCJhbGlhcyI6ImVuY3J5cHRpb25rZXkiLCJ2ZXIiOiIxIiwib2lkIjoiMDBvazB5c3hkaVdkY1ROVFY1ZDUiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..TPbZXuQKdnq3dKnt.CLVXVO_nuDaGwwFAxcnrlW6kbUKJSmbcfhK_Hf728Qqn\x2DyKnNX4MX88n1iYqSCuG06pJ4EIUQNgqHoUlKgcuCnkD4We5gBTqr7gOzQfT6SSVpmHHo65UdwAVQmNh9S74IhnxYc1N2t3U3gcf2QsK6hfsnWSrCAeh7QJHNwrJRfRzrk09DJHAoSrrid5WoAyedyrCW7qdajU\x2DSPTzw7z1IDMnkNTJxNV3tIJEpzHlL6PKFkXCojYjb4p3MP439SJmlJBgOkDEF_DwEqjsL_diySeF2nGI\x2DDio969U7UNOhuwn0Yc52GVg\x2Dajk7_2XFuxYu9x\x2DdKf\x2D5PwSo\x2D333\x2DNJM9qM6x7hzFGDcmTpWcZaiHgGRZ8yG62ijOisdmhcnIxqYZYA7w2V_JMhlNE5UUVoW97pisfo\x2Dyyy39rMsAjLtkFcOa6vDla0_2NTgdHo_DdMCkO\x2DGUuY9m5LCIsGtWpcXOZvzNNpsFx3LyWQA4PEc7Lo3wGkWhWC_KhGOscEJTJTKCfIwdlE1UnoOE1FmyGYf5wqZ08KFDNl_Cc2SwFYiuR_cx3H4BWh24KkN6yX6YnHN2y4nLl2VTkpstKQcZqFBAHdVSnoXtxgxFnG3tPx1iY3Z5iB9DtmrcfC44oLHxanRfz4bpH4mpNPU1Kaz97OPlKa\x2Dbl\x2DcMwQ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dHZK3mEi12go6YyhDO_npn7wNCI1QGmiyrwM8s6VWAWoyi0rTt6dGl6sQ6JTk1.UCEIyikj5ps\x2DQV27MUGxLA","helpLinks":{"factorPage":{"text":"Forgot\x20password\x3F","href":"https\x3A\x2F\x2Fid.cisco.com\x2Fsignin\x2Fforgot\x2Dpassword"},"help":"https\x3A\x2F\x2Fwww.cisco.com\x2Fc\x2Fen\x2Fus\x2Fabout\x2Fhelp\x2Flogin\x2Daccount\x2Dhelp.html","forgotPassword":"","unlock":"","custom":[]},"piv":{}},"accountChooserDiscoveryUrl":"https\x3A\x2F\x2Flogin.okta.com\x2Fdiscovery\x2Fiframe.html"}; var runLoginPage = function(fn) { var mainScript = document.createElement('script'); mainScript.src = "https://id.cisco.com/assets/js/mvc/loginpage/initLoginPage.pack.58de3be0c9b511a0fdfd7ea4f69b56fc.js"; mainScript.integrity = "sha384-cJ4LGViZBmIttMPH+ao2RyPuN5BztKWYWIa4smbm56r1cUhkU/Dr6vTS3UoPbKTI"; mainScript.crossOrigin = "anonymous"; document.getElementsByTagName('head')[0].appendChild(mainScript); fn && mainScript.addEventListener('load', function () { setTimeout(fn, 1) }); }; var OktaUtil = { _addClass: function(el, className) { if(el) { var elementClasses = el.className.split(" "); if (elementClasses.indexOf(className) == -1) { el.className += " " + className; } } }, _removeElement: function(el) { if(el) { el.parentNode.removeChild(el); } }, _hideElement: function(el) { if(el) { el.style.display = 'none'; } }, _isDocumentVisible: function() { return document.visibilityState === 'visible'; }, addLoginContainerClass: function () { this._addClass(document.getElementById('okta-login-container'), 'login-container'); }, showUnsupportedCookieWarning: function () { document.getElementById('okta-sign-in').removeAttribute('style'); document.getElementById('unsupported-cookie').removeAttribute('style'); }, removeUnsupportedCookieWarning: function () { this._removeElement(document.getElementById('okta-sign-in')); }, hideOktaLoginContainer: function () { this._hideElement(document.getElementById('okta-login-container')); }, isChromeOs: function () { return /\bCrOS\b/.test(navigator.userAgent); }, addChromeOSScript: function() { var chromeOSScript = document.createElement('script'); chromeOSScript.src = "/js/google/users-1.0.js"; document.getElementsByTagName('head')[0].appendChild(chromeOSScript); }, getSignInWidgetConfig: function () { if (oktaData.inactiveTab && oktaData.inactiveTab.enabled && !this._isDocumentVisible() && !oktaData.inactiveTab.avoidPageRefresh) { // Show a loading state and wait for the visibility event this.hideOktaLoginContainer(); // remove stateToken so SIW does not attempt a login flow oktaData.signIn.stateToken = undefined; } return oktaData.signIn; }, completeLogin: function (res) { signInSuccessCallBackFunction(res); }, getRequestContext: function () { return oktaData.requestContext; }, setRedirectUri: function (uri) { oktaData.redirectUri = uri; }, init: function () { if (!navigator.cookieEnabled) { this.showUnsupportedCookieWarning(); this.hideOktaLoginContainer(); } else { this.removeUnsupportedCookieWarning(); if (oktaData.inactiveTab && oktaData.inactiveTab.enabled && !this._isDocumentVisible()) { try { oktaData.inactiveTab.renderFnBackup = OktaSignIn.prototype.renderEl; } catch (err) { // no op - graceful handling OktaSignIn undefined case } // pause render sign-in widget when browser tab is inactive if (!oktaData.inactiveTab.renderFnBackup) { // for older SIW, renderFnBackup is undefined, fallback to full page reload oktaData.inactiveTab.fallbackFullPageReload = true; // Show a loading state and wait for the visibility event this.hideOktaLoginContainer(); // remove stateToken so SIW does not attempt a login flow oktaData.signIn.stateToken = undefined; } else { // for newer SIW, override renderEl function so SIW does not attempt a login flow OktaSignIn.prototype.renderEl = function () { oktaData.inactiveTab.renderArgsBackup = arguments; oktaData.inactiveTab.signInInstance = this; try { return new Promise(function (resolve, reject) { oktaData.inactiveTab.renderResolve = resolve; oktaData.inactiveTab.renderReject = reject; }); } catch (err) { // return nothing if promise is not supported, since promise chaining won't work anyway } } } // event handler to resume render sign-in widget document.addEventListener('visibilitychange', function checkVisibilityAndCallSuccess() { if (document.visibilityState === 'visible') { try { document.removeEventListener('visibilitychange', checkVisibilityAndCallSuccess); const inactiveTabDiv = document.getElementById(oktaData.inactiveTab.elementId); inactiveTabDiv.style.display = 'none'; // resume render sign-in widget if (oktaData.inactiveTab.renderFnBackup && oktaData.inactiveTab.renderArgsBackup) { OktaSignIn.prototype.renderEl = oktaData.inactiveTab.renderFnBackup; var result = oktaData.inactiveTab.signInInstance.renderEl.apply(oktaData.inactiveTab.signInInstance, oktaData.inactiveTab.renderArgsBackup); if (result && result.then) { result.then(oktaData.inactiveTab.renderResolve, oktaData.inactiveTab.renderReject); } } } catch (err) { oktaData.inactiveTab.fallbackFullPageReload = true; } if (oktaData.inactiveTab.fallbackFullPageReload) { location.reload(); } } }); } // add class if app login banner is present if (oktaData.isAppBannerVisible) { this.addLoginContainerClass(); } oktaData.isCustomSignIn = true; oktaData.hasChromeOSFeature = this.isChromeOs(); if (oktaData.hasChromeOSFeature) { this.addChromeOSScript(); } runLoginPage(function () { var res = OktaLogin.initLoginPage(oktaData); oktaData.signIn = res.signIn; signInSuccessCallBackFunction = res.signInSuccessCallbackFn; }); } } }; OktaUtil.init(); //# sourceURL=OktaUtil.js </script> <script> "use strict"; // "config" object contains default widget configuration // with any custom overrides defined in your admin settings. var config = OktaUtil.getSignInWidgetConfig(); var userId = ''; // new change var radioVal; // new change var iosQRCode = ""; var androidQRCode = ""; var nameRegex = /^[a-zA-Z \-_.']+$/; var cxMobileAppsArray = ['0oa11zmvo9aCSISNj1d7', '0oa11fpsjbnXzEp0S1d7']; var globalContext = {}; var emailReg = /^(?:[a-zA-Z0-9!#'$%&*+/=?^_{|}-]+(?:\.[a-zA-Z0-9!#'$%&*+/=?^_{|}-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]?[a-zA-Z0-9])+|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/; var isMobile = { Android: function Android() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function BlackBerry() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function iOS() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, Opera: function Opera() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function Windows() { return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i); }, any: function any() { return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows(); } }; function detectIE() { var ua = window.navigator.userAgent; var msie = ua.indexOf('MSIE '); if (msie > 0) { // IE 10 or older => return version number return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); } var trident = ua.indexOf('Trident/'); if (trident > 0) { // IE 11 => return version number var rv = ua.indexOf('rv:'); return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); } var edge = ua.indexOf('Edge/'); if (edge > 0) { // Edge (IE 12+) => return version number return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); } // other browser return false; } var validPassword = false; var isDuoEnrolled = false; var contentPaths = { "https://id.cisco.com": { env: "id", pfb2bid: "0oajoqdwjYF1CdGJv5d6", serviceBaseUrl: "https://apps-id.cisco.com", factorProfileIdDUO: "autfttpv2pe3aeTFl5d7" }, "https://int-id.cisco.com": { env: "int", pfb2bid: "0oa9f84pnK5Uz2eOI1d6", serviceBaseUrl: "https://int-apps-id.cisco.com", factorProfileIdDUO: "autc9pfjd9qfiA9Bz1d7" }, "https://stg-id.cisco.com": { env: "stage", pfb2bid: "0oa9f5dgwy0x0KDc51d6", serviceBaseUrl: "https://stg-apps-id.cisco.com", factorProfileIdDUO: "autbiz7eow6mOxS4x1d7", socialLogin: { google: "0oa3mboj5er5hRxXR1d7", linkedIn: "0oabrolramtZN9BGp1d7" } }, "https://dev-id.cisco.com": { env: "dev", pfb2bid: "0oa6pn4oa8r0oLmJZ1d6", serviceBaseUrl: "https://dev-apps-id.cisco.com", factorProfileIdDUO: "fprf12al6rkTiINA01d6", socialLogin: { google: "0oa3m1ei6pMgKmeIJ1d7", linkedIn: "0oa3nmmya6abkjoxy1d7", github: "0oa3pr1z6mknRzFGC1d7" } }, "https://dev-oie-id.cisco.com": { env: "oie-dev", pfb2bid: "", serviceBaseUrl: "https://dev-oie-apps-id.cisco.com", factorProfileIdDUO: "fpr7juguu6MEybrex1d7", socialLogin: { google: "0oa3m1ei6pMgKmeIJ1d7", linkedIn: "0oa3nmmya6abkjoxy1d7", github: "0oa3pr1z6mknRzFGC1d7" } } }; var base_content_url = config.baseUrl + "/widget-content/" + contentPaths[config.baseUrl]["env"] + "/"; var docTitleMap = { "idp-discovery": "TITLE_LOGIN", "primary-auth": "TITLE_LOGIN", registration: "TITLE_REGISTER", "registration-complete": "TITLE_REGISTER_COMPLETE", "forgot-password": "TITLE_FORGOT_PASSWORD", "mfa-verify": "TITLE_MFA", "password-reset-email-sent": "TITLE_EMAIL_SENT", "password-reset": "TITLE_PASSWORD_RESET", "enroll-profile": "TITLE_REGISTER", "enroll-email": "TITLE_REGISTER_COMPLETE", "mfa-verify-password": "TITLE_LOGIN" }; /* Language dictionary for dropdown */ var lang_dict = { "zh-CN": "Chinese (PRC) - 简体中文", "zh-TW": "Chinese (Taiwan) - 繁體中文", cs: "Czech - Čeština", en: "English (US)", fr: "French (France) - Français", de: "German (Germany) - Deutsch", it: "Italian - Italiano", ja: "Japanese - 日本語", ko: "Korean - 한국어", pl: "Polish - Polski", "pt-BR": "Portuguese (Brazil) - Português", ru: "Russian - Pу́сский", es: "Spanish (Spain) - Español", th: "Thai - ภาษาไทย", tr: "Turkish - Türkçe", vi: "Vietnamese - Tiếng Việt" }; function sanitizeLocale(locale) { switch (locale) { case "zh_CN": case "zh-CN": case "zh-cn": return ["zh", "CN"]; case "zh_TW": case "zh-TW": case "zh-tw": return ["zh", "TW"]; case "cs_CZ": case "cs-CZ": case "cs-cz": case "cs": return ["cs", "CZ"]; case "de_DE": case "de-DE": case "de-de": case "de": return ["de", "DE"]; case "es_ES": case "es-ES": case "es-es": case "es": return ["es", "ES"]; case "fr_FR": case "fr-FR": case "fr-fr": case "fr": return ["fr", "FR"]; case "it_IT": case "it-IT": case "it-it": case "it": return ["it", "IT"]; case "ja_JP": case "ja-JP": case "ja-jp": case "ja": return ["ja", "JP"]; case "ko_KR": case "ko-KR": case "ko-kr": case "ko": return ["ko", "KR"]; case "pt_BR": case "pt-BR": case "pt-br": case "pt": return ["pt", "BR"]; case "pl_PL": case "pl-PL": case "pl-pl": case "pl": return ["pl", "PL"]; case "ru_RU": case "ru-RU": case "ru-ru": case "ru": return ["ru", "RU"]; case "th_TH": case "th-TH": case "th-th": case "th": return ["th", "TH"]; case "tr_TR": case "tr-TR": case "tr-tr": case "tr": return ["tr", "TR"]; case "vi_VN": case "vi-VN": case "vi-vn": case "vi": return ["vi", "VN"]; case "en_US": case "en-US": case "en-us": case "en": default: return ["en", "US"]; } } if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = true; } function customRememberMe() { if (document.querySelector('.custom-checkbox')) { document.querySelector('.custom-checkbox').style.display = 'none'; } if (document.querySelector('#idp-discovery-username')) { if (document.querySelector('#idp-discovery-username').value !== '') { if (document.querySelector('#idp-discovery-username').value.indexOf('@cisco.com') > -1 && config.features.rememberMe === true) { document.querySelector('.custom-checkbox').style.display = 'block'; } } document.querySelector('#idp-discovery-username').addEventListener('keyup', function (e) { if (e.target.value.indexOf('@cisco.com') > -1) { document.querySelector('.custom-checkbox').style.display = 'block'; } else { document.querySelector('.custom-checkbox').style.display = 'none'; } }); } } var clientSocialOptions = {}; function socialClientIdentifier(clientId) { if (document.getElementsByClassName('primary-auth-container')[0]) { if (document.getElementsByClassName('primary-auth-container')[0].childNodes.length > 0) { document.getElementsByClassName('primary-auth-container')[0].style.display = 'none'; } } var options = { method: "get", url: contentPaths[config.baseUrl]["serviceBaseUrl"] + "/clients/api/v1/identifier/client?id=" + clientId, headers: { "Content-Type": "application/json", "Accept": "application/json" } }; var result = axios(options).then(function (response) { var clientResponse = response.data; clientSocialOptions['valid'] = clientResponse.response[0]['valid']; clientSocialOptions['options'] = clientResponse.response[0]['options']; if (document.getElementsByClassName('sign-in-with-idp')[0]) { document.getElementsByClassName('sign-in-with-idp')[0].style.display = 'none'; } setTimeout(function () { showSLOptions(clientResponse.response[0]['valid'], clientResponse.response[0]['options']); }, 1000); })["catch"](function (error) { console.log(error); }); } var socialIdps = contentPaths[config.baseUrl]["socialLogin"]; var context = OktaUtil.getRequestContext(); if (context) { console.log(' app-context ', context); if (context.authentication && context.authentication.request && context.authentication.request['redirect_uri']) { var redirctURI = context.authentication.request['redirect_uri']; sessionStorage.setItem('redirectTo', "https://" + redirctURI.split("//")[1].split("/")[0]); } else if (location.href.indexOf('fromURI') > -1) { sessionStorage.setItem('redirectTo', decodeURIComponent(location.href.split('fromURI=')[1])); } else { sessionStorage.setItem('redirectTo', location.href); } if (context && context.target && context.target.clientId) { if (cxMobileAppsArray.includes(context.target.clientId) && isMobile.any()) { if (document.querySelector('.content-container')) { document.querySelector('.content-container').style.display = 'none'; } } // config.idps = [ // { type: 'GOOGLE', id: socialIdps['google']}, // { type:'LINKEDIN', id: socialIdps['linkedIn']} // ] // config.idpDisplay ="SECONDARY"; socialClientIdentifier(context.target.clientId); } } config.i18n = { en: { "primaryauth.title": "Log in", "primaryauth.submit": "Log in", "primaryauth.username.placeholder": "Email", "primaryauth.username.tooltip": "Email", "password.forgot.email.or.username.placeholder": "Email", "password.forgot.email.or.username.tooltip": "Email", backToSignin: "Back to log in", goback: "Back to log in", // reset password "errors.E0000004": "We can't log you in. Please check for an email from us or try again." } }; function handleFormSubmitError() { var formObserver = new MutationObserver(function (mutationsList) {}); formObserver.observe(document.querySelector('#invalid-email-error-container'), { attributes: true, childList: true, subtree: true }); } function inviteWithFromURI(){ var urlParams = new URLSearchParams(window.location.search); if(urlParams.has('fromURI') && urlParams.get('fromURI') != undefined){ if(document.querySelector('.infobox-error')){ var errorDesc = document.querySelector('.infobox-error').childNodes[1].innerText; if(errorDesc.indexOf('GLOBAL_ORG_APP') > -1){ document.querySelector('.o-form-error-container').style.display = 'none'; location.href = urlParams.get('fromURI') } } } } function preSubmitCheckings(postData, onSuccess, onFailure, context){ var consentValid = false; var piplFields = ['userProfile.terms_of_service', 'userProfile.collect_PI', 'userProfile.transfer_PICisco', 'userProfile.transfer_PIChina']; for (var i = 0; i < piplFields.length; i++) { var piplField = document.getElementsByName(piplFields[i])[0]; var getPiplField = piplFields[i].split('.')[1]; if (piplField.value === 'true') { postData.userProfile[getPiplField] = 'true'; } else { postData.userProfile[getPiplField] = 'false'; } } consentValid = postData.userProfile.terms_of_service == 'true' && postData.userProfile.collect_PI == 'true' && postData.userProfile.transfer_PICisco == 'true' && postData.userProfile.transfer_PIChina == 'true'; if (postData.userProfile.coiCountry === 'CN' && !consentValid) { var fieldErrors = []; piplFields.forEach(function (fieldName) { var getPiplFieldName = fieldName.split('.')[1]; if (postData.userProfile[getPiplFieldName] !== 'true') { fieldErrors.push({ "errorSummary": $.i18n('PIPL_FIELD_ERROR'), "reason": "registration.error." + fieldName, "resource": "User", "property": fieldName, //should match field name "arguments": [] }); setTimeout(function () { if(context === 'progressive'){ $(".button-primary").val($.i18n('PP_UPDATE_BTN_LABEL')); }else{ $(".button-primary").val($.i18n('TITLE_REGISTER')); } }, 10); } }); var error = { "errorSummary": "API Error", "errorCauses": fieldErrors }; onFailure(error); } else { if (postData.userProfile.coiCountry !== 'CN') { postData.userProfile.terms_of_service = undefined; postData.userProfile.collect_PI = undefined; postData.userProfile.transfer_PICisco = undefined; postData.userProfile.transfer_PIChina = undefined; } try { onSuccess(postData); try { setTimeout(function () { if(context === 'progressive'){ $(".button-primary").val($.i18n('PP_UPDATE_BTN_LABEL')); }else{ $(".button-primary").val($.i18n('TITLE_REGISTER')); } inviteWithFromURI(); }, 1500); } catch (err) { } } catch (err) {} } } var userEmail = ""; config.registration = { parseSchema: function parseSchema(schema, onSuccess, onFailure) { if (schema && schema.profileSchema && schema.profileSchema.properties && schema.profileSchema.properties.password && Array.isArray(schema.profileSchema.properties.password.allOf)) { var passwordRules = schema.profileSchema.properties.password.allOf; passwordRules.forEach(function (rule) { if (typeof rule.minLength === "number" && config.i18n[userLang].minLength) { rule.description = config.i18n[userLang].minLength; } else if (rule.format) { if (rule.format == /^[#/userName]/) { rule.description = config.i18n[userLang][rule.format.replace(/^\/|\/$/g, "")]; } else { rule.description = config.i18n[userLang][rule.format]; } } }); } onSuccess(schema); }, preSubmit: function preSubmit(postData, onSuccess, onFailure) { ////// progressive profling //////// if (globalContext && globalContext.controller === 'registration' && globalContext.formName === 'enroll-profile') { var ppFirstNameField,ppLastNameField if(document.getElementsByName('userProfile.coiFirstName')[0] != undefined){ ppFirstNameField = document.getElementsByName('userProfile.coiFirstName')[0]; if(!nameRegex.test(ppFirstNameField.value)){ return }else{ if(document.getElementsByName('userProfile.firstName')[0] != undefined){ postData.userProfile.firstName = ppFirstNameField.value; } } } if(document.getElementsByName('userProfile.coiLastName')[0] != undefined){ ppLastNameField = document.getElementsByName('userProfile.coiLastName')[0]; if(!nameRegex.test(ppLastNameField.value)){ return }else{ if(document.getElementsByName('userProfile.lastName')[0] != undefined){ postData.userProfile.lastName = ppLastNameField.value; } } } preSubmitCheckings(postData, onSuccess, onFailure, "progressive"); return; } $(".button-primary").val(''); var firstNameField = document.getElementsByName('userProfile.coiFirstName')[0]; var lastNameField = document.getElementsByName('userProfile.coiLastName')[0]; if (!nameRegex.test(firstNameField.value) || !nameRegex.test(lastNameField.value)) { $(".button-primary").val($.i18n('TITLE_REGISTER')); return; } if (!passwordValidator()) { $(window).scrollTop(0); $(".button-primary").val($.i18n('TITLE_REGISTER')); return; } if (!emailReg.test(postData.userProfile['email']) || postData.userProfile['email'] == '') { $(window).scrollTop(0); $(".button-primary").val($.i18n('TITLE_REGISTER')); return; } ; postData.coiCountry = postData.coiCountry != "NULL" ? postData.coiCountry : ""; // force error message if not selected var localeArray = sanitizeLocale(userLang); postData.userProfile.locale = localeArray[0] + "_" + localeArray[1]; postData.userProfile.firstName = postData.userProfile.coiFirstName; postData.userProfile.lastName = postData.userProfile.coiLastName; // check PIPL compliance preSubmitCheckings(postData, onSuccess, onFailure, "registration"); }, postSubmit: function postSubmit(response, onSuccess, onFailure) { userEmail = response; onSuccess(response); } }; /* Bookmark app workaround for password sync * Ignores fromURI (activation email) if coming from federated app */ if (!config.relayState) { config.relayState = "/user/notifications"; } /* Okta flow start */ clearPingCookie(); showScreenSpinner(true); var userLang = getLocaleLang(); var oktaSignIn = {}; initToggle(); getWidgetContent(); function getLocaleLang() { var window_url = window.location.href; var urlParams = new URLSearchParams(window.location.search); var localeArray = ["en", "US"]; if (findCookie("pm_locale")) { localeArray = sanitizeLocale(findCookie("pm_locale")); } else if (findStorage("oneid_locale")) { localeArray = sanitizeLocale(findStorage("oneid_locale")); } else if (urlParams.has('locale')) { var langCode = urlParams.get('locale'); localeArray = sanitizeLocale(langCode); } else if (findCookie("oneid_locale")) { localeArray = sanitizeLocale(findCookie("oneid_locale")); } else if (findBrowserLocale()) { localeArray = sanitizeLocale(findBrowserLocale()); } var o_form = localeArray[0] + "-" + localeArray[1]; if (["zh-CN", "zh-TW", "pt-BR"].includes(o_form)) return o_form; return localeArray[0]; } function findStorage(key) { var localeFromStorage = localStorage.getItem(key); if (!localeFromStorage) return null; return localeFromStorage; } function findCookie(cookie_key) { var cookieArr = document.cookie.split(";"); var obj = {}; cookieArr.forEach(function (i) { var arr = i.split("="); obj[arr[0].trim()] = arr[1]; }); var cookie_val = obj[cookie_key]; if (!cookie_val) { return null; } return cookie_val; } function findBrowserLocale() { var localeFromBrowser = window.navigator.userLanguage || window.navigator.languages && window.navigator.languages[0] || window.navigator.language; if (!localeFromBrowser) { return; } return localeFromBrowser; } function initToggle() { var line = ""; for (var key in lang_dict) { var locale = sanitizeLocale(key); line += "<li><a class='dropdownListItem' href='#'>" + lang_dict[key] + " - " + locale[0].toUpperCase() + "-" + locale[1] + "</a></li>" + "<li class='divider'></li>"; } var currLocale = sanitizeLocale(userLang); $(".drop-text-pre").text(currLocale[1]); $(".drop-text-post").text(currLocale[0].toUpperCase()); $(".scrollable-menu").append(line); } function getWidgetContent() { axios.get(base_content_url + "widget-content-override.json").then(function (response) { config.i18n = response.data; getCustomContent(userLang); })["catch"](function (error) {}); } function getCustomContent(userLang) { $.i18n().load(base_content_url + "i18n-content.json").done(function () { onLangChange(userLang); }); } $(".dropdownListItem").click(function (e) { e.preventDefault(); var lang = $(e.target).text(); var lang_code = Object.keys(lang_dict).find(function (key) { return lang.includes(lang_dict[key]); }); if (userLang != lang_code) { var currLocale = sanitizeLocale(lang_code); // Update UI $(".drop-text-pre").text(currLocale[1]); $(".drop-text-post").text(currLocale[0].toUpperCase()); onLangChange(lang_code); } }); function onLangChange(selected) { userLang = selected; var localArr = sanitizeLocale(userLang); localStorage.setItem("oneid_locale", localArr[0] + "_" + localArr[1]); localize(userLang); renderNewWidget(userLang); // remove + re-render widget } function localize(userLang) { $.i18n({ locale: userLang }); // set language $(".container-main").i18n(); // translate } function inputValidation(fieldName, className, pattern, i18nName) { var submitList = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; var htmlString = '<p class="c-form-input-error ' + className + '"><span data-i18n="' + i18nName + '" class="error-text error-16-small"> </span></p>'; $("input" + fieldName).addClass(className); $("." + className).parent().css("z-index", "2"); $("." + className).parent().nextAll().remove(); $("." + className).parent().after(htmlString); $(".c-form-input-error").i18n(); $(".c-form-input-error" + "." + className).css("display", "none"); $("." + className).on("input", function () { var userInput = $("input" + fieldName).val(); if (userInput) { if (pattern.test(userInput)) { $(".c-form-input-error" + "." + className).css("display", "none"); if (fieldName === '#' + document.getElementsByName('identifier')[0].id) { for (var k = 0; k < document.getElementsByClassName('button').length; k++) { document.getElementsByClassName('button')[k].classList.remove('disabled'); } } } else { $(".c-form-input-error" + "." + className).css("display", "block"); if (fieldName === '#' + document.getElementsByName('identifier')[0].id) { for (var k = 0; k < document.getElementsByClassName('button').length; k++) { document.getElementsByClassName('button')[k].classList.add('disabled'); } } for (var i in submitList) { $(submitList[i]).addClass("disabled"); } } } else { $(".c-form-input-error" + "." + className).css("display", "none"); } // Check if it is safe to allow submit var enableSubmit = true; $(".c-form-input-error").each(function () { if ($(this).css("display") == "block") { enableSubmit = false; } }); if (enableSubmit) { for (var i in submitList) { $(submitList[i]).removeClass("disabled"); } } }); } /** * Description: A helper function to toggle the spinner while hiding the other components */ function showScreenSpinner(enabled) { var headerEle = $(".language-header"); var footerEle = $("a.footer-links"); var loginContainerEle = $("#okta-login-container"); if (enabled) { headerEle.hide(); footerEle.hide(); loginContainerEle.hide(); $(".loader").show(); } else { headerEle.show(); footerEle.show(); loginContainerEle.show(); $(".loader").hide(); } } function routeBack() { if (!sessionStorage.getItem("didDiscover") || sessionStorage.getItem("didDiscover") === "false") { history.go(-4); } else { history.go(-1); } } function clearPingCookie() { document.cookie = "discovery" + '=; path=/; domain=.cisco.com; Expires=Thu, 01 Jan 1970 00:00:01 GMT;'; } window.onbeforeunload = function (e) { sessionStorage.setItem("didDiscover", "false"); }; window.addEventListener('keypress', function (e) { if (e.key === 'Enter' || e.keyCode === 13) { $(".button").each(function () { if ($(this)[0].classList.contains("disabled")) { e.preventDefault(); return false; } }); switch (document.activeElement) { case document.getElementById('back'): routeBack(); break; case document.getElementById('modalButton'): $('#modalButton').click(); break; case document.getElementById('duo-enter-code'): e.preventDefault(); return false; break; } } }, true); /* Function that handles accessibility of modal Traps focus within modal */ function openModal(modalSelect, closeSelect, focusableEl) { var modal = document.querySelector(modalSelect); // element that was focused before modal opened //we will focus back on this when modal is closed var focusedElementBeforeModal = document.activeElement; modal.style.display = 'block'; // make it visible // add the key listener modal.addEventListener('keydown', processEscapeTabKeys); // Find all focusable modal elements var modalElements = focusableEl; var focusableElements = modal.querySelectorAll(modalElements); // Convert NodeList to Array only for IE 11 //focusableElements = Array.prototype.slice.call(focusableElements); var firstElementOfModal = focusableElements[0]; var lastElementOfModal = focusableElements[focusableElements.length - 1]; firstElementOfModal.focus(); var closeFired = false; function processEscapeTabKeys(event) { // handle TAB key if (event.keyCode === 9 || event.key === 'Tab') { if (document.activeElement === lastElementOfModal) { // trap focus back in modal when reach last element event.preventDefault(); firstElementOfModal.focus(); } } // handle ESCAPE key to close the modal if (event.keyCode === 27 || event.key === 'Esc' && !closeFired) { $(closeSelect).click(); // Focus to the last focus before modal was opened focusedElementBeforeModal.focus(); closeFired = true; } // handle ENTER close icon to close modal if (event.keyCode === 13 || event.key === 'Enter') { if (document.activeElement === document.querySelector(closeSelect) && !closeFired) { $(closeSelect).click(); focusedElementBeforeModal.focus(); closeFired = true; event.preventDefault(); } } } } /** * Description: A function to determine if this user, who does not have profile record in okta master, is a webex federated user. */ function wcd() { showScreenSpinner(true); if (findCookie("discovery") != null) { showScreenSpinner(false); } else { var emailInputAtDiscovery = localStorage.getItem('user'); //document.getElementsByName("identifier").value; var data = JSON.stringify({ email: emailInputAtDiscovery }); var ciApiConfig = { method: "post", url: contentPaths[config.baseUrl]["serviceBaseUrl"] + "/wcd/cu", headers: { "Content-Type": "application/json" }, data: data }; if (emailInputAtDiscovery != null && emailInputAtDiscovery != "") { axios(ciApiConfig).then(function (response) { var ciResponse = response.data; if (ciResponse.result == "SUCCESS" && ciResponse.g == 1 && contentPaths[config.baseUrl]) { window.location.href = config.baseUrl + "/sso/idps/" + contentPaths[config.baseUrl]["pfb2bid"] + "?login_hint=" + emailInputAtDiscovery + "&relayState=" + config.baseUrl + "/ui/v1.0/profile-ui"; } else { showScreenSpinner(false); $("input#okta-signin-password").focus(); primaryUpdate(userLang); } })["catch"](function (error) { showScreenSpinner(false); }); } else { showScreenSpinner(false); primaryUpdate(userLang); } } } function fedUserCheck(inputName, showModal) { $("input[name='" + inputName + "']").focusout(function () { setTimeout(function () { var hasErr; if (inputName === "identifier") { // signin hasErr = $('.c-form-input-error').css("display") === "block"; } else { // reg hasErr = $('span[data-se="o-form-input-email"]').next().length > 0; } var email = $("input[name='" + inputName + "']").val(); if (email && !hasErr) { var xhttp = new XMLHttpRequest(); xhttp.withCredentials = true; xhttp.open("GET", config.baseUrl + "/.well-known/webfinger?resource=okta:acct:" + email, false); xhttp.setRequestHeader("Content-type", "application/json"); xhttp.setRequestHeader("Accept", "application/jrd+json"); xhttp.send(); if (xhttp.status == 200) { var response = JSON.parse(xhttp.responseText); var redirect = response.links[0].href; if (!response.links[0].href.includes("idps/OKTA?")) { if (showModal) { openModal('#fedModal', '.close', 'a, span'); } // else window.location = redirect; // redirect (password page) } $(".close").click(function () { location.reload(); $("#fedModal").css("display", "none"); }); $("#modalButton").click(function () { // modal button for redirect (reg) window.location = redirect; }); } } }, 200); // wait for render update to check for errors }); } function piplModal(sel) { var modalDescr = { collect_PI: ["<p>Cisco will collect personal information such as first name, last name, email address, telephone number, mailing address for the purposes of creating, authenticating and managing online user accounts, to enroll and provide you with Cisco’s content and offerings and, manage customer relationships (e.g., transactional communication, complaints etc.). Cisco will retain the personal information for as long as we have an ongoing relationship with you or in accordance with applicable statutory and/or legal requirements. If you have any requests with respect to Cisco’s handling of your personal information, please complete and submit this <a href='https://privacyrequest.cisco.com/' target='_blank'>form</a>. See Cisco’s <a href='https://www.cisco.com/c/en/us/about/legal/privacy-full.html' target='_blank'>Online Privacy Statement</a> for more information.</p>", "<p>思科会收集名字、姓氏、电子邮件地址、电话号码和邮寄地址等个人信息,用于创建、验证和管理线上用户账户、注册并向您提供思科内容和产品/服务、管理客户关系(例如交易通信、投诉等)、改进和保护思科网站及其他产品和服务以及思科线上隐私声明中所述的其他目的。只要我们与您保持持续的关系或根据适用的法定和/或法律要求,思科将保留个人信息。如果您对思科处理您的个人信息的方式有任何其他要求,请填写并提交这份<a href='https://privacyrequest.cisco.com/' target='_blank'>表格</a>。有关更多信息以及您可以进行的选择,<a href='https://www.cisco.com/c/zh_cn/about/legal/privacy-full.html' target='_blank'>请参阅思科线上隐私声明</a>。</p>"], transfer_PICisco: ["<p>Cisco must share your personal information with others (e.g., Cisco’s Affiliates, <a href='https://locatr.cloudapps.cisco.com/WWChannels/LOCATR/openBasicSearch.do?dtid=odicdc001129' target='_blank'>Partners</a>, suppliers, and government agencies if required by law etc.) in connection with the purposes of processing described in this Notice. See Cisco’s <a href='https://www.cisco.com/c/en/us/about/legal/privacy-full.html' target='_blank'>Online Privacy Statement</a> or reach out to Cisco’s <a href='https://privacyrequest.cisco.com/ch' target='_blank'>Privacy Team</a> to learn more.</p>", "<p>出于信息处理目的,思科系统公司可以与相关的其他信息处理方(附属公司、<a href='https://locatr.cloudapps.cisco.com/WWChannels/LOCATR/openBasicSearch.do?dtid=odicdc001129' target='_blank'>合作伙伴</a>、 供应商;如果法律要求,还包括政府机构) 共享我的个人信息。请参阅思<a href='https://www.cisco.com/c/zh_cn/about/legal/privacy-full.html' target='_blank'>科线上隐私声明了解详情</a>,或使用思<a href='https://privacyrequest.cisco.com/ch' target='_blank'>科隐私申请表与我们联系</a>。</p>"], transfer_PIChina: ["<p>Cisco operates globally, including through its various affiliates and suppliers located around the world. By clicking here, you agree to the transfer of your personal information outside of Mainland China. See Cisco’s <a href='https://www.cisco.com/c/en/us/about/legal/privacy-full.html' target='_blank'>Online Privacy Statement</a> or reach out to Cisco’s <a href='https://privacyrequest.cisco.com/ch' target='_blank'>Privacy Team</a> to learn more.</p>", "<p>作为一家全球性企业,思科系统公司需要您的同意才能将您的个人信息传输到中国大陆以外的地方。点击此处即表示您同意我们可以将您的个人信息传输到美国和世界其他国家/地区。请参阅思<a href='https://www.cisco.com/c/zh_cn/about/legal/privacy-full.html' target='_blank'>科线上隐私声明了解详情</a>,或使用思<a href='https://privacyrequest.cisco.com/ch' target='_blank'>科隐私申请表与我们联系</a>。</p>"] }; var langIdx = userLang == "zh-CN" ? 1 : 0; $("#piplMsg").html(modalDescr[sel][langIdx]); openModal('#piplModal', '.closePipl', 'a, span'); $(".closePipl").click(function () { $("#piplModal").css("display", "none"); }); return false; } function piplComply(sel) { $('.chzn-single span').first().removeAttr('data-i18n'); var piplFields = { 'userProfile.terms_of_service': "<a data-i18n='TERMS' href='https://www.cisco.com/c/dam/en_us/about/doing_business/legal/docs/universal-cloud-agreement.pdf' target='_blank' style='color: #0175a2 !important'>Terms of service</a>", 'userProfile.collect_PI': '<a data-i18n="PIPL_USE_LINK" href="" onclick="piplModal(\'collect_PI\'); return false;" style="color: #0175a2 !important">Learn more</a>', 'userProfile.transfer_PICisco': '<a data-i18n="PIPL_DISCLOSURE_LINK" href="" onclick="piplModal(\'transfer_PICisco\'); return false;" style="color: #0175a2 !important">Learn more</a>', 'userProfile.transfer_PIChina': '<a data-i18n="PIPL_TRANSFER_LINK" href="" onclick="piplModal(\'transfer_PIChina\'); return false;" style="color: #0175a2 !important">Learn more</a>' }; var selectedCountry = sel.options[sel.selectedIndex].text; if (selectedCountry === 'China') { // Insert custom PIPL description var htmlDesc = "<div data-i18n='[html]PIPL_DESC' class='pipl-desc'>To create a Cisco account and do business, you must agree to all 4 statements below: </br> 同意 - Agree </br> 不同意 - Disagree</div>"; $('select[name="userProfile.coiCountry"]').parent().parent().parent().after(htmlDesc); // Remove redundant registration consent statement $(".registerConsent").hide(); for (var key in piplFields) { var piplField = $('select[name="' + key + '"]').parent().parent().parent(); if(piplField[0]){ if(piplField[0].childNodes[0]){ if(piplField[0].childNodes[0].childNodes[1]){ piplField[0].childNodes[0].removeChild(piplField[0].childNodes[0].childNodes[1]); // removing the 'Option' label for OIE } } } if (piplField.children("p").length <= 0) { var htmlString = '<p style="padding-bottom: 8px;font-size: 13px;">' + piplFields[key] + '</p>'; piplField.children('.okta-form-label.o-form-label').after(htmlString); $(".container-main").i18n(); piplField[0].childNodes[2].childNodes[0].childNodes[1].childNodes[0].childNodes[0].innerText = 'Agree'; document.getElementsByName(key)[0].value = 'true'; } piplField.show(); } } else { if (selectedCountry === 'Please select *') { $('.chzn-single span').first().attr('data-i18n', 'COUNTRY_SELECT'); $('.container-main').i18n(); } for (var key in piplFields) { var piplField = $('select[name="' + key + '"]').parent().parent().parent(); piplField.hide(); } $(".pipl-desc").remove(); $(".registerConsent").show(); } } function addCustomPasswordText() { if (document.getElementsByClassName('subschema-0')[0]) { if (document.getElementsByClassName('subschema-0')[0].getElementsByClassName('default-schema')[0] == undefined) { var nNode = document.createElement("div"); nNode.setAttribute("id", "password-pretext"); var tNode = document.createTextNode($.i18n('PASSWORD_PRE_TEXT')); nNode.appendChild(tNode); var l = document.getElementById('subschemas-password'); if (document.getElementById('password-pretext') == null) { l.insertBefore(nNode, l.children[0]); } } else { if (document.getElementById('password-pretext') != null) { document.getElementById('password-pretext').remove(); } } } } function swapElements(a, b) { var p1 = a.parentNode, p2 = b.parentNode, i1, i2; if (!p1 || !p2 || p1.isEqualNode(b) || p2.isEqualNode(a)) return; for (var i = 0; i < p1.children.length; i++) { if (p1.children[i].isEqualNode(a)) { i1 = i; } } for (var i = 0; i < p2.children.length; i++) { if (p2.children[i].isEqualNode(b)) { i2 = i; } } if (p1.isEqualNode(p2) && i1 < i2) { i2++; } p1.insertBefore(b, p1.children[i1]); p2.insertBefore(a, p2.children[i2]); } function renderUnlockAccount(target) { var div1 = document.createElement('div'); div1.setAttribute("id", "custom-unlock-account-msg"); div1.innerHTML = "<p class=\"mobile-recovery-hint\">".concat($.i18n('UNLOCK_ACCOUNT_DISC'), "</p>"); target.after(div1); if (document.querySelector('.list-content')) { for (var i = 0; i < document.querySelectorAll('.link-button').length; i++) { if (i === 0) { document.querySelectorAll('.link-button')[0].innerHTML = $.i18n('RESET_VIA_EMAIL'); //"Send Email" } else { document.querySelectorAll('.link-button')[1].innerHTML = $.i18n('RESET_VIA_SMS'); //"Send SMS" } document.querySelector('.list-content').childNodes[i].removeAttribute('class'); document.querySelector('.list-content').childNodes[i].childNodes[0].remove(); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].remove(); document.querySelector('.list-content').childNodes[i].childNodes[0].removeAttribute("class"); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].removeAttribute("class"); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].style.width = '100%'; document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].childNodes[0].setAttribute("class", "button button-primary button-wide select-factor link-button"); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].childNodes[0].style['margin-bottom'] = '15px'; } } } function selectSecurityMethod() { if (document.querySelector('.list-content')) { for (var i = 0; i < document.querySelectorAll('.link-button').length; i++) { if (document.querySelectorAll('.link-button')[i].parentNode.getAttribute('data-se') === 'custom_otp') { document.querySelectorAll('.link-button')[i].innerHTML = "Duo"; } else if (document.querySelectorAll('.link-button')[i].parentNode.getAttribute('data-se') === 'okta_email') { document.querySelectorAll('.link-button')[i].innerHTML = $.i18n('RESET_VIA_EMAIL'); } else if (document.querySelectorAll('.link-button')[i].parentNode.getAttribute('data-se') === 'google_otp') { document.querySelectorAll('.link-button')[i].innerHTML = "Google Authenticator"; } else if (document.querySelectorAll('.link-button')[i].parentNode.getAttribute('data-se') === 'okta_password') { document.querySelectorAll('.link-button')[i].innerHTML = "".concat($.i18n('PASS_FIELD_PLACE').split(' ')[0]); //"Password" } else if (document.querySelectorAll('.link-button')[i].parentNode.getAttribute('data-se') === 'phone_number') { document.querySelectorAll('.link-button')[i].innerHTML = $.i18n('RESET_VIA_SMS'); } document.querySelector('.list-content').childNodes[i].removeAttribute('class'); document.querySelector('.list-content').childNodes[i].childNodes[0].remove(); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].remove(); document.querySelector('.list-content').childNodes[i].childNodes[0].removeAttribute("class"); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].removeAttribute("class"); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].style.width = '100%'; document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].childNodes[0].setAttribute("class", "button button-primary button-wide select-factor link-button"); document.querySelector('.list-content').childNodes[i].childNodes[0].childNodes[0].childNodes[0].style['margin-bottom'] = '15px'; } } } function customizePasswordRules() { if (document.querySelector('.auth-footer') && document.querySelector('.auth-footer').children) { for (var i = 0; i < document.querySelector('.auth-footer').children.length; i++) { if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'switchAuthenticator') { document.querySelector('.auth-footer').childNodes[i].remove(); } } } var idCounter = 0; var pwdRuleItems = $(".password-authenticator--list").find("li").each(function () { var rule = $(this).text(); $(this).html(''); idCounter++; $(this).attr("id", "password_rule_" + idCounter); var ruleP = document.createElement("p"); ruleP.setAttribute('aria-live', 'polite'); ruleP.innerHTML = '<span id="custom-password-setup-rulename">' + rule + '</span>'; $(this).append(ruleP); }); setTimeout(function () { if (document.querySelector('#password_rule_7').childNodes[0].childNodes[0].innerHTML.indexOf('8') > -1) { document.querySelector('#password_rule_7').remove(); // hiding last password rule } document.querySelector('#password_rule_8').remove(); }, 100); } function renderPassword() { document.getElementsByTagName('section')[0].style.display = 'none'; var idCounter = 0; var pwdRuleItems = $(".password-authenticator--list").find("li").each(function () { var rule = $(this).text(); $(this).html(''); idCounter++; $(this).attr("id", "rule_" + idCounter); var ruleP = document.createElement("p"); ruleP.setAttribute('class', 'new-style-rule-p-error'); ruleP.setAttribute('role', 'alert'); ruleP.setAttribute('aria-live', 'polite'); ruleP.innerHTML = '<span class="icon icon-16 error error-16-small new-style-icon", padding-right:25px !Important"></span><span id="custom-rulename">' + rule + '</span>'; $(this).append(ruleP); if (idCounter === 7) { document.querySelector('#rule_7').style.display = 'none'; // hiding the max age rule } }); var regArray = [{ 'rule_2': /^(?=.*[a-z])/g }, { 'rule_3': /^(?=.*[A-Z])/g }, { 'rule_4': /^(?=.*[0-9])/g }, { 'rule_1': /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{12,60}$/ }, { 'rule_5': /^(?=.*?[^\w\s])/g }, { 'rule_6': '' }]; document.getElementsByName('credentials.passcode')[0].addEventListener('blur', function (e) { if (e.target.value == '') { document.getElementsByTagName('section')[0].style.display = 'none'; } else { document.getElementsByTagName('section')[0].style.display = 'block'; } }); document.getElementsByName('credentials.passcode')[0].addEventListener('keyup', function (e) { if (document.getElementsByTagName('section')[0].style.display === 'none') { document.getElementsByTagName('section')[0].style.display = 'block'; } for (var i = 0; i < regArray.length; i++) { for (var k in regArray[i]) { if (i === regArray.length - 1) { var userNamePart = ''; if (document.getElementsByName('userProfile.email')[0].value !== '') { if (document.getElementsByName('userProfile.email')[0].value.indexOf('@') > -1) { userNamePart = document.getElementsByName('userProfile.email')[0].value.split('@')[0]; if (e.target.value !== '') { if (e.target.value.toLowerCase().indexOf(userNamePart.toLowerCase()) > -1) { document.getElementById(k).childNodes[0].childNodes[0].classList.remove('confirm-16'); document.getElementById(k).childNodes[0].childNodes[0].classList.add('error-16-small'); document.getElementById(k).childNodes[0].childNodes[1].style.color = '#e34843'; } else { document.getElementById(k).childNodes[0].childNodes[0].classList.remove('error-16-small'); document.getElementById(k).childNodes[0].childNodes[0].classList.add('confirm-16'); document.getElementById(k).childNodes[0].childNodes[1].style.color = '#00853c'; } } else { document.getElementsByTagName('section')[0].style.display == 'none'; } } else { userNamePart = document.getElementsByName('userProfile.email')[0].value; document.getElementById(k).childNodes[0].childNodes[0].classList.remove('error-16-small'); document.getElementById(k).childNodes[0].childNodes[0].classList.add('confirm-16'); document.getElementById(k).childNodes[0].childNodes[1].style.color = '#00853c'; } } else { if (e.target.value === '') { document.getElementsByTagName('section')[0].style.display = 'none'; } else { document.getElementsByTagName('section')[0].style.display = 'block'; document.getElementById(k).childNodes[0].childNodes[0].classList.remove('error-16-small'); document.getElementById(k).childNodes[0].childNodes[0].classList.add('confirm-16'); document.getElementById(k).childNodes[0].childNodes[1].style.color = '#00853c'; } } } else { if (e.target.value.length >= 12 && e.target.value.length <= 60) { document.getElementById('rule_1').childNodes[0].childNodes[0].classList.remove('error-16-small'); document.getElementById('rule_1').childNodes[0].childNodes[0].classList.add('confirm-16'); document.getElementById('rule_1').childNodes[0].childNodes[1].style.color = '#00853c'; } if (regArray[i][k].test(e.target.value)) { document.getElementById(k).childNodes[0].childNodes[0].classList.remove('error-16-small'); document.getElementById(k).childNodes[0].childNodes[0].classList.add('confirm-16'); document.getElementById(k).childNodes[0].childNodes[1].style.color = '#00853c'; } else { document.getElementById(k).childNodes[0].childNodes[0].classList.remove('confirm-16'); document.getElementById(k).childNodes[0].childNodes[0].classList.add('error-16-small'); document.getElementById(k).childNodes[0].childNodes[1].style.color = '#e34843'; } } } } }); } function passwordValidator() { var ruleCounter = 0; var pwdRulesLength = document.querySelector('.password-authenticator--list').children.length; for (var i = 0; i < pwdRulesLength; i++) { var rule = document.querySelector('.password-authenticator--list').children[i].childNodes[0].childNodes[0]; if (!rule.classList.contains("error-16-small")) { ruleCounter++; } } if (ruleCounter === 6) { return true; } return false; } function nameFieldsValidation(field) { function showfieldsError(arg, nameField) { var targetField = '#' + 'invalid-' + nameField + '-error-container'; if (arg) { if (document.querySelector(targetField)) { document.querySelector(targetField).style.display = 'inline-block'; } } else { if (document.querySelector(targetField)) { if (document.querySelector(targetField).style.display == 'inline-block') { document.querySelector(targetField).style.display = 'none'; } } } var targetElement = ''; if (nameField === 'coiFirstName') { targetElement = document.querySelectorAll('.c-form-label')[2]; } else { targetElement = document.querySelectorAll('.c-form-label')[3]; } if (targetElement) { if (targetElement.nextSibling) { if (document.querySelector(targetField) == null && field.value !== '') { var invalidNameErrorMsgContainer = document.createElement('p'); invalidNameErrorMsgContainer.setAttribute('id', 'invalid-' + nameField + '-error-container'); invalidNameErrorMsgContainer.setAttribute('class', 'c-form-input-error ' + nameField); invalidNameErrorMsgContainer.innerHTML = '<span class="icon icon-16 error-16-small" ></span><span style="margin-left:20px; float:right">' + $.i18n('INVALID_NAME_ERROR') + '</span>'; invalidNameErrorMsgContainer.style.display = 'none'; targetElement.nextSibling.after(invalidNameErrorMsgContainer); } } } } if (field) { field.addEventListener('keyup', function (evt) { if (evt.target.value !== '') { if (nameRegex.test(evt.target.value)) { showfieldsError(false, field.getAttribute('name').split('.')[1]); } else { showfieldsError(true, field.getAttribute('name').split('.')[1]); } } else { showfieldsError(false, field.getAttribute('name').split('.')[1]); } }); field.addEventListener('keydown', function (evt) { if (evt.target.value !== '') { if (nameRegex.test(evt.target.value)) { showfieldsError(false, field.getAttribute('name').split('.')[1]); } else { showfieldsError(true, field.getAttribute('name').split('.')[1]); } } else { showfieldsError(false, field.getAttribute('name').split('.')[1]); } }); } } function errorContainerForProgressive(fieldName){ var p1 = document.createElement('p'); p1.setAttribute("class", "c-form-input-error "+fieldName); p1.setAttribute("id", "invalid-"+fieldName+"-error-container"); p1.setAttribute("style", "display:none"); var targetElement1 = document.getElementsByClassName('o-form-input-name-userProfile.'+fieldName)[0] targetElement1.after(p1); var span1 = document.createElement('span'); span1.setAttribute("id", "pp-error-icon-"+fieldName) span1.setAttribute("class", "icon icon-16 error-16-small") var tElement1 = document.getElementById("invalid-"+fieldName+"-error-container") tElement1.appendChild(span1) var span2 = document.createElement('span'); span2.setAttribute("id", "pp-error-content-"+fieldName) span2.setAttribute("style", "margin-left:20px; float:right") span2.innerHTML = $.i18n('INVALID_NAME_ERROR') var tElement2 = document.getElementById("pp-error-icon-"+fieldName) tElement2.after(span2) } function updateRegisterProgressive(context) { globalContext = context; if(document.getElementsByName('userProfile.coiFirstName')[0] != undefined){ errorContainerForProgressive('coiFirstName') } if(document.getElementsByName('userProfile.coiLastName')[0] != undefined){ errorContainerForProgressive('coiLastName') } var optionalFieldsArray = ['o-form-fieldset-userProfile.terms_of_service', 'o-form-fieldset-userProfile.collect_PI', 'o-form-fieldset-userProfile.transfer_PICisco', 'o-form-fieldset-userProfile.transfer_PIChina', 'o-form-fieldset-userProfile.lastName', 'o-form-fieldset-userProfile.firstName', 'o-form-fieldset-userProfile.locale']; for (var i = 0; i < document.querySelector('.o-form-fieldset-container').childNodes.length; i++) { if (optionalFieldsArray.includes(document.querySelector('.o-form-fieldset-container').childNodes[i].getAttribute('data-se'))) { document.querySelector('.o-form-fieldset-container').childNodes[i].style.display = 'none'; } } $(".registerConsent").remove(); $(".o-form-info-container").text($.i18n('REQUIRED_FIELDS_LABEL')); $(".okta-form-title").text($.i18n('UPDATE_ACCOUNT_TITLE')); $(".button-primary").val($.i18n('PP_UPDATE_BTN_LABEL')); nameFieldsValidation(document.getElementsByName('userProfile.coiFirstName')[0]); nameFieldsValidation(document.getElementsByName('userProfile.coiLastName')[0]); updatePlaceholders(); $(".container-main").i18n(); //add listener on email fedUserCheck('email', true); //add listener on country (PIPL) var piplFields = ['userProfile.terms_of_service', 'userProfile.collect_PI', 'userProfile.transfer_PICisco', 'userProfile.transfer_PIChina']; piplFields.forEach(function (fieldName) { $('select[name="' + fieldName + '"]').parent().parent().parent().hide(); }); $('select[name="userProfile.coiCountry"]').attr('onchange', 'piplComply(this)'); } function updateRegister() { var html = '<div data-i18n="[html]REGISTER_CONSENT" class="registerConsent"></div>'; if ($(".registerConsent").length > 0) $(".registerConsent").remove(); $("input[type='submit']").parent().before(html); $(".o-form-info-container").text($.i18n('REQUIRED_FIELDS_LABEL')); $(".okta-form-title").text($.i18n('SIGN_UP_LABEL')); $(".button-primary").val($.i18n('REGISTER_BTN_LABEL')); nameFieldsValidation(document.getElementsByName('userProfile.coiFirstName')[0]); nameFieldsValidation(document.getElementsByName('userProfile.coiLastName')[0]); updatePlaceholders(); setTimeout(function () { renderPassword(); }, 500); $(".container-main").i18n(); //add listener on email fedUserCheck('userProfile.email', true); //add listener on country (PIPL) var piplFields = ['userProfile.terms_of_service', 'userProfile.collect_PI', 'userProfile.transfer_PICisco', 'userProfile.transfer_PIChina']; piplFields.forEach(function (fieldName) { $('select[name="' + fieldName + '"]').parent().parent().parent().hide(); }); // $('select[name="coiCountry"]').attr('onchange', 'piplComply(this)'); $('select[name="userProfile.coiCountry"]').attr('onchange', 'piplComply(this)'); } function updatePlaceholders() { // loop use label for attribute to map with input id then name for i18 var label_dict = { 'userProfile.coiCountry': 'COUNTRY_FIELD_LABEL', 'userProfile.terms_of_service': 'PIPL_terms_LABEL', 'userProfile.collect_PI': 'PIPL_collectPI_LABEL', 'userProfile.transfer_PICisco': 'PIPL_transferPICisco_LABEL', 'userProfile.transfer_PIChina': 'PIPL_transferPIChina_LABEL' }; var label_list = document.getElementsByTagName('label'); //HTML collection for (var i = 0; i < label_list.length; i++) { var label = label_list[i]; var input_id = label.getAttribute('for'); var input_name = document.getElementById(input_id).getAttribute('name'); label.setAttribute("data-i18n", label_dict[input_name]); } var input_dict = { 'userProfile.email': 'EMAIL_FIELD_PLACE', 'credentials.passcode': 'PASS_FIELD_PLACE', 'userProfile.coiFirstName': 'FNAME_FIELD_PLACE', 'userProfile.coiLastName': 'LNAME_FIELD_PLACE' }; var input_list = document.getElementsByTagName('input'); //HTML collection for (var j = 0; j < input_list.length; j++) { var input = input_list[j]; var field_name = input.getAttribute('name'); var i18n_label = input_dict[field_name]; if (field_name) { input.setAttribute("data-i18n", "[placeholder]" + i18n_label); } var label_id = field_name + "_label"; var el_id = input.getAttribute("id"); if (i18n_label != undefined) { if ($("#" + label_id).length <= 0) $("#" + el_id).parent().before("<label id='" + label_id + "'class='c-form-label' for='" + el_id + "' data-i18n='" + i18n_label + "'></label>"); } } ////// Removing extra lable for the input elements starts ////////// var input_fields_node = document.getElementsByClassName('o-form-fieldset-container')[0].childNodes; for (var k = 0; k < input_fields_node.length - 1; k++) { var optionField = input_fields_node[k].childNodes[0].childNodes[0]; if (optionField.getAttribute('data-i18n') === 'undefined') { $(optionField).remove(); } } ////// ends //////////////// setTimeout(function () { $('.chzn-single span').first().attr('data-i18n', 'COUNTRY_SELECT'); $(".container-main").i18n(); }, 100); } function createAccountTitleText(locale) { var createAccountObj = { 'en_US': 'Create Account', 'zh_CN': '创建账户', 'zh_TW': '建立帳戶', 'cs_CZ': 'Vytvořit účet' }; for (var k in createAccountObj) { if (k === locale) {} } } function updateWidgetContent(locale, controller) { /* accessbility - title h1 */ $(".okta-form-title").hide(); var p = $(".okta-form-title"); createAccountTitleText(locale); var a = $('<h1 data-se="o-form-head" class="okta-form-title o-form-head"></h1>').append(p.contents()); p.replaceWith(a); /* localize browser tab title */ var doc_title = docTitleMap[controller]; document.title = doc_title ? $.i18n(doc_title) : "Cisco"; /* update custom link*/ // $("a.link.js-custom").attr("data-i18n", "FORGOT_EMAIL_LINK"); /* update footer links*/ switch (locale) { case "ja": $(".support-link").attr("href", "mailto:web-help-j@cisco.com"); $(".privacy-link").attr("href", "https://www.cisco.com/c/ja_jp/about/legal/privacy-full.html"); $("a.footer-links.icp-link").hide(); break; case "zh-CN": $(".privacy-link").attr("href", "https://www.cisco.com/c/zh_cn/about/legal/privacy-full.html"); case "zh-TW": $(".support-link").attr("href", "mailto:web-help@cisco.com"); $("a.footer-links.icp-link").show(); break; default: $(".support-link").attr("href", "mailto:web-help@cisco.com"); $(".privacy-link").attr("href", "https://www.cisco.com/c/en/us/about/legal/privacy-full.html"); $("a.footer-links.icp-link").hide(); } /* update correct logo */ $(".auth-org-logo").replaceWith('<span class="icon-cisco" title="Cisco Logo"></span>'); $("span.icon-cisco").css("padding-bottom", "0px"); $(".btn-group").hide(); $(".back-control").hide(); /* Connecting to... banner */ var banner = document.getElementsByClassName("applogin-container"); if (banner.length) banner[0].style.display = "none"; /* banner blocks widget, shift it...ex. mfa */ if ($(".apploginbanner-container").length) { $(".language-header").css("margin-top", "100px"); } $(".container-main").i18n(); } function primaryUpdate(locale) { updateWidgetContent(locale, "primary-auth"); fedUserCheck('identifier', false); $(".btn-group").show(); inputValidation("#okta-signin-username", "okta-signin-username", /^[^@]+@[^@]+\.[^@]+$/, "INVALID_EMAIL_ERROR", ["#okta-signin-submit"]); } var otInterval = setInterval(mountOT, 1500); function mountOT() { var boomr_cookie = findCookie('BOOMR_CONSENT'); try { OneTrust.OnConsentChanged(function () { if (OnetrustActiveGroups.includes('2')) { if (boomr_cookie != "opted-in") { console.log(' user opted IN performance cookies'); BOOMR_OPT_IN(); } } else if (!OnetrustActiveGroups.includes('2')) { if (boomr_cookie != "opted-out") { console.log(' user opted OUT performance cookies'); BOOMR_OPT_OUT(); } } }); console.log(' ot ready'); clearInterval(otInterval); } catch (err) { console.log(' ot not ready'); } } function showSLOptions(arg, options) { if (document.getElementsByClassName('sign-in-with-idp')[0]) { document.getElementsByClassName('sign-in-with-idp')[0].style.display = 'none'; } if (arg === false || arg === 'undefined') { if (document.getElementsByClassName('sign-in-with-idp')[0]) { document.getElementsByClassName('sign-in-with-idp')[0].remove(); } } else { var buttonsTobeHiddenArray = []; var buttonsTobeVisibleArray = []; for (var property in options) { if (options[property] === false) { buttonsTobeHiddenArray.push(property); } if (options[property] === true) { buttonsTobeVisibleArray.push(property); } } ///////// adding a delay /////// setTimeout(function () { var slOptions = document.getElementsByClassName('sign-in-with-idp')[0]; if (slOptions) { var slOptionsLength = document.getElementsByClassName('sign-in-with-idp')[0].childNodes[1].childNodes.length; for (var i = 0; i < slOptionsLength; i++) { var node = document.getElementsByClassName('sign-in-with-idp')[0].childNodes[1].childNodes[i]; if (buttonsTobeVisibleArray.includes(node.getAttribute('data-se').split('-')[2].toLowerCase())) { var ele = document.getElementsByClassName('sign-in-with-idp')[0].children[1].childNodes[i]; ele.style.display = 'block'; } else { document.getElementsByClassName('sign-in-with-idp')[0].children[1].removeChild(document.getElementsByClassName('sign-in-with-idp')[0].children[1].childNodes[i]); } } slOptions.style.display = 'block'; } }, 1000); } } function renderForgotPassword() { var infoDiv = document.createElement('div'); infoDiv.setAttribute('id', 'fp-info-div'); var targetDiv = document.querySelector('.o-form-label-top'); infoDiv.innerHTML = '<p class="custom-mobile-recovery-hint">SMS can only be used if a mobile phone number has been configured.</p>'; targetDiv.after(infoDiv); } function renderNewWidget() { var locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "en"; if (oktaSignIn instanceof OktaSignIn) { oktaSignIn.remove(); // Remove existing instance of widget } config.language = locale; // Set Okta config locale // Render the Okta Sign-In Widget var oktaSignIn = new OktaSignIn(config); // Create/Render the Okta Sign-In Widget if (document.getElementById('okta-sign-in')) { if (document.getElementById('okta-sign-in').style.display === 'none') { document.getElementById('okta-sign-in').style.display = 'block'; } else { location.reload(); } } if (document.getElementsByClassName('primary-auth-container')[0]) { if (document.getElementsByClassName('primary-auth-container')[0].childNodes.length > 0) { document.getElementsByClassName('primary-auth-container')[0].style.display = 'none'; } } /*-------------- Changes for DUO MFA customization ---------------------- */ function duoSetupService(user) { var options = { method: "get", url: contentPaths[config.baseUrl]["serviceBaseUrl"] + "/factor/api/v1/mfa/duo-setup?user=" + encodeURIComponent(user), headers: { "Content-Type": "application/json", "Accept": "application/json" } }; var result = axios(options).then(function (response) { var secretDetails = response.data; var sharedSecret = secretDetails['secret']; var qrCode = secretDetails['qrCode']; var id = secretDetails['id']; if (qrCode && sharedSecret) { document.querySelector('#device-type-options').style.display = 'none'; document.querySelector('#duo-download-instruction').innerHTML = ''; duoSetupScreenTwo(qrCode, sharedSecret, id); } else {} })["catch"](function (error) { console.log(error); }); } function duoAppDownloadService(arg, os) { var options = { method: "get", url: contentPaths[config.baseUrl]["serviceBaseUrl"] + "/factor/api/v1/mfa/duo-setup?apps=true", headers: { "Content-Type": "application/json", "Accept": "application/json" } }; var result = axios(options).then(function (response) { var qrCodes = response.data; if (!arg) { iosQRCode = qrCodes['ios']; androidQRCode = qrCodes['android']; } else { iosQRCode = qrCodes['ios']; androidQRCode = qrCodes['android']; if (os === 'iphone') { document.querySelector('#duo-app-download-qr-img').setAttribute("src", iosQRCode); } else { document.querySelector('#duo-app-download-qr-img').setAttribute("src", androidQRCode); } } })["catch"](function (error) { console.log(error); }); } function duoCodeVerifier(code, secret, id) { var data = { "code": code, "secret": secret }; var options = { method: "post", url: contentPaths[config.baseUrl]["serviceBaseUrl"] + "/factor/api/v1/mfa/duo-setup", headers: { "Content-Type": "application/json", "Accept": "application/json" }, data: data }; var result = axios(options).then(function (response) { var response = response.data; var targetDiv = document.querySelector('.o-form-error-container'); if (response["valid"] === true) { duoEnrollmentService(secret, id); targetDiv.innerHTML = ''; } else { targetDiv.innerHTML = '<div id="duo-code-err-id" class="" data-se="o-form-error-container"><div><div class="okta-form-infobox-error infobox infobox-error" role="alert"><span class="icon error-16"></span><p id="duo-code-err-msg"></p></div></div></div>'; document.querySelector('#duo-code-err-msg').innerText = "Your code doesn't match our records. Please try again."; } })["catch"](function (error) { console.log(error); }); } function duoEnrollmentService(secret, id) { var data = { "factorType": "token:hotp", "provider": "CUSTOM", "factorProfileId": contentPaths[config.baseUrl]["factorProfileIdDUO"], "profile": { "sharedSecret": secret } }; var options = { method: "post", url: contentPaths[config.baseUrl]["serviceBaseUrl"] + "/activate-mfa/api/v1/users/" + id + "/activate-mfa", headers: { "Content-Type": "application/json", "Accept": "application/json" }, data: data }; var result = axios(options).then(function (response) { var response = response.data; if (response['status'] === 'ACTIVE') { if (sessionStorage.getItem('redirectTo') !== undefined && sessionStorage.getItem('redirectTo') !== '' && sessionStorage.getItem('redirectTo') != null) { location.href = sessionStorage.getItem('redirectTo'); } else { location.href = 'https://id.cisco.com/ui/v1.0/profile-ui'; // redirect flow works } } })["catch"](function (error) { console.log(error); }); } function duoSetupScreenFour(secret, id) { document.querySelector('#qr-code-description').style.display = 'none'; document.querySelector('#duo-scan-instructions').style.display = 'none'; document.querySelector('#duo-qrcode-wrapper').style.display = 'none'; document.querySelector('#duo-qr-code-bottom-bar').style.display = 'none'; if (document.querySelector('#cant-scan-title')) { document.querySelector('#cant-scan-title').style.display = 'none'; } if (document.querySelector('#qr-code-alternate-desc')) { document.querySelector('#qr-code-alternate-desc').style.display = 'none'; } if (document.querySelector('#duo-shared-key')) { document.querySelector('#duo-shared-key').style.display = 'none'; } if (document.querySelector('#duo-qr-code-bottom-bar')) { document.querySelector('#duo-qr-code-bottom-bar').style.display = 'none'; } if (document.querySelector('#duo-no-scan-next-btn')) { document.querySelector('#duo-no-scan-next-btn').style.display = 'none'; } if (document.querySelector('#duo-scan-qr-code-link')) { document.querySelector('#duo-scan-qr-code-link').style.display = 'none'; } var p1 = document.createElement('p'); p1.setAttribute("class", "okta-form-subtitle o-form-explain"); p1.setAttribute("id", "enter-code"); p1.innerText = "Enter your Duo passcode"; var targetElement1 = document.querySelector('.okta-form-title'); targetElement1.after(p1); var div1 = document.createElement('div'); div1.setAttribute("id", "verify-code"); div1.setAttribute("class", "o-form-fieldset-container"); div1.setAttribute("data-se", "o-form-fieldset-container"); var targetDiv1 = document.querySelector('.o-form-error-container'); targetDiv1.after(div1); var div2 = document.createElement('div'); div2.setAttribute("id", "enter-code-label"); div2.setAttribute("class", "okta-form-label o-form-label"); div2.setAttribute("data-se", "o-form-label"); var targetDiv2 = document.querySelector('#verify-code'); targetDiv2.after(div2); div2.innerHTML = '<label for="duo-enter-code">Enter Code</label>'; var div3 = document.createElement('div'); div3.setAttribute("id", "enter-code-label-container"); div3.setAttribute("class", "o-form-input"); div3.setAttribute("data-se", "o-form-input-container"); var targetDiv3 = document.querySelector('#enter-code-label'); targetDiv3.after(div3); div3.innerHTML = '<span style="margin-bottom: 30px;" data-se="o-form-input-answer" class="o-form-input-name-answer o-form-control okta-form-input-field input-fix"><input type="tel" placeholder="" name="duo-enter-code" id="duo-enter-code" value="" aria-label="" autocomplete="off"></span>'; var div4 = document.createElement('div'); div4.setAttribute("id", "duo-verify-code-bottom-bar"); div4.setAttribute("class", "o-form-button-bar"); var targetDiv4 = document.querySelector('#enter-code-label-container'); targetDiv4.after(div4); div4.innerHTML = '<button id="duo-verify-btn" class="button button-primary" style="margin-top: 30px;">Verify</button>'; document.querySelector('#duo-verify-btn').disabled = true; document.querySelector('#duo-enter-code').addEventListener('keyup', function (e) { if (e.target.value.length === 6) { document.querySelector('#duo-verify-btn').disabled = false; } else { document.querySelector('#duo-verify-btn').disabled = true; } }); document.querySelector('#duo-verify-btn').addEventListener('click', function () { var code = document.querySelector('#duo-enter-code').value; duoCodeVerifier(code, secret, id); }); } function duoSetupScreenThree(secret, id) { document.querySelector('#qr-code-description').style.display = 'none'; document.querySelector('#duo-scan-instructions').style.display = 'none'; document.querySelector('#duo-qrcode-wrapper').style.display = 'none'; document.querySelector('#duo-qr-code-bottom-bar').style.display = 'none'; var p1 = document.createElement('p'); p1.setAttribute("class", "okta-form-subtitle o-form-explain"); p1.setAttribute("id", "cant-scan-title"); p1.innerText = "Can't scan QR Code?"; var targetElement1 = document.querySelector('.okta-form-title'); targetElement1.after(p1); var div1 = document.createElement('div'); div1.setAttribute("id", "qr-code-alternate-desc"); div1.setAttribute("data-se", "secret-key-instructions"); div1.setAttribute("class", "secret-key-instructions"); var targetElement2 = document.querySelector('#cant-scan-title'); targetElement2.after(div1); div1.innerHTML = '<section aria-live="assertive"><p class="okta-form-subtitle o-form-explain text-align-c">To set up manually enter your Account username and then input the following in the Secret Key Field</p><p id="duo-shared-key" class="shared-key margin-top-10" tabindex="0" aria-label="" style="text-align:center; font-size:16px; color:#1d1d21;"></p></section>'; var targetElement3 = document.querySelector('#duo-shared-key'); targetElement3.innerHTML = secret; var targetElement4 = document.querySelector('#duo-qr-code-bottom-bar'); document.querySelector('#duo-qr-code-next-btn').style.display = 'none'; document.querySelector('#duo-qr-code-bottom-bar').style.display = 'block'; targetElement4.innerHTML = '<button id="duo-no-scan-next-btn" class="button button-primary" style="margin-top: 30px;">Next</button>'; document.querySelector('#duo-no-scan-next-btn').addEventListener('click', function () { duoSetupScreenFour(secret, id); }); var anchor1 = document.createElement('a'); anchor1.setAttribute("class", "link help js-back"); anchor1.setAttribute("data-se", "goto-link"); anchor1.setAttribute("id", "duo-scan-qr-code-link"); anchor1.setAttribute("href", "#"); anchor1.setAttribute("style", "float:right"); anchor1.innerText = 'Scan QR Code'; var targetElement5 = document.querySelector('.js-back'); targetElement5.after(anchor1); } function duoSetupScreenTwo(qrCode, secret, id) { var div1 = document.createElement('div'); div1.setAttribute("id", "qr-code-description"); div1.setAttribute("class", "o-form-fieldset-container"); div1.setAttribute("data-se", "o-form-fieldset-container"); var targetDiv1 = document.querySelector('.o-form-error-container'); targetDiv1.after(div1); var div2 = document.createElement("div"); div2.setAttribute("id", "duo-scan-instructions"); div2.setAttribute("class", "scan-instructions clearfix"); var targetDiv2 = document.querySelector('#qr-code-description'); targetDiv2.after(div2); div2.innerHTML = '<div id="duo-instruction-details" class="scan-instructions-details-wrapper"><div class="scan-instructions-details"><p>Launch Duo Mobile, tap the "+" icon, then select "Use QR code".</p></div></div>'; var div3 = document.createElement('div'); div3.setAttribute("id", "duo-qrcode-wrapper"); div3.setAttribute("class", "scan-instructions-qrcode-wrapper"); var targetDiv3 = document.querySelector('#duo-instruction-details'); targetDiv3.after(div3); div3.innerHTML = '<div class="qrcode-wrap"></div>'; var div4 = document.querySelector('.qrcode-wrap'); div4.innerHTML = '<img data-se="qrcode" alt="QR code" class="qrcode-image">'; var img1 = document.querySelector('.qrcode-image'); img1.setAttribute("src", qrCode); var div5 = document.createElement('div'); div5.setAttribute("id", "duo-qr-code-bottom-bar"); div5.setAttribute("class", "o-form-button-bar"); var targetDiv4 = document.querySelector('#duo-scan-instructions'); targetDiv4.after(div5); div5.innerHTML = '<button id="duo-qr-code-next-btn" class="button button-primary" style="margin-top: 30px;">Next</button>'; document.querySelector('#duo-qr-code-next-btn').addEventListener('click', function () { duoSetupScreenFour(secret, id); // for code verification with custom API }); var anchor1 = document.createElement('a'); anchor1.setAttribute("id", "can-not-scan"); anchor1.setAttribute("class", "link manual-setup"); anchor1.setAttribute("aria-label", "Setup without scanning a QR code."); anchor1.setAttribute("style", "cursor:pointer;"); anchor1.innerText = "Can't scan?"; div4.after(anchor1); document.querySelector('#can-not-scan').addEventListener('click', function () { duoSetupScreenThree(secret, id); }); } function duoSetupScreenOne() { if (document.querySelector('.siw-main-body')) { document.querySelector('.siw-main-body').childNodes[0].childNodes[0].childNodes[1].style.display = 'none'; document.querySelector('.siw-main-body').childNodes[0].childNodes[0].childNodes[2].style.display = 'none'; document.querySelector('.siw-main-body').childNodes[0].childNodes[0].childNodes[0].innerText = "".concat($.i18n('SETUP_BTN_LABEL'), " ").concat($.i18n('DUO_TOTP_TITLE')); } duoAppDownloadService(false); var div1 = document.createElement('div'); div1.setAttribute("id", "device-type-options"); div1.innerHTML = '<p style="margin-bottom:20px;">Select your device type</p><input type="radio" name="deviceType" id="iphone" style="margin-bottom:10px;" value="iphone"/><label for="iphone" style="padding-left:10px;">iPhone</label></br><input type="radio" name="deviceType" id="android" value="android"/><label for="android" style="padding-left: 10px;">Android</label><div class="okta-form-divider form-divider" style="padding-top:30px; display:none;"></div>'; var targetDiv1 = document.querySelector('.o-form-error-container'); targetDiv1.before(div1); var targetDiv2 = document.querySelector('.okta-form-divider'); var div2 = document.createElement('div'); div2.setAttribute("id", "duo-download-instruction"); targetDiv2.after(div2); var targetDiv3 = document.querySelector('#duo-download-instruction'); var anchor1 = document.createElement('button'); anchor1.setAttribute("id", "duo-next-btn"); anchor1.setAttribute("data-se", "button"); anchor1.setAttribute("class", "button button-primary default-custom-button link-button"); anchor1.setAttribute("href", "#"); anchor1.setAttribute("style", "display: none;margin-top: 30px;"); anchor1.innerText = 'Next'; targetDiv3.after(anchor1); document.querySelector('#duo-next-btn').addEventListener('click', function () { var userInfo; if (sessionStorage.getItem('user') !== '' && sessionStorage.getItem('user') !== null) { userInfo = sessionStorage.getItem('user'); } else if (localStorage.getItem('user') !== '' && localStorage.getItem('user') !== null) { userInfo = localStorage.getItem('user'); } if (userInfo !== '') duoSetupService(userInfo); }); var targetFooterLink = document.querySelector('.js-cancel'); var backToAuthListFooterLink = document.createElement('a'); backToAuthListFooterLink.setAttribute('data-se', 'switchAuthenticator'); backToAuthListFooterLink.setAttribute('href', 'javascript:window.location.reload();'); backToAuthListFooterLink.setAttribute('class', 'link js-switchAuthenticator'); backToAuthListFooterLink.innerText = $.i18n('RETURN_TO_AUTH_LIST'); //'Return to authenticator list'; targetFooterLink.before(backToAuthListFooterLink); var radios = document.querySelectorAll('input[name="deviceType"]'); radios.forEach(function (radio) { radio.addEventListener('click', function () { radioVal = radio.value; document.querySelector('.form-divider').style.display = 'block'; document.querySelector('#duo-next-btn').style.display = 'inline-block'; if (radioVal === 'iphone') { if (isMobile.any()) { div2.innerHTML = ''; div2.innerHTML = '<span class="duo-totp-logo"></span><p class="instructions">Download <a href="https://apps.apple.com/us/app/duo-mobile/id422663827" class="inline-link" target="_blank" rel="noreferer noopener">Duo Mobile from the App Store</a> onto your mobile device.</p>'; } else { div2.innerHTML = '<div id="duo-app-scan-instructions" class="scan-instructions clearfix"><div id="duo-app-instruction-details" class="scan-instructions-details-wrapper" ><div class="scan-instructions-details"><p>Already have Duo App? Please click "Next" to proceed.<br/>OR Scan QR code to download Duo Mobile from the App Store.</p></div></div><div id="duo-app-qrcode-wrapper" class="scan-instructions-qrcode-wrapper"><img id="duo-app-download-qr-img" data-se="qrcode" alt="QR code" class="qrcode-image" ></div></div>'; if (iosQRCode === '') { duoAppDownloadService(true, 'iphone'); } document.querySelector('#duo-app-download-qr-img').setAttribute("src", iosQRCode); } } else { if (isMobile.any()) { div2.innerHTML = ''; div2.innerHTML = '<span class="duo-totp-logo"></span><p class="instructions">Download <a href="https://play.google.com/store/apps/details?id=com.duosecurity.duomobile&hl=en_US&gl=US" class="inline-link" target="_blank" rel="noreferer noopener">Duo Mobile from the Google Play Store</a> onto your mobile device.</p>'; } else { div2.innerHTML = '<div id="duo-app-scan-instructions" class="scan-instructions clearfix"><div id="duo-app-instruction-details" class="scan-instructions-details-wrapper"><div class="scan-instructions-details"><p>Already have Duo App? Please click "Next" to proceed.<br/>OR Scan QR code to download Duo Mobile from the Google Play Store.</p></div></div><div id="duo-app-qrcode-wrapper" class="scan-instructions-qrcode-wrapper"><img id="duo-app-download-qr-img" data-se="qrcode" alt="QR code" class="qrcode-image" ></div></div>'; if (androidQRCode === '') { duoAppDownloadService(true, 'android'); } document.querySelector('#duo-app-download-qr-img').setAttribute("src", androidQRCode); } } }); }); } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } function showInvalidEmailErroronLogin() { if (document.querySelector('#login-invalid-email') == undefined || document.querySelector('#login-invalid-email') == null) { var targetInvalidEmailPara = document.getElementsByName('identifier')[0].parentNode; var invalidEmailPara = document.createElement("p"); invalidEmailPara.setAttribute("id", "login-invalid-email"); invalidEmailPara.setAttribute("class", "okta-form-input-error o-form-input-error o-form-explain"); invalidEmailPara.setAttribute("role", "alert"); invalidEmailPara.innerHTML = "<span class=\"icon icon-16 error-16-small\" role=\"img\" aria-label=\"Error\"></span>".concat($.i18n('INVALID_EMAIL_ERROR')); invalidEmailPara.style.display = 'block'; targetInvalidEmailPara.after(invalidEmailPara); } else { document.querySelector('#login-invalid-email').style.display = 'block'; } } /////////////// rememberMe for IE //////////// function rememberMeIE() { //////// adding ///////// var targetMemSpan = document.querySelector('.o-form-input-name-rememberMe'); var memSpan = document.createElement("span"); memSpan.setAttribute("id", "custom-mem-span"); memSpan.setAttribute("data-se", "o-form-input-rememberMe"); memSpan.setAttribute("class", "o-form-input-name-rememberMe"); memSpan.innerHTML = '<div class="custom-checkbox"><input type="checkbox" name="custom-rememberme" id="custom-rememberme"><label id="custom-remember-label" for="custom-rememberme" class="focus" data-se-for-name="custom-rememberme">Remember me</label></div>'; targetMemSpan.after(memSpan); var isChecked = false; document.querySelector('#custom-mem-span').style.display = 'none'; if (document.getElementsByName('identifier')[0]) { // debugger; if (document.getElementsByName('identifier')[0].value !== '') { if (document.getElementsByName('identifier')[0].value.indexOf('@cisco.com') <= 0) { document.querySelector('#custom-mem-span').style.display = 'none'; } else { if (readCookie('remember-me')) { if (readCookie('remember-me') !== '') { document.querySelector('#custom-mem-span').style.display = 'block'; document.querySelector('#custom-remember-label').setAttribute('class', 'focus checked'); } } else { document.querySelector('#custom-mem-span').style.display = 'none'; } } } } if (document.getElementsByName('identifier')[0]) { document.getElementsByName('identifier')[0].addEventListener('keyup', function (e) { var emailId = e.target.value; if (emailId) { if (!emailReg.test(emailId)) { showInvalidEmailErroronLogin(); } else { if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; } else { } } } else { if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; } } if (emailId.indexOf('@cisco.com') > -1) { if (config.features.rememberMe == true) { } document.querySelector('#custom-mem-span').style.display = 'block'; } else { if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = false; } document.querySelector('#custom-mem-span').style.display = 'none'; } }); document.getElementsByName('identifier')[0].addEventListener('blur', function (e) { var emailId = e.target.value; if (emailId) { if (!emailReg.test(emailId)) { showInvalidEmailErroronLogin(); } else { if (document.getElementsByName('identifier')[0]) { localStorage.setItem('user', document.getElementsByName('identifier')[0].value); } if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; } else { } } } else { if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; } } if (emailId.indexOf('@cisco.com') > -1) { if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = true; } document.querySelector('#custom-mem-span').style.display = 'block'; } else { if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = false; } document.querySelector('#custom-mem-span').style.display = 'none'; } }); } document.querySelector('#custom-rememberme').addEventListener('click', function (e) { if (!isChecked) { document.querySelector('#custom-remember-label').setAttribute('class', 'focus checked'); isChecked = true; if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = true; var userNameToRemember = document.getElementsByName('identifier')[0].value; document.cookie = "remember-me=" + userNameToRemember + "; Max-Age=2147483647; path=/"; } } else { document.querySelector('#custom-remember-label').setAttribute('class', 'focus'); isChecked = false; if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = false; document.cookie = "remember-me=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; } } }); } ///////////////////////////////////// function rememberMe() { document.querySelector('.button-primary').disabled = true; //////// adding ///////// var targetMemSpan = document.querySelector('.o-form-input-name-rememberMe'); var memSpan = document.createElement("span"); memSpan.setAttribute("id", "custom-mem-span"); memSpan.setAttribute("data-se", "o-form-input-rememberMe"); memSpan.setAttribute("class", "o-form-input-name-rememberMe"); memSpan.innerHTML = '<div class="custom-checkbox"><input type="checkbox" name="custom-rememberme" id="custom-rememberme"><label id="custom-remember-label" for="custom-rememberme" class="focus" data-se-for-name="custom-rememberme">Remember me</label></div>'; targetMemSpan.after(memSpan); var isChecked = false; document.querySelector('#custom-mem-span').style.display = 'none'; if (document.getElementsByName('identifier')[0]) { if (document.getElementsByName('identifier')[0].value !== '') { if (document.getElementsByName('identifier')[0].value.indexOf('@cisco.com') <= 0) { document.querySelector('#custom-mem-span').style.display = 'none'; } else { if (readCookie('remember-me')) { if (readCookie('remember-me') !== '') { document.querySelector('#custom-mem-span').style.display = 'block'; document.querySelector('#custom-remember-label').setAttribute('class', 'focus checked'); } } else { document.querySelector('#custom-mem-span').style.display = 'none'; } } } } if (document.getElementsByName('identifier')[0]) { document.getElementsByName('identifier')[0].addEventListener('keyup', function (e) { var emailId = e.target.value; if (emailId) { document.querySelector('.button-primary').disabled = false; if (!emailReg.test(emailId)) { showInvalidEmailErroronLogin(); document.querySelector('.button-primary').disabled = true; } else { if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; document.querySelector('.button-primary').disabled = false; } else { document.querySelector('.button-primary').disabled = false; } } } else { if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; } } if (emailId.indexOf('@cisco.com') > -1) { if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = true; } document.querySelector('#custom-mem-span').style.display = 'block'; } else { if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = false; } document.querySelector('#custom-mem-span').style.display = 'none'; } }); document.getElementsByName('identifier')[0].addEventListener('blur', function (e) { var emailId = e.target.value; if (emailId) { if (!emailReg.test(emailId)) { showInvalidEmailErroronLogin(); document.querySelector('.button-primary').disabled = true; } else { if (document.getElementsByName('identifier')[0]) { localStorage.setItem('user', document.getElementsByName('identifier')[0].value); } if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; document.querySelector('.button-primary').disabled = false; } else { document.querySelector('.button-primary').disabled = false; } } } else { if (document.querySelector('#login-invalid-email')) { document.querySelector('#login-invalid-email').style.display = 'none'; } } if (emailId.indexOf('@cisco.com') > -1) { if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = true; } document.querySelector('#custom-mem-span').style.display = 'block'; } else { if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = false; } document.querySelector('#custom-mem-span').style.display = 'none'; } }); } document.querySelector('#custom-rememberme').addEventListener('click', function (e) { if (!isChecked) { document.querySelector('#custom-remember-label').setAttribute('class', 'focus checked'); isChecked = true; if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = true; var userNameToRemember = document.getElementsByName('identifier')[0].value; document.cookie = "remember-me=" + userNameToRemember + "; Max-Age=2147483647; path=/"; } } else { document.querySelector('#custom-remember-label').setAttribute('class', 'focus'); isChecked = false; if (config.features.rememberMe == true) { config.features.rememberMyUsernameOnOIE = false; document.cookie = "remember-me=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; } } }); } function createRepelacableElements() { var targetElement = document.querySelector('.o-form-fieldset'); var replacementEle = document.createElement('div'); replacementEle.setAttribute("id", "replace-email"); replacementEle.setAttribute("data-se", "o-form-fieldset-replace-email"); replacementEle.setAttribute("class", "o-form-fieldset o-form-label-top"); replacementEle.innerHTML = '<div data-se="o-form-label" class="okta-form-label o-form-label"></div>'; targetElement.after(replacementEle); var repA = document.getElementById('replace-email'); var repB = document.querySelectorAll('.o-form-fieldset')[12]; // with locale + firstName + lastName swapElements(repA, repB); var targetElementTwo = document.querySelectorAll('.o-form-fieldset')[1]; var replacementEleTwo = document.createElement('div'); replacementEleTwo.setAttribute("id", "replace-pwd-rules"); replacementEleTwo.setAttribute("data-se", "o-form-fieldset-replace-pwd-rules"); replacementEleTwo.setAttribute("class", "o-form-fieldset o-form-label-top"); replacementEleTwo.innerHTML = '<div data-se="o-form-label" class="okta-form-label o-form-label">/div>'; targetElementTwo.after(replacementEleTwo); var rep_1 = document.getElementById('replace-pwd-rules'); var rep_2 = document.getElementsByTagName('section')[0]; swapElements(rep_1, rep_2); rep_2.style.display = 'none'; rep_1.style.display = 'none'; document.getElementsByClassName('o-form-input-name-userProfile.locale')[0].parentNode.parentNode.style.display = 'none'; document.getElementsByClassName('o-form-input-name-userProfile.firstName')[0].parentNode.parentNode.style.display = 'none'; document.getElementsByClassName('o-form-input-name-userProfile.lastName')[0].parentNode.parentNode.style.display = 'none'; repA.remove(); rep_1.remove(); } function emailValidation() { if (document.getElementsByName('userProfile.email')[0]) { var showEmailError = function showEmailError(arg) { if (arg) { if (document.querySelector('#invalid-email-error-container')) { if (document.querySelector('#invalid-email-error-container').style.display == 'none' || document.querySelector('#invalid-email-error-container').style.display == '') { document.querySelector('#invalid-email-error-container').style.display = 'block'; } } } else { if (document.querySelector('#invalid-email-error-container')) { if (document.querySelector('#invalid-email-error-container').style.display == 'block') { document.querySelector('#invalid-email-error-container').style.display = 'none'; // return; } } } if (document.querySelector('.c-form-label')) { if (document.querySelector('.c-form-label').nextSibling) { if (document.querySelector('#invalid-email-error-container') == null && emailField.value !== '') { var invalidEmailErrorMsgContainer = document.createElement('p'); invalidEmailErrorMsgContainer.setAttribute('id', 'invalid-email-error-container'); invalidEmailErrorMsgContainer.setAttribute('class', 'okta-form-input-error o-form-input-error o-form-explain'); invalidEmailErrorMsgContainer.setAttribute('role', 'alert'); invalidEmailErrorMsgContainer.innerHTML = '<span class="icon icon-16 error-16-small" role="img" aria-label="Error"></span>' + $.i18n('INVALID_EMAIL_ERROR'); invalidEmailErrorMsgContainer.style.display = 'none'; document.querySelector('.c-form-label').nextSibling.after(invalidEmailErrorMsgContainer); } } } }; var emailField = document.getElementsByName('userProfile.email')[0]; emailField.addEventListener('keyup', function (evt) { if (evt.target.value !== '') { if (evt.target.value.length > 100) { if (document.querySelectorAll('.o-form-explain')[1]) {} } if (emailReg.test(evt.target.value) === true) { showEmailError(false); } else { showEmailError(true); } } else { showEmailError(false); } }); } } function hideLang() { if (document.querySelector('.dropdown-toggle')) document.querySelector('.dropdown-toggle').style.display = 'none'; } function showLang() { if (document.querySelector('.dropdown-toggle')) document.querySelector('.dropdown-toggle').style.display = 'block'; } function enrolledFactorsInfo(email) { var options = { method: "get", url: contentPaths[config.baseUrl]["serviceBaseUrl"] + "/user-factors/api/v1/users/" + email + "/factors", headers: { "Content-Type": "application/json", "Accept": "application/json" } }; var result = axios(options).then(function (response) { var factors = response.data; for (var i = 0; i < factors.length; i++) { for (var key in factors[i]) { if (key === 'provider' && factors[i][key] === 'GOOGLE') { var enrolledAuthTargetElement = document.querySelector('.authenticator-list-title'); var enrolledAuthElement = document.createElement('div'); enrolledAuthElement.setAttribute('id', 'custom-enrolled-factor'); enrolledAuthElement.setAttribute('class', 'authenticator-list-title'); enrolledAuthElement.innerText = 'Enrolled factors'; enrolledAuthTargetElement.before(enrolledAuthElement); var enrolledAuthTargetElementTwo = document.querySelector('#custom-enrolled-factor'); var enrolledGAAuthElement = document.createElement('div'); enrolledGAAuthElement.setAttribute('id', 'custom-ga-enrolled-factor'); enrolledGAAuthElement.setAttribute('class', 'authenticator-row clearfix'); enrolledGAAuthElement.innerHTML = '<div class="authenticator-icon-container"><div class="factor-icon authenticator-icon mfa-google-auth" role="img" aria-label="Authenticator logo"></div></div><div class="authenticator-description"><h3 class="authenticator-label no-translate">Google Authenticator<span class="icon success-16-green" style="float: right;"></span></h3><p class="authenticator-usage-text"></p></div>'; enrolledAuthTargetElementTwo.after(enrolledGAAuthElement); } else if (key === 'provider' && factors[i][key] === 'CUSTOM') { if (document.querySelector('#custom-enrolled-factor') && !isDuoEnrolled) { isDuoEnrolled = true; var enrolledAuthTargetElementTwo = document.querySelector('#custom-enrolled-factor'); var enrolledDuoAuthElement = document.createElement('div'); enrolledDuoAuthElement.setAttribute('id', 'custom-duo-enrolled-factor'); enrolledDuoAuthElement.setAttribute('class', 'authenticator-row clearfix'); enrolledDuoAuthElement.innerHTML = '<div class="authenticator-icon-container"><div class="factor-icon authenticator-icon duo-totp" role="img" aria-label="Authenticator logo"></div></div><div class="authenticator-description"><h3 class="authenticator-label no-translate">Duo<span class="icon success-16-green" style="float: right;"></span></h3><p class="authenticator-usage-text"></p></div>'; enrolledAuthTargetElementTwo.after(enrolledDuoAuthElement); if (document.querySelectorAll('.authenticator-list-title').length > 1) { document.querySelectorAll('.authenticator-list-title')[1].style.display = 'none'; } } else { if (!isDuoEnrolled) { isDuoEnrolled = true; var enrolledAuthTargetElement = document.querySelector('.authenticator-list-title'); var enrolledAuthElement = document.createElement('div'); enrolledAuthElement.setAttribute('id', 'custom-enrolled-factor'); enrolledAuthElement.setAttribute('class', 'authenticator-list-title'); enrolledAuthElement.innerText = 'Enrolled factors'; enrolledAuthTargetElement.before(enrolledAuthElement); var enrolledAuthTargetElementTwo = document.querySelector('#custom-enrolled-factor'); var enrolledDuoAuthElement = document.createElement('div'); enrolledDuoAuthElement.setAttribute('id', 'custom-duo-enrolled-factor'); enrolledDuoAuthElement.setAttribute('class', 'authenticator-row clearfix'); enrolledDuoAuthElement.innerHTML = '<div class="authenticator-icon-container"><div class="factor-icon authenticator-icon duo-totp" role="img" aria-label="Authenticator logo"></div></div><div class="authenticator-description"><h3 class="authenticator-label no-translate">Duo<span class="icon success-16-green" style="float: right;"></span></h3><p class="authenticator-usage-text"></p></div>'; enrolledAuthTargetElementTwo.after(enrolledDuoAuthElement); if (document.querySelectorAll('.authenticator-list-title').length > 1) { document.querySelectorAll('.authenticator-list-title')[1].style.display = 'none'; } } } } } } for (var j = 0; j < document.querySelectorAll('.authenticator-row').length; j++) { if (document.querySelectorAll('.authenticator-row')[j].getAttribute('id') == null && isDuoEnrolled) { document.querySelectorAll('.authenticator-row')[j].style.display = 'none'; } } })["catch"](function (error) { console.log(error); }); } function ifInitiateDuoFlow() { if (document.querySelectorAll('.list-content')[0]) { var enrollChildren = Array.prototype.slice.call(document.querySelectorAll('.list-content')[0].children); if (enrollChildren.length > 0) { enrollChildren.forEach(function (item) { if (item.getAttribute('class') === 'authenticator-row clearfix') { if (item.children[1].children[0].innerText === 'Email') { } else if (item.children[1].children[0].innerText === 'Duo' || item.children[1].children[0].innerText === 'Duo Mobile' || item.children[1].children[0].innerText === 'Duo TOTP') { initDuoFlow(); } } }); } } } function initDuoFlow() { hideLang(); if (document.querySelector('.skip-all')) { document.querySelector('.skip-all').innerText = 'Finish'; } if (sessionStorage.getItem('user') !== '' && sessionStorage.getItem('user') !== null) { enrolledFactorsInfo(sessionStorage.getItem('user')); } else if (localStorage.getItem('user') !== '' && localStorage.getItem('user') !== null) { enrolledFactorsInfo(localStorage.getItem('user')); } if (document.querySelectorAll('.list-content')[0]) { var enrollChildren = Array.prototype.slice.call(document.querySelectorAll('.list-content')[0].children); enrollChildren.forEach(function (item) { if (item.getAttribute('class') === 'authenticator-row clearfix') { if (item.children[1].children[0].innerText === 'Google Authenticator') { item.children[1].children[2].innerHTML = ''; item.children[1].children[2].style.display = 'none'; } if (item.children[1].children[0].innerText === 'Duo' || item.children[1].children[0].innerText === 'Duo TOTP') { item.children[0].children[0].classList.remove("mfa-hotp"); item.children[0].children[0].classList.add("duo-totp"); item.children[1].children[0].innerText = $.i18n('DUO_TOTP_TITLE'); } } }); } var div_setup_btn = document.createElement('div'); div_setup_btn.setAttribute("id", "duo-setup-btn"); div_setup_btn.setAttribute("class", "authenticator-button"); div_setup_btn.setAttribute("data-se", "custom_otp_duo"); div_setup_btn.innerHTML = "<a data-se=\"button\" class=\"button select-factor link-button\">".concat($.i18n('SETUP_BTN_LABEL'), "</a>"); var targetDiv1 = document.querySelector('.authenticator-usage-text'); targetDiv1.after(div_setup_btn); if (document.querySelectorAll('.authenticator-button')[1]) { document.querySelectorAll('.authenticator-button')[1].remove(); } if (document.querySelector('.authenticator-usage-text')) { document.querySelector('.authenticator-usage-text').innerText = ''; } document.querySelector('#duo-setup-btn').addEventListener('click', function () { document.querySelector('.authenticator-list').style.display = 'none'; if (document.querySelector('.beacon-container')) { document.querySelector('.beacon-container').setAttribute('style', 'transform: scale(1, 1); text-indent: 1px;'); document.querySelector('.beacon-container').innerHTML = '<div><div class="beacon-blank auth-beacon"><div class="beacon-blank js-blank-beacon-border auth-beacon-border"></div></div><div class="bg-helper auth-beacon auth-beacon-factor duo-totp" data-se="factor-beacon"><div class="okta-sign-in-beacon-border auth-beacon-border"></div></div><div data-type="factor-types-dropdown" class="factors-dropdown-wrap"></div></div>'; if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '40px'; } } var newObserver = new MutationObserver(function (mutationsList) { if (mutationsList[0]['target']['outerHTML'].indexOf('duo-code-err-id') === -1) { document.querySelector('.o-form-error-container ').style.display = 'none'; } else { document.querySelector('.o-form-error-container ').style.display = 'block'; } }); newObserver.observe(document.querySelector('.o-form-error-container'), { attributes: true, childList: true, subtree: true }); duoSetupScreenOne(); }); if (document.querySelectorAll('.list-content')[1]) { document.querySelectorAll('.list-content')[1].children.forEach(function (item) { if (item['dataset']['se'] === 'CUSTOM_HOTP') { item.children[0].children[0].classList.remove("mfa-hotp"); item.children[0].children[0].classList.add("duo-totp"); item.children[1].children[0].innerText = $.i18n('DUO_TOTP_TITLE'); } }); } } // Triggered when the widget transitions to a new page and animations have finished oktaSignIn.on("afterRender", function (contxt) { showScreenSpinner(false); updateWidgetContent(locale, contxt.controller || contxt.formName); if (typeof contxt.controller == 'function') { if (document.querySelector('.icon-cisco')) { $("span.icon-cisco").css("padding-bottom", "40px"); } } console.log('context ', contxt); if (contxt.formName === 'enroll-profile' && contxt.controller == null) { updateWidgetContent(locale, contxt.formName); emailValidation(); if (document.querySelector('.beacon-loading')) { document.querySelector('.beacon-loading').style.display = 'none'; } sessionStorage.setItem("didDiscover", "true"); $(".btn-group").show(); updateRegister(); createRepelacableElements(); inputValidation("[name='coiFirstName']", "coiFirstName", /^[a-zA-Z \-_.']+$/, "INVALID_NAME_ERROR", ["input[type='submit']"]); inputValidation("[name='coiLastName']", "coiLastName", /^[a-zA-Z \-_.']+$/, "INVALID_NAME_ERROR", ["input[type='submit']"]); } else if (contxt.formName === 'enroll-profile' && contxt.controller === 'registration') { updateRegisterProgressive(contxt); } else if (contxt.formName === 'challenge-authenticator' && contxt.controller !== 'mfa-verify-password' && contxt.controller !== 'mfa-verify-passcode' && contxt.controller !== 'mfa-verify') { hideLang(); if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } if (document.querySelector('.bg-helper')) { document.querySelector('.bg-helper').classList.remove("mfa-hotp"); document.querySelector('.bg-helper').classList.add("duo-totp"); } if (document.querySelector('.auth-footer') && document.querySelector('.auth-footer').children) { for (var i = 0; i < document.querySelector('.auth-footer').children.length; i++) { if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'factorPageHelpLink') { document.querySelector('.auth-footer').childNodes[i].remove(); } } } } else if (contxt.formName === 'challenge-authenticator' && contxt.controller === 'mfa-verify') { if (document.querySelector('.auth-footer') && document.querySelector('.auth-footer').children) { for (var i = 0; i < document.querySelector('.auth-footer').children.length; i++) { if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'factorPageHelpLink') { document.querySelector('.auth-footer').childNodes[i].remove(); } } } } else if (contxt.formName === 'terminal') { hideLang(); if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } if (document.querySelectorAll('.enduser-email-otp-only--info')) { for (var i = 0; i < document.querySelectorAll('.enduser-email-otp-only--info').length; i++) { document.querySelectorAll('.enduser-email-otp-only--info')[i].style.display = 'none'; } } } else if (contxt.formName === 'enroll-authenticator' && contxt.controller !== 'enroll-email') { customizePasswordRules(); hideLang(); if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } } else if (contxt.formName === 'select-authenticator-enroll' && contxt.controller == null) { initDuoFlow(); } else if (contxt.formName === 'select-authenticator-enroll' && contxt.controller == 'enroll-choices') { //initDuoFlow(); hideLang(); ifInitiateDuoFlow(); // testing } else if (contxt.formName === 'select-authenticator-authenticate') { selectSecurityMethod(); if (document.querySelector('.auth-footer') && document.querySelector('.auth-footer').children) { for (var i = 0; i < document.querySelector('.auth-footer').children.length; i++) { if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'factorPageHelpLink') { document.querySelector('.auth-footer').childNodes[i].remove(); } } } if (document.querySelector('.beacon-container')) { document.querySelector('.beacon-container').removeAttribute('style'); document.querySelector('.beacon-container').innerHTML = ''; } } switch (contxt.controller || contxt.formName) { case "mfa-verify-passcode": if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } if (document.querySelector('.auth-footer') && document.querySelector('.auth-footer').children) { for (var i = 0; i < document.querySelector('.auth-footer').children.length; i++) { if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'factorPageHelpLink') { document.querySelector('.auth-footer').childNodes[i].remove(); } if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'switchAuthenticator') { document.querySelector('.auth-footer').childNodes[i].remove(); } } } if (document.querySelector('.okta-form-subtitle')) { document.querySelector('.okta-form-subtitle').innerHTML = $.i18n('UNLOCK_ACCOUNT_PAGE_UPDATED_MSG'); } if (document.querySelector('.enter-auth-code-instead-link')) { document.querySelector('.enter-auth-code-instead-link').addEventListener('click', function (e) { setTimeout(function () { document.querySelector('.okta-form-subtitle').innerHTML = $.i18n('UNLOCK_ACCOUNT_PAGE_UPDATED_MSG'); }, 100); }); } break; case "select-authenticator-unlock-account": hideLang(); var emailLabel = config.i18n[config.language]["primaryauth.username.placeholder"]; $("label[for='account-recovery-username']").text(emailLabel); var htmlString = '<div class="account-lock-desc"><p data-i18n="ACCOUNT_LOCKED_DESC1"></p><p data-i18n="ACCOUNT_LOCKED_DESC2"></p><br><p data-i18n="ACCOUNT_LOCKED_DESC3"></p><p data-i18n="ACCOUNT_LOCKED_DESC4"></p><br></div>'; if ($(".account-lock-desc").length <= 0) { $("h1.okta-form-title.o-form-head").after(htmlString); } $(".container-main").i18n(); inputValidation("#".concat(document.getElementsByName('identifier')[0].id), "".concat(document.getElementsByName('identifier')[0].id), /^[^@]+@[^@]+\.[^@]+$/, "INVALID_EMAIL_ERROR", ["a[data-se='email-button']", "a[data-se='sms-button']"]); if (document.querySelector('.o-form-fieldset')) { renderUnlockAccount(document.querySelector('.o-form-fieldset')); } break; case "authenticator-verification-data": hideLang(); if(contxt.methodType === 'email'){ if(document.querySelectorAll('.okta-form-subtitle')[0]){ document.querySelectorAll('.okta-form-subtitle')[0].textContent = $.i18n('DESC_VERIFY_IDENTITY'); } if(document.querySelectorAll('.okta-form-title')[0]){ document.querySelectorAll('.okta-form-title')[0].textContent = $.i18n('TITLE_VERIFY_IDENTITY'); } if(document.querySelector('.button-primary')){ document.querySelector('.button-primary').value = $.i18n('SEND_ME_AN_EMAIL_BTN_LABEL'); } } if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } if (document.getElementsByClassName('auth-footer')) { for (var i = 0; i < document.getElementsByClassName('auth-footer')[0].childNodes.length; i++) { if (document.getElementsByClassName('auth-footer')[0].childNodes[i].getAttribute('data-se') === 'factorPageHelpLink') { document.getElementsByClassName('auth-footer')[0].childNodes[i].remove(); } if (document.getElementsByClassName('auth-footer')[0].childNodes[i].getAttribute('data-se') === 'switchAuthenticator') { document.getElementsByClassName('auth-footer')[0].childNodes[i].remove(); } } } break; case "mfa-verify-password": setTimeout(function () { if (screen.height >= 455 || screen.width >= 580) { window.scrollTo({ top: 300, left: 0, behavior: "smooth" }); } }, 2000); hideLang(); wcd(); if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } if (document.querySelector('.identifier')) { sessionStorage.setItem('user', document.querySelector('.identifier').innerText); } if (document.querySelector('.js-factorPageHelpLink')) { document.querySelector('.js-factorPageHelpLink').setAttribute('target', '_self'); } if (document.querySelector('.auth-footer').childNodes.length > 1) { var targetNode = document.querySelector('.auth-footer').childNodes[1]; var aLink = document.createElement('a'); aLink.setAttribute('data-se', 'help'); aLink.setAttribute('href', 'https://www.cisco.com/c/en/us/about/help/login-account-help.html'); aLink.setAttribute('class', 'link js-help'); aLink.setAttribute('style', 'margin-left: -10px'); aLink.innerText = $.i18n('HELP_LINK_LABEL'); targetNode.after(aLink); } if (document.querySelector('.auth-footer') && document.querySelector('.auth-footer').children) { for (var i = 0; i < document.querySelector('.auth-footer').children.length; i++) { if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'factorPageHelpLink') { document.querySelector('.auth-footer').childNodes[i].remove(); } if (document.querySelector('.auth-footer').childNodes[i].getAttribute('data-se') === 'switchAuthenticator') { document.querySelector('.auth-footer').childNodes[i].remove(); } } } break; case "enroll-email": if (document.querySelector('.button-primary')) { setTimeout(function () { document.querySelector('.button-primary').value = $.i18n('VERIFY_BTN_LABEL'); }, 1000); } hideLang(); if (document.querySelector('.identifier')) { localStorage.setItem('user', document.querySelector('.identifier').innerText); } if (document.querySelector('.auth-footer')) { if (document.querySelector('.auth-footer').childNodes.length > 1) { document.querySelector('.auth-footer').childNodes[0].remove(); } } if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } break; case "idp-discovery": if (sessionStorage.getItem('user') && sessionStorage.getItem('user') != null) { sessionStorage.removeItem('user'); } if (context) { if (context.target.clientId) { if (cxMobileAppsArray.includes(context.target.clientId) && isMobile.any()) { if (document.querySelector('.content-container')) { document.querySelector('.content-container').style.display = 'none'; } } } } $(".link.js-forgot-password").hide(); $(".btn-group").show(); sessionStorage.setItem("didDiscover", "true"); inputValidation("#idp-discovery-username", "idp-discovery-username", /^[^@]+@[^@]+\.[^@]+$/, "INVALID_EMAIL_ERROR", ["#idp-discovery-submit"]); break; case "primary-auth": setTimeout(function () { if (screen.height >= 455 || screen.width >= 580) { window.scrollTo({ top: 300, left: 0, behavior: "smooth" }); } }, 1000); showLang(); if (window.location.href === "".concat(config.baseUrl, "/signin/login")) { window.location.href = config.baseUrl; } ///////////////// auto redirection to registration page ////////// var urlParams = new URLSearchParams(window.location.search); if (urlParams.has('register') && urlParams.get('register') === 'true') { if (document.querySelector('.signup-link')) { if (document.querySelector('.js-enroll')) { document.querySelector('.js-enroll').click(); } } } /////// if (document.getElementsByClassName('sign-in-with-idp')[0]) { document.getElementsByClassName('sign-in-with-idp')[0].style.display = 'none'; } if (sessionStorage.getItem('user') && sessionStorage.getItem('user') != null) { sessionStorage.removeItem('user'); } if (localStorage.getItem('user') && localStorage.getItem('user') != null) { } ///// if (document.getElementsByName('identifier')[0]) { document.getElementsByName('identifier')[0].focus(); // localStorage.setItem('user', document.getElementsByName('identifier')[0].value); } if (document.querySelector('.beacon-container')) { document.querySelector('.beacon-container').removeAttribute('style'); document.querySelector('.beacon-container').innerHTML = ''; } //update widget after wcd responds if (document.querySelectorAll('.o-form-explain')[0]) { document.querySelectorAll('.o-form-explain')[0].style.display = 'none'; } if (document.querySelectorAll('.o-form-input-name-rememberMe')[0]) { document.querySelectorAll('.o-form-input-name-rememberMe')[0].style.display = 'none'; // to hid 'Keep me signed in' checkbox } if(detectIE()){ rememberMeIE() }else{ rememberMe(); } if (document.querySelectorAll('.auth-footer')[0]) { if (document.querySelectorAll('.auth-footer')[0].childNodes[1]) { document.querySelectorAll('.auth-footer')[0].childNodes[1].style['margin-left'] = '-10px'; } } var nodeA = document.querySelectorAll('.js-help')[0]; var nodeB = document.querySelectorAll(".js-custom")[0]; swapElements(nodeA, nodeB); break; case "refresh-auth-state": if (document.getElementsByClassName('primary-auth-container')[0]) { if (document.getElementsByClassName('primary-auth-container')[0].childNodes.length > 0) { document.getElementsByClassName('primary-auth-container')[0].style.display = 'none'; } } break; case "forgot-password": hideLang(); if (document.querySelector('.icon-cisco')) { document.querySelector('.icon-cisco').style['margin-bottom'] = '25px'; } sessionStorage.setItem("didDiscover", "true"); $(".btn-group").show(); $(".link.js-switchAuthenticator").hide(); inputValidation("#account-recovery-username", "account-recovery-username", /^[^@]+@[^@]+\.[^@]+$/, "INVALID_EMAIL_ERROR", ["a[data-se='email-button']", "a[data-se='sms-button']"]); break; case "password-reset": break; case "registration-complete": if (!$(".verifyEmail")[0]) $("<p class='verifyEmail' style='color: #777; padding-top: 10px;'>" + userEmail + "<p>").appendTo(".title"); break; case "mfa-verify": sessionStorage.setItem("didDiscover", "true"); $("span.icon-cisco").css("padding-bottom", "40px"); if (document.getElementsByTagName('form')[0] && document.getElementsByTagName('form')[0].getAttribute('data-se') && document.getElementsByTagName('form')[0].getAttribute('data-se') === 'factor-totp') { if (document.getElementsByTagName('form')[0].children[0] && document.getElementsByTagName('form')[0].children[0].children[1] && document.getElementsByTagName('form')[0].children[0].children[1].innerHTML.indexOf('Duo') > -1) { document.getElementsByTagName('form')[0].children[0].children[0].innerText = $.i18n('DUO_TOTP_TITLE'); } } setTimeout(function () { if (document.querySelectorAll('.mfa-hotp')[0]) { if (document.querySelectorAll('.mfa-hotp')[0].classList.value.indexOf('mfa-hotp') > -1) { document.querySelectorAll('.mfa-hotp')[0].classList.remove("mfa-hotp"); document.querySelectorAll('.auth-beacon-factor')[0].classList.add("duo-totp"); } } }, 10); break; case "enroll-choices": break; case "enroll-hotp": if (document.querySelectorAll('.mfa-hotp')[0]) { if (document.querySelectorAll('.mfa-hotp')[0].classList.value.indexOf('mfa-hotp') > -1) { document.querySelectorAll('.mfa-hotp')[0].classList.remove("mfa-hotp"); document.querySelectorAll('.auth-beacon-factor')[0].classList.add("duo-totp"); document.getElementsByTagName('form')[0].children[0].children[0].innerText = "".concat($.i18n('SETUP_BTN_LABEL'), " ").concat($.i18n('DUO_TOTP_TITLE')); if (document.querySelector('.icon-cisco')) { $("span.icon-cisco").css("padding-bottom", "40px"); } if (document.querySelector('.o-form-fieldset-container')) { document.querySelector('.o-form-fieldset-container').style.display = 'none'; duoSetupScreenOne(); } } } break; case "enroll-totp": if (document.querySelector('.icon-cisco')) { $("span.icon-cisco").css("padding-bottom", "40px"); } break; case "barcode-totp": if (document.querySelector('.icon-cisco')) { $("span.icon-cisco").css("padding-bottom", "40px"); } break; case "activate-totp": if (document.querySelector('.icon-cisco')) { $("span.icon-cisco").css("padding-bottom", "40px"); } break; case "account-unlock": var emailLabel = config.i18n[config.language]["primaryauth.username.placeholder"]; $("label[for='account-recovery-username']").text(emailLabel); var htmlString = '<div class="account-lock-desc"><p data-i18n="ACCOUNT_LOCKED_DESC1"></p><p data-i18n="ACCOUNT_LOCKED_DESC2"></p><br><p data-i18n="ACCOUNT_LOCKED_DESC3"></p><p data-i18n="ACCOUNT_LOCKED_DESC4"></p><br></div>'; if ($(".account-lock-desc").length <= 0) { $("h1.okta-form-title.o-form-head").after(htmlString); } $(".container-main").i18n(); inputValidation("#account-recovery-username", "account-recovery-username", /^[^@]+@[^@]+\.[^@]+$/, "INVALID_EMAIL_ERROR", ["a[data-se='email-button']", "a[data-se='sms-button']"]); break; case "account-unlocked": var htmlString = '<div style="margin-top: 20px;"> <a class="button button-primary button-wide link-button" href="' + config.baseUrl + '/signin/forgot-password" data-i18n="TITLE_PASSWORD_RESET"></a></div>'; var loginLabel = config.i18n[config.language]["primaryauth.submit"]; $("h1").attr("data-i18n", "TITLE_ACCOUNT_UNLOCK"); $("p.okta-form-subtitle").attr("data-i18n", "ACCOUNT_UNLOCKED_DESC"); $("p.okta-form-subtitle").css("padding-bottom", "10px"); $("a[data-se='back-button'").text(loginLabel); $("a[data-se='back-button'").after(htmlString); $(".container-main").i18n(); break; } }); oktaSignIn.on('afterError', function (context, error) { if (context.controller === "registration") { if (error.message === "Password requirements were not met. ") { var passError = config.i18n[userLang]["registration.error.password.passwordRequirementsNotMet"]; $($(".okta-form-infobox-error.infobox.infobox-error p")[0]).html(passError); } } else if (context.controller === 'recovery-loading') { var recError = config.i18n[userLang]["errors.E0000105"]; $($(".okta-form-infobox-error.infobox.infobox-error p")[0]).html(recError); } else if (context.controller === 'enroll-email') { setTimeout(function () { $($(".okta-form-infobox-error.infobox.infobox-error p")[0]).html($.i18n('DEACTIVATED_USER_MSG')); }, 50); // custom error message for deactivated user } }); oktaSignIn.renderEl({ el: "#okta-login-container" }, function success(res) { if (res.status === "SUCCESS") { if (res.type === "SESSION_STEP_UP") { // Debugging Eventbase issue // If the widget is not configured for OIDC and the authentication type is SESSION_STEP_UP, // the response will contain user metadata and a stepUp object with the url of the resource // and a 'finish' function to navigate to that url res.stepUp.finish(); return; } localStorage.setItem("isLoggedIn", "false"); setTimeout(function () { OktaUtil.completeLogin(res); }, 1000); } }, function error(err) { console.log(err.message, err); }); } </script> <script type="text/javascript" nonce="b38756395774a0d5fdee634de374bcf4" src="/_5qADB1syX/Lj9qnR/LTgQ/XE7Xpb2bcN8tuw/aXliFiNJAwE/S05/WM3lkVFo"></script></body> </html>