1PrepareLoginIdeosso=function(params){this._ideossoUrl=params["ideossoUrl"];this._serviceUrl=params["serviceUrl"];this._currentStateId=params["_currentStateId"]?params["_currentStateId"]:"portalRedirect";this._prepareLoginUrl=params["prepareLoginUrl"]?params["prepareLoginUrl"]:params["ideossoUrl"]+"prepareLogin";this._jsonResponse={}};PrepareLoginIdeosso.prototype.constructor=PrepareLoginIdeosso;PrepareLoginIdeosso.Classique="Classique";PrepareLoginIdeosso.mailOttFort="mailOttFort";PrepareLoginIdeosso.smsOttFort="smsOttFort";PrepareLoginIdeosso.OttFort="OttFort";PrepareLoginIdeosso.X509="X509";PrepareLoginIdeosso.SAML2WebSSO="SAML2WebSSO";PrepareLoginIdeosso.FranceConnectParticulier="france-connect-particulier";PrepareLoginIdeosso.FranceConnectParticulierDev="france-connect-particulier-dev";PrepareLoginIdeosso.FranceConnectPlusParticulier="france-connect-plus-particulier";PrepareLoginIdeosso.FranceConnectPro="france-connect-pro";PrepareLoginIdeosso.FranceConnectProDev="france-connect-pro-dev";PrepareLoginIdeosso.ProSanteConnect="prosante-connect";PrepareLoginIdeosso.ProSanteConnectDev="prosante-connect-dev";PrepareLoginIdeosso.OpenIDConnect="openid-connect";PrepareLoginIdeosso.NewPassword="NewPassword";PrepareLoginIdeosso.AUTH_MODES=[PrepareLoginIdeosso.mailOttFort,PrepareLoginIdeosso.smsOttFort,PrepareLoginIdeosso.Classique];PrepareLoginIdeosso.DEFAULT_AUTH_LEVELS=[{id:"login",indice:1,priority:100,authMode:PrepareLoginIdeosso.Classique}];PrepareLoginIdeosso.prototype.getIdeossoUrl=function(){return this._ideossoUrl};PrepareLoginIdeosso.prototype.getServiceUrl=function(){return this._serviceUrl};PrepareLoginIdeosso.prototype.getVerifiedServiceUrl=function(){return this._verifiedServiceUrl};PrepareLoginIdeosso.prototype.getCurrentStateId=function(){return this._currentStateId};PrepareLoginIdeosso.prototype.getAuthMode=function(){return this._authMode};PrepareLoginIdeosso.prototype.getAuthModes=function(){return this._authModes};PrepareLoginIdeosso.prototype.getEventId=function(){return this._eventId};PrepareLoginIdeosso.prototype.getStatus=function(){return this._status};PrepareLoginIdeosso.prototype.getUserDomain=function(){return this._userDomain};PrepareLoginIdeosso.prototype.getServiceDomain=function(){return this._serviceDomain};PrepareLoginIdeosso.prototype.isAuthentified=function(){return this._username!=undefined&&this._username!=""};PrepareLoginIdeosso.prototype.getUsername=function(){return this._username};PrepareLoginIdeosso.prototype.getOttId=function(){return this._ottId};PrepareLoginIdeosso.prototype.getDescription=function(){return this._description};PrepareLoginIdeosso.prototype.getLibelleCourt=function(){return this._libelleCourt};PrepareLoginIdeosso.prototype.getError=function(){return this._errorDescription};PrepareLoginIdeosso.prototype.getErrorCode=function(){return this._errorCode};PrepareLoginIdeosso.prototype.toString=function(){return"PrepareLoginIdeosso"};PrepareLoginIdeosso.prototype.getIdeoSSoVersion=function(){return this._ideoSSoVersion};PrepareLoginIdeosso.prototype.getAcceptingLoginUTF8=function(){return this._acceptingLoginUTF8};PrepareLoginIdeosso.prototype.getForceLoginUTF8=function(){return this._forceLoginUTF8};PrepareLoginIdeosso.prototype.getPortalLocale=function(){return this._portalLocale};PrepareLoginIdeosso.prototype.getJsonResponse=function(){return this._jsonResponse};PrepareLoginIdeosso.prototype.getForceOttCode=function(){return this._forceOttCode};PrepareLoginIdeosso.prototype.getNiveauxAuthentification=function(){return this._authLevels};PrepareLoginIdeosso.prototype.getWindowLocation=function(){if(this._checkLocation==true||this._checkLocation=="true"){if(this._verifiedLocation){return this._verifiedLocation}}return window.document.URL.toString()};PrepareLoginIdeosso.getInstance=function(params){if(PrepareLoginIdeosso._instance==null&¶ms!=null){PrepareLoginIdeosso._instance=new PrepareLoginIdeosso(params)}return PrepareLoginIdeosso._instance};PrepareLoginIdeosso.prototype.init=function(authMode,callback){var params={service:this._serviceUrl,location:window.location.href};if(authMode){params["authMode"]=authMode}this._status=undefined;var req=new JSONScriptRequest;req.open("GET",this._prepareLoginUrl);req.onreadystatechange=function(){if(req.readyState==4){var instance=PrepareLoginIdeosso.getInstance();instance._prepareLoginSuccess(req.responseJSON,callback)}};req.send(AuthentificationIdeosso.toQueryString(params))};PrepareLoginIdeosso.prototype._prepareLoginSuccess=function(jsonResponse,callback){if("prepareLoginSuccess"==jsonResponse["serviceResponse"]){this._status=true;var authMode=jsonResponse["authMode"];this._authMode=authMode;this._eventId="submit"+authMode;this._authModes=jsonResponse["availableAuthModes"];this._libelleCourt=jsonResponse["libelleCourt"];this._username=jsonResponse["username"];this._ottId=jsonResponse["ottId"];this._description=jsonResponse["description"];this._ideoSSoVersion=jsonResponse["ideoSSoVersion"];this._acceptingLoginUTF8=jsonResponse["acceptingLoginUTF8"];this._forceLoginUTF8=jsonResponse["forceLoginUTF8"];this._ideoDirectoryDomain=jsonResponse["ideoDirectoryDomain"];this._serviceDomain=jsonResponse["serviceDomain"];this._serviceDomainName=jsonResponse["serviceDomainName"];this._userDomain=jsonResponse["userDomain"];this._userDomainName=jsonResponse["userDomainName"];this._portalLocale=jsonResponse["portalLocale"];this._forceOttCode=jsonResponse["forceOttCode"];this._authLevels=jsonResponse["authLevels"];this._authModesDynamic=jsonResponse["authModesDynamic"];this._checkLocation=jsonResponse["checkLocation"];this._verifiedLocation=jsonResponse["verifiedLocation"];this._verifiedServiceUrl=jsonResponse["service"]}else if("prepareLoginFailure"==jsonResponse["serviceResponse"]){this._status=false;var authMode=jsonResponse["authMode"];this._authMode=authMode;this._eventId="submit"+authMode;this._authModes=jsonResponse["availableAuthModes"];this._libelleCourt=jsonResponse["libelleCourt"];this._errorDescription=jsonResponse["description"];this._errorCode=jsonResponse["code"];this._ideoSSoVersion=jsonResponse["ideoSSoVersion"];this._acceptingLoginUTF8=jsonResponse["acceptingLoginUTF8"];this._forceLoginUTF8=jsonResponse["forceLoginUTF8"];this._ideoDirectoryDomain=jsonResponse["ideoDirectoryDomain"];this._serviceDomain=jsonResponse["serviceDomain"];this._serviceDomainName=jsonResponse["serviceDomainName"];this._userDomain=jsonResponse["userDomain"];this._userDomainName=jsonResponse["userDomainName"];this._portalLocale=jsonResponse["portalLocale"];this._forceOttCode=jsonResponse["forceOttCode"];this._authLevels=jsonResponse["authLevels"];this._authModesDynamic=jsonResponse["authModesDynamic"];this._checkLocation=jsonResponse["checkLocation"];this._verifiedLocation=jsonResponse["verifiedLocation"];this._verifiedServiceUrl=jsonResponse["service"];if(jsonResponse["code"]&&jsonResponse["code"]=="error.authentication.credentials.bad.incompatible.authlevel.for.service"){if(typeof js_constant["cbVerifyAuthLevel"]==="undefined"||js_constant["cbVerifyAuthLevel"]===true){afficheMessage("{LANG ideosso AuthNiveau Warning} {LANG ideosso Reconnect Warning}","ideosso_error")}this._status=true}}if(this._authLevels==null||this._authLevels.length==0){this._authLevels=PrepareLoginIdeosso.DEFAULT_AUTH_LEVELS}this._jsonResponse=jsonResponse;if(callback){callback()}};PrepareLoginIdeosso.prototype.clickToResetOttFort=function(){AuthentificationIdeosso.$("OttFortCode").value="";var params={resetOttFort:true};var req=new JSONScriptRequest;req.open("GET",this._prepareLoginUrl);req.send(AuthentificationIdeosso.toQueryString(params));return false};AuthentificationIdeosso=function(params){this._prepareLogin=PrepareLoginIdeosso.getInstance(params);this._prepareLoginOTT=PrepareLoginOTTIdeosso.getInstance(params);this._prepareLoginSecurityCode=PrepareLoginSecurityCodeIdeosso.getInstance(params);this._formId=params["formId"];this._targetUrl=params["targetUrl"];this._redirectUrl=params["redirectUrl"];this._window=params["window"];this._themeName=params["theme"];this._displayErrorsHandler=params["displayErrorsHandler"];this._displayInfosHandler=params["displayInfosHandler"];this._redirectToServiceHandler=params["redirectToServiceHandler"];
1this._captchaUrl=params["_captchaUrl"]?params["_captchaUrl"]:params["ideossoUrl"]+"CaptchaServlet";this._securityCodeUrl=params["_securityCodeUrl"]?params["_securityCodeUrl"]:params["ideossoUrl"]+"SecurityCodeServlet";this._currentError=null;this._currentErrorCodes=null;this._currentInfo=null;this._currentInfoCodes=null;this._additionalParameterHash=params["additionalParameterHash"]?params["additionalParameterHash"]:undefined;this._validationProtocol=params["validationProtocol"];this._formCharset=params["formCharset"];if(this._formCharset==undefined){this._formCharset=document.characterSet?document.characterSet:document.charset}this._loginUrl=params["loginUrl"];this._targetLocale=params["targetLocale"];this._renew=params["renew"]?params["renew"]:null;this._formShowMeStyleDisplay=params["formShowMeStyleDisplay"]?params["formShowMeStyleDisplay"]:"block";this._formHideMeStyleDisplay=params["formHideMeStyleDisplay"]?params["formHideMeStyleDisplay"]:"none";this._displayAuthModeHandler=params["displayAuthModeHandler"];this._activeAuthModeHandler=params["activeAuthModeHandler"];this._displayCaptchaHandler=params["displayCaptchaHandler"];this._displayAuthLevelsHandler=params["displayAuthLevelsHandler"]?params["displayAuthLevelsHandler"]:params["displayNiveauxHandler"];this._activeAuthLevelHandler=params["activeAuthLevelHandler"];this._displaySecurityCodeHandler=params["displaySecurityCodeHandler"];this.mySelectionSecurityCode=[]};AuthentificationIdeosso.prototype.constructor=AuthentificationIdeosso;AuthentificationIdeosso.prototype.getAuthMode=function(){return this._prepareLogin.getAuthMode()};AuthentificationIdeosso.prototype.getAuthModes=function(){return this._prepareLogin.getAuthModes()};AuthentificationIdeosso.prototype.getOttId=function(){return this._prepareLogin.getOttId()};AuthentificationIdeosso.prototype.getServiceDomain=function(){return this._prepareLogin._serviceDomain};AuthentificationIdeosso.prototype.getServiceDomainName=function(){return this._prepareLogin._serviceDomainName};AuthentificationIdeosso.prototype.getUserDomain=function(){return this._prepareLogin._userDomain};AuthentificationIdeosso.prototype.getUserDomainName=function(){return this._prepareLogin._userDomainName};AuthentificationIdeosso.prototype.isAuthModeEnabled=function(testMode){var authModes=this.getAuthModes();if(authModes==null){return false}for(var i=0;i<authModes.length;i++){if(authModes[i]==testMode){return true}}return false};AuthentificationIdeosso.prototype.isAuthentified=function(){return this._prepareLogin.isAuthentified()};AuthentificationIdeosso.prototype.getUsername=function(){return this._prepareLogin.getUsername()};AuthentificationIdeosso.prototype.toString=function(){return"AuthentificationIdeosso"};AuthentificationIdeosso.prototype.getServiceDescription=function(){return this._prepareLogin.getDescription()};AuthentificationIdeosso.prototype.getServiceLibelleCourt=function(){return this._prepareLogin.getLibelleCourt()};AuthentificationIdeosso.prototype.getIdeoSSoVersion=function(){return this._prepareLogin.getIdeoSSoVersion()};AuthentificationIdeosso.prototype.getAcceptingLoginUTF8=function(){return this._prepareLogin.getAcceptingLoginUTF8()};AuthentificationIdeosso.prototype.getForceLoginUTF8=function(){return this._prepareLogin.getForceLoginUTF8()};AuthentificationIdeosso.prototype.getForceOttCode=function(){return this._prepareLogin.getForceOttCode()};AuthentificationIdeosso.prototype.getDynamicAuthModes=function(){return this._prepareLogin._authModesDynamic};AuthentificationIdeosso.prototype.getAuthConfig=function(authMode){var resp=this._prepareLogin.getJsonResponse();var authConfigString=authMode+"Config";var authConfig=resp[authConfigString];return authConfig};AuthentificationIdeosso.prototype.getConfigDisplay=function(){var resp=this._prepareLogin.getJsonResponse();var configDisplay=resp["config"];return eval("("+configDisplay+")")};AuthentificationIdeosso.prototype.getConfigByAuthMode=function(authMode){var auth=AuthentificationIdeosso.getInstance();var config=auth.getConfigDisplay();return config[authMode]};PrepareLoginOTTIdeosso=function(params){this._ideossoUrl=params["ideossoUrl"];this._serviceUrl=params["serviceUrl"];
1this._currentStateId=params["_currentStateId"]?params["_currentStateId"]:"portalRedirect";this._prepareLoginOTTUrl=params["prepareLoginOTTUrl"]?params["prepareLoginOTTUrl"]:params["ideossoUrl"]+"prepareLoginOTT"};PrepareLoginOTTIdeosso.prototype.constructor=PrepareLoginOTTIdeosso;PrepareLoginOTTIdeosso.prototype._prepareLoginOTTSuccess=function(jsonResponse,callback){if("prepareLoginSuccess"==jsonResponse["serviceResponse"]){this._statusOtt=true;var authMode=jsonResponse["mode"];this._authMode=authMode;this._libelle=jsonResponse["libelle"];this._activeCaptcha=jsonResponse["activeCaptcha"];var auth=AuthentificationIdeosso.getInstance();var config=auth.getAuthConfig(authMode);if(config!=undefined){config["activeCaptcha"]=this._activeCaptcha}this._eventId="submit"+authMode}else if("prepareLoginFailure"==jsonResponse["serviceResponse"]){this._statusOtt=false;this._errorDescription=jsonResponse["description"];this._libelleCourt=jsonResponse["libelleCourt"]}if(callback){callback()}};PrepareLoginOTTIdeosso.prototype.init=function(authMode,callback){var idOtt=authMode+"Id";var typeOtt="dropDown"+authMode;var code=document.getElementById("codeCaptcha");if(code==null){code="undefined"}else{code=code.value}var auth=AuthentificationIdeosso.getInstance();var params={service:this._serviceUrl,authMode:authMode,idOtt:document.getElementById(idOtt).value,typeOtt:document.getElementById(typeOtt).value,codeCaptcha:code};this._statusOtt=undefined;this._activeCaptcha=undefined;var req=new JSONScriptRequest;req.open("GET",this._prepareLoginOTTUrl);req.onreadystatechange=function(){if(req.readyState==4){var instance=PrepareLoginOTTIdeosso.getInstance();instance._prepareLoginOTTSuccess(req.responseJSON,callback)}};req.send(AuthentificationIdeosso.toQueryString(params))};AuthentificationIdeosso.prototype.clickOnOttSendCode=function(_authModeOtt){var _callback=function(){var auth=AuthentificationIdeosso.getInstance();if(auth.getStatusOtt()==true){var params={active:auth.getActiveCaptcha(),reload:false};auth.displayCaptcha(params);auth.displayInfos(auth.getLibelle());return false}else{auth.displayErrors(auth.getError());return false}};this._prepareLoginOTT.init(_authModeOtt,_callback);return false};PrepareLoginOTTIdeosso.getInstance=function(params){if(PrepareLoginOTTIdeosso._instance==null&¶ms!=null){PrepareLoginOTTIdeosso._instance=new PrepareLoginOTTIdeosso(params)}return PrepareLoginOTTIdeosso._instance};AuthentificationIdeosso.prototype.getMode=function(){return this._prepareLoginOTT.getMode()};AuthentificationIdeosso.prototype.getActiveCaptcha=function(){return this._prepareLoginOTT._activeCaptcha};AuthentificationIdeosso.prototype.getError=function(){return this._prepareLoginOTT._errorDescription};AuthentificationIdeosso.prototype.getLibelleOtt=function(){return this._prepareLoginOTT._libelleCourt};AuthentificationIdeosso.prototype.getStatusOtt=function(){return this._prepareLoginOTT._statusOtt};AuthentificationIdeosso.prototype.getLibelle=function(){return this._prepareLoginOTT._libelle};AuthentificationIdeosso.prototype.getModeOtt=function(){return this._prepareLoginOTT._authMode};PrepareLoginOTTIdeosso.prototype.getError=function(){return this._errorDescriptionOTT};PrepareLoginSecurityCodeIdeosso=function(params){this._ideossoUrl=params["ideossoUrl"];this._serviceUrl=params["serviceUrl"];
1this._currentStateId=params["_currentStateId"]?params["_currentStateId"]:"portalRedirect";this._prepareLoginSecurityCodeUrl=params["prepareLoginSecurityCodeUrl"]?params["prepareLoginSecurityCodeUrl"]:params["ideossoUrl"]+"prepareLoginSecurityCode"};PrepareLoginSecurityCodeIdeosso.prototype._prepareLoginSecurityCodeSuccess=function(jsonResponse,callback){if("prepareLoginSuccess"==jsonResponse["serviceResponse"]){this._statusSecurityCode=true}else if("prepareLoginFailure"==jsonResponse["serviceResponse"]){this._statusSecurityCode=false}if(callback){callback()}};AuthentificationIdeosso.prototype.getStatusSecurityCode=function(){return this._prepareLoginSecurityCode._statusSecurityCode};PrepareLoginSecurityCodeIdeosso.getInstance=function(params){if(PrepareLoginSecurityCodeIdeosso._instance==null&¶ms!=null){PrepareLoginSecurityCodeIdeosso._instance=new PrepareLoginSecurityCodeIdeosso(params)}return PrepareLoginSecurityCodeIdeosso._instance};PrepareLoginSecurityCodeIdeosso.prototype.init=function(callback){var auth=AuthentificationIdeosso.getInstance();var params={refresh:true};this._statusSecurityCode=undefined;var req=new JSONScriptRequest;req.open("GET",this._prepareLoginSecurityCodeUrl);req.onreadystatechange=function(){if(req.readyState==4){var instance=PrepareLoginSecurityCodeIdeosso.getInstance();instance._prepareLoginSecurityCodeSuccess(req.responseJSON,callback)}};req.send(AuthentificationIdeosso.toQueryString(params))};AuthentificationIdeosso.prototype.generateListeBlocSecurityCode=function(){var _callback=function(){var auth=AuthentificationIdeosso.getInstance();if(auth.getStatusSecurityCode()){var params={active:true,reload:false};auth.displaySecurityCode(params);return false}};this._prepareLoginSecurityCode.init(_callback);return false};AuthentificationIdeosso.prototype.getLoginUrl=function(){if(this._loginUrl!=undefined){return this._loginUrl}var acceptingLoginUTF8=this.getAcceptingLoginUTF8();var forceLoginUTF8=this.getForceLoginUTF8();var _info=navigator.userAgent;var _ie=_info.indexOf("MSIE")>0&&_info.indexOf("Win")>0&&_info.indexOf("Windows 3.1")<0;if(forceLoginUTF8==true||forceLoginUTF8=="true"||(acceptingLoginUTF8=="true"||acceptingLoginUTF8==true)&&_ie&&this._formCharset!=undefined&&this._formCharset.toLowerCase()=="utf-8"){return"loginUTF8"}return"login"};AuthentificationIdeosso.getInstance=function(params){if(AuthentificationIdeosso._instance==null&¶ms!=null){AuthentificationIdeosso._instance=new AuthentificationIdeosso(params)}return AuthentificationIdeosso._instance};AuthentificationIdeosso.getQueryParams=function(sURL){var hash=[];if(!sURL){sURL=window.document.URL.toString()}sURL=sURL.replace("??","?");if(sURL.indexOf("?")>0){var arrParams=sURL.split("?");var arrURLParams=arrParams[1].split("&");var i=0;for(var i=0;i<arrURLParams.length;i++){var sParam=arrURLParams[i].split("=");var key=sParam[0];var value=unescape(sParam[1]);if(key!=""&&value!=""){var currentValue=hash[key];if(currentValue instanceof Array){currentValue.push(value)}else if(currentValue==undefined){hash[key]=value}else{var tab=[];tab.push(currentValue);tab.push(value);hash[key]=tab}}}}return hash};AuthentificationIdeosso.prototype.getQueryParams=function(){var location=this._prepareLogin.getWindowLocation();if(location){return AuthentificationIdeosso.getQueryParams(location)}return[]};AuthentificationIdeosso.prototype.getCurrentAuthLevel=function(){var queryParams=this.getQueryParams();this._currentAuthLevel=queryParams["authLevel"];return this._currentAuthLevel};AuthentificationIdeosso.prototype.getCurrentErrors=function(){if(!this._currentError){var queryParams=this.getQueryParams();var error=queryParams["error"];if(error instanceof Array){this._currentError=error}else if(error){this._currentError=[error]}else if(this._prepareLogin!==undefined&&this._prepareLogin.getError()){this._currentError=this._prepareLogin.getError()}}return this._currentError};AuthentificationIdeosso.prototype.getCurrentErrorCodes=function(){if(!this._currentErrorCodes){var queryParams=this.getQueryParams();var error=queryParams["errorCode"];if(error instanceof Array){this._currentErrorCodes=error}else if(error){this._currentErrorCodes=[error]}else if(this._prepareLogin!==undefined&&this._prepareLogin.getErrorCode()){this._currentErrorCodes=this._prepareLogin.getErrorCode()}}return this._currentErrorCodes};AuthentificationIdeosso.prototype.getCurrentInfos=function(){if(!this._currentInfo){var queryParams=this.getQueryParams();var info=queryParams["info"];if(info instanceof Array){this._currentInfo=info}else if(info){this._currentInfo=[info]}}return this._currentInfo};AuthentificationIdeosso.prototype.getCurrentInfoCodes=function(){if(!this._currentInfoCodes){var queryParams=this.getQueryParams();var infoCode=queryParams["infoCode"];if(infoCode instanceof Array){this._currentInfoCodes=infoCode}else if(infoCode){this._currentInfoCodes=[infoCode]}}return this._currentInfoCodes};AuthentificationIdeosso.prototype.displayCaptcha=function(params){if(this._displayCaptchaHandler){this._displayCaptchaHandler(params)}};AuthentificationIdeosso.prototype.displayAuthLevels=function(params,niveauId){var authLevels={};if(this._displayAuthLevelsHandler){authLevels=this._displayAuthLevelsHandler(params,niveauId)}for(indi in authLevels){var authLevelConfig=authLevels[indi];var enableParams={};var authMode=authLevelConfig.authMode;var moduleRef="_moduleRef_"+authMode+"_"+authLevelConfig.id+"_";enableParams["moduleRef"]=moduleRef;enableParams["authLevelConfig"]=authLevelConfig;var authModule=AuthentificationIdeosso.getModuleInstance(authMode,moduleRef);if(authModule!=null){authModule.enable(enableParams)}enableParams["module"]=authModule}return authLevels};AuthentificationIdeosso.prototype.activeAuthLevel=function(params){var authLevelConfig=params["authLevelConfig"];if(authLevelConfig){var authMode=authLevelConfig.authMode;var moduleRef="_moduleRef_"+authMode+"_"+authLevelConfig.id+"_";params["moduleRef"]=moduleRef;var authModule=AuthentificationIdeosso.getModuleInstance(authMode,moduleRef);if(authModule!=null){var me=this;authModule.addListener("error.activeAuthLevel#displayErrors",function(errors){me.displayErrors(errors)})}params["module"]=authModule;this.activeAuthMode(authLevelConfig.authMode);this._setFormInput("hidden","client_name",authLevelConfig.id);for(var indi in authLevelConfig.publicProperties){var property=authLevelConfig.publicProperties[indi];var value="";
1if(property.values!=undefined&&property.values[0]!=undefined){value=property.values[0]}this._setFormInput("hidden",property.name,value)}}if(this._activeAuthLevelHandler){this._activeAuthLevelHandler(params)}if(authLevelConfig){var authModule=AuthentificationIdeosso.getModuleInstance(authMode,moduleRef);if(authModule!=null){authModule.init(params)}}};AuthentificationIdeosso.prototype.displaySecurityCode=function(params){if(this._displaySecurityCodeHandler){this._displaySecurityCodeHandler(params)}};AuthentificationIdeosso.prototype.displayAuthMode=function(params){if(this._displayAuthModeHandler){this._displayAuthModeHandler(params);return}if(params!=null){var authMode=params["authMode"];var enable=params["enable"];if(document.getElementById(authMode)!=null){if(enable){document.getElementById(authMode).style.display=this._formShowMeStyleDisplay}else{document.getElementById(authMode).style.display=this._formHideMeStyleDisplay}}}};AuthentificationIdeosso.prototype.activeAuthMode=function(params){if(AuthentificationIdeosso.$("client_name")!=null){AuthentificationIdeosso.$("client_name").value=""}var form=AuthentificationIdeosso.$(this._formId);if(form){form.processSubmit=false}if(this._activeAuthModeHandler){this._activeAuthModeHandler(params)}};AuthentificationIdeosso.prototype.displayErrors=function(errors){if(this._displayErrorsHandler){this._displayErrorsHandler(errors);return}if(errors!=null){for(var i=0;i<errors.length;i++){alert(errors[i])}}};AuthentificationIdeosso.prototype.displayInfos=function(infos){if(this._displayInfosHandler){this._displayInfosHandler(infos);return}if(infos!=null){for(var i=0;i<infos.length;i++){alert(infos[i])}}};AuthentificationIdeosso.prototype.redirectToService=function(){if(!this.isAuthentified()||this._renew=="true"||this._renew==true){return false}if(this._currentErrorCodes!=null&&this._currentErrorCodes.length>0){return false}if(this._currentError!=null&&this._currentError.length>0){return false}var redirectParam="";if(this._redirectUrl!=null&&this._redirectUrl!="undefined"){redirectParam=this._redirectUrl}var params={service:this._prepareLogin.getServiceUrl(),redirect:redirectParam};var queryString=AuthentificationIdeosso.toQueryString(params);var url=this._prepareLogin.getIdeossoUrl()+this.getLoginUrl()+"?"+queryString;if(this._redirectToServiceHandler){this._redirectToServiceHandler(url)}else{window.location.replace(url)}return true};AuthentificationIdeosso.prototype.isAuthentifyForAnotherIDP=function(){return this._redirectUrl!=null&&this._redirectUrl.match(/\?client_name=/)!=null};AuthentificationIdeosso.prototype.logoutAndRedirectToService=function(){var redirectParam="";if(this._redirectUrl!=null&&this._redirectUrl!="undefined"){redirectParam=this._redirectUrl}if(redirectParam!=null&&redirectParam.match(/\?client_name=/)!=null){redirectParam=this._prepareLogin.getServiceUrl()}var params={service:this._prepareLogin.getServiceUrl(),redirect:redirectParam};var queryString=AuthentificationIdeosso.toQueryString(params);var url=this._prepareLogin.getIdeossoUrl()+"logout"+"?"+queryString;window.location.replace(url);return true};AuthentificationIdeosso.toQueryString=function(params){var data=[];for(var cle in params){var valeur=params[cle];if(typeof valeur==="string"||valeur instanceof String){valeur=valeur.split("#")[0]}data.push(cle+"="+encodeURIComponent(valeur))}return data.join("&")};AuthentificationIdeosso.prototype.initForm=function(callback,authMode){var _callback=function(){var auth=AuthentificationIdeosso.getInstance();auth._initForm();if(callback){auth.getCurrentErrors();auth.getCurrentErrorCodes();auth.getCurrentInfos();auth.getCurrentInfoCodes();callback()}};this._prepareLogin.init(authMode,_callback)};AuthentificationIdeosso.prototype.clickToResetOttFort=function(){this._prepareLogin.clickToResetOttFort()};AuthentificationIdeosso.prototype._initForm=function(){var status=this._prepareLogin.getStatus();var userDomain=this._prepareLogin.getUserDomain();var serviceDomain=this._prepareLogin.getServiceDomain();if(status!=true&&(userDomain==undefined||userDomain==serviceDomain)){var message=this._prepareLogin.getError();this.displayErrors([message])}var authModes=this._prepareLogin.getAuthModes();var lbForm=false;if(authModes){for(var j=0;j<PrepareLoginIdeosso.AUTH_MODES.length;j++){var hide=true;for(var i=0;i<authModes.length;i++){if(authModes[i]==PrepareLoginIdeosso.AUTH_MODES[j]){hide=false;break}}if(document.getElementById(PrepareLoginIdeosso.AUTH_MODES[j])){if(hide){this.displayAuthMode({authMode:PrepareLoginIdeosso.AUTH_MODES[j],enable:false})}else{this.displayAuthMode({authMode:PrepareLoginIdeosso.AUTH_MODES[j],enable:true});lbForm=true}}}}if(lbForm&&document.getElementById(this._formId+"Container")){document.getElementById(this._formId+"Container").style.display=this._formShowMeStyleDisplay}var form=document.getElementById(this._formId);if(form){form.processSubmit=false;var authMode=this._prepareLogin.getAuthMode();this._setFormInput("hidden","authMode",authMode);this._setFormInput("hidden","_eventId","submit"+authMode);this._setFormInput("hidden","_currentStateId",this._prepareLogin.getCurrentStateId());this._setFormInput("hidden","redirect",this._redirectUrl);this._setFormInput("hidden","window",this._window);this._setFormInput("hidden","theme",this._themeName);this._setFormInput("hidden","targetUrl",this._targetUrl);
1if("SAML"==this._validationProtocol){this._setFormInput("hidden","TARGET",this._prepareLogin.getServiceUrl())}else{this._setFormInput("hidden","service",this._prepareLogin.getServiceUrl())}var forceLoginUTF8=this._prepareLogin.getForceLoginUTF8();if(forceLoginUTF8=="true"||forceLoginUTF8==true){form.acceptCharset="UTF-8";form.setAttribute("accept-charset","UTF-8")}var locale=this._targetLocale;if(locale==null){locale=this._prepareLogin.getPortalLocale()}if(locale!=null){this._setFormInput("hidden","locale",locale)}if(this._renew!=null){this._setFormInput("hidden","renew",this._renew)}if(this._prepareLogin.getOttId()!=null){this._setFormInput("hidden","ottId",this._prepareLogin.getOttId())}}};AuthentificationIdeosso.prototype.submitForm=function(){var form=document.getElementById(this._formId);if(!form){return false}if(form.processSubmit){return false}form.processSubmit=true;var authMode=form["authMode"];var config=authMode==null?null:this.getAuthConfig(authMode.value);if(config!=undefined){var active=config["activateSecurityCode"];if(active!=null&&(active==true||active=="true")){this._setFormInput("hidden","indiceSecurityCode",config["indiceSecurityCode"]);this._setFormInput("hidden","selectionSecurityCode",this.mySelectionSecurityCode)}}form.action=this._prepareLogin.getIdeossoUrl()+this.getLoginUrl();var button=$(form).find(":submit#OttFortSendButton");button.text(button.data("loading-text"));button.attr("disabled","disabled");form.processSubmit=false;form.submit();return false};AuthentificationIdeosso.prototype.hasSecurityCode=function(authMode){var config=this.getAuthConfig(authMode);var active=false;if(config!=undefined){var active=config["activateSecurityCode"]}return active};AuthentificationIdeosso.clone=function(srcInstance){if(typeof srcInstance!="object"||srcInstance==null){return srcInstance}var newInstance=srcInstance.constructor();for(var i in srcInstance){newInstance[i]=AuthentificationIdeosso.clone(srcInstance[i])}return newInstance};AuthentificationIdeosso.prototype._setFormInput=function(type,name,value){var form=document.getElementById(this._formId);if(!form||!value){return}var inputs=this._getFormInputs(form,type,name);if(!inputs){try{input=document.createElement('<input type="'+type+'" name="'+name+'" value="'+value+'">')}catch(err){input=document.createElement("input")}input.type=type;input.name=name;input.id=name;input.value=value;var divFormInput=document.getElementById(this._formId);divFormInput.appendChild(input)}else{inputs.value=value}};AuthentificationIdeosso.prototype._getFormInputs=function(form,typeName,name){var inputs=form.getElementsByTagName("input");for(var i=0;i<inputs.length;i++){var input=inputs[i];if(typeName&&input.type!=typeName||name&&input.name!=name){}else{return input}}return false};AuthentificationIdeosso.showMe=function(eltId){AuthentificationIdeosso.styleMe(eltId,"")};AuthentificationIdeosso.hideMe=function(eltId){AuthentificationIdeosso.styleMe(eltId,"none")};AuthentificationIdeosso.styleMe=function(eltId,styleName){if(eltId instanceof Array){for(var i=0;i<eltId.length;i++){if(document.getElementById(eltId[i])){document.getElementById(eltId[i]).style.display=styleName}}}else{if(document.getElementById(eltId)){document.getElementById(eltId).style.display=styleName}}};AuthentificationIdeosso.$=function(eltId){return document.getElementById(eltId)};AuthentificationIdeosso.booleanValue=function(value){return value=="true"||value==true};AuthentificationIdeosso.addLoadEvent=function(func){var oldonload=window.onload;if(typeof window.onload!="function"){window.onload=func}else{window.onload=function(){if(oldonload){oldonload()}func()}}};AuthentificationIdeosso.arrayIndexOf=function(array,testValue){if(array==null){return false}for(var i=0;i<array.length;i++){if(array[i]==testValue){return true}}return false};AuthentificationIdeosso.autoResizeWindow=function(window){if(window){var win=window;var body=window.document.body;if(body){setTimeout(function(){var nw=0;var nh=0;if(body.clientHeight<body.offsetHeight){nh=body.offsetHeight-body.clientHeight}if(body.clientWidth<body.offsetWidth){nw=body.offsetWidth-body.clientWidth}if(nw>0||nh>0){win.resizeBy(nw,nh)}},100)}}};AuthentificationIdeosso.moduleFactories={};AuthentificationIdeosso.moduleParams={};AuthentificationIdeosso.moduleIntances={};AuthentificationIdeosso.addModuleFactory=function(authMode,moduleFactory){AuthentificationIdeosso.moduleFactories[authMode]=moduleFactory};AuthentificationIdeosso.setModuleDefaultParams=function(authMode,moduleParams){AuthentificationIdeosso.moduleParams[authMode]=moduleParams};AuthentificationIdeosso.getModuleInstance=function(authMode,moduleRef){var module=null;if(AuthentificationIdeosso.moduleIntances[moduleRef]!=null){module=AuthentificationIdeosso.moduleIntances[moduleRef]}else if(AuthentificationIdeosso.moduleFactories[authMode]!=null){var moduleParams=AuthentificationIdeosso.moduleParams[authMode];module=AuthentificationIdeosso.moduleFactories[authMode](moduleRef,moduleParams);AuthentificationIdeosso.moduleIntances[moduleRef]=module}return module};PrepareLoginModuleIdeosso=function(moduleRef,moduleParams){this._moduleRef=moduleRef;this._moduleParams=moduleParams?moduleParams:{}};PrepareLoginModuleIdeosso.prototype.constructor=PrepareLoginModuleIdeosso;PrepareLoginModuleIdeosso.prototype.enable=function(enableParams){this._enableParams=enableParams?enableParams:{}};PrepareLoginModuleIdeosso.prototype.init=function(initParams){if(this._enableParams==undefined){this.enable(initParams)}this._initParams=initParams?initParams:{}};PrepareLoginModuleIdeosso.prototype.reset=function(){};PrepareLoginModuleIdeosso.prototype.start=function(){};PrepareLoginModuleIdeosso.prototype.stop=function(){};PrepareLoginModuleIdeosso.prototype.destroy=function(){};PrepareLoginModuleIdeosso.prototype.addListener=function(namespace,listener){if(namespace&&listener){if(this._listeners==undefined){this._listeners={}}var re=/([^\.]+)\.(.+)/;var phase=namespace.replace(re,"$1");
1if(phase!=undefined){if(this._listeners[phase]==undefined){this._listeners[phase]={unnamed:[],named:{}}}}var name=namespace.replace(re,"$2");if(name!=undefined&&name!=phase){this._listeners[phase].named[name]=listener}else{this._listeners[phase].unnamed.push(listener)}}};PrepareLoginModuleIdeosso.prototype.fireListeners=function(phase,listenerParams){if(phase){if(this._listeners&&this._listeners[phase]){this._listeners[phase].unnamed.forEach(function(l){l(listenerParams)});for(var index in this._listeners[phase].named){var l=this._listeners[phase].named[index];l(listenerParams)}}}};PrepareLoginModuleIdeosso.prototype.getI18NMessage=function(key){if(key==undefined){return null}var name="I18N_"+key.toUpperCase();var value=this.getParam(name);if(value!=undefined){return value}if(this._i18n){value=this._i18n[key.toUpperCase()]}if(value==undefined){value=name}return value};PrepareLoginModuleIdeosso.prototype.getContext=function(){var authLevelConfig=undefined;if(this._initParams!=undefined){authLevelConfig=this._initParams["authLevelConfig"]}if(authLevelConfig==undefined&&this._enableParams!=undefined){authLevelConfig=this._enableParams["authLevelConfig"]}var ctxt={authLevelConfig:authLevelConfig,initParams:this._initParams,enableParams:this._enableParams,moduleParams:this._moduleParams};if(authLevelConfig&&authLevelConfig.publicProperties){var a={};for(var indi in authLevelConfig.publicProperties){var property=authLevelConfig.publicProperties[indi];var m=a[property.module];if(m==undefined){a[property.module]={};m=a[property.module]}var p=m[property.name];if(p==undefined){m[property.name]={};p=m[property.name]}p["values"]=property.values;if(property.values!=undefined&&property.values.length==1){p["value"]=property.values[0]}else{p["value"]=null}}ctxt["publicParams"]=a}return ctxt};PrepareLoginModuleIdeosso.prototype.getParam=function(name,defaultValue){if(name==undefined){return null}var authLevelConfig=undefined;if(this._initParams!=undefined){authLevelConfig=this._initParams["authLevelConfig"]}if(authLevelConfig==undefined&&this._enableParams!=undefined){authLevelConfig=this._enableParams["authLevelConfig"]}if(authLevelConfig&&authLevelConfig.publicProperties){for(var indi in authLevelConfig.publicProperties){var property=authLevelConfig.publicProperties[indi];if(name==property.name&&property.values){if(defaultValue instanceof Array){return property.values}else{return property.values[0]}}}}if(this._initParams!=undefined&&this._initParams[name]!=undefined){return this._initParams[name]}if(this._enableParams!=undefined&&this._enableParams[name]!=undefined){return this._enableParams[name]}if(this._moduleParams!=undefined&&this._moduleParams[name]!=undefined){return this._moduleParams[name]}return defaultValue};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.