CINXE.COM
Deteção do Realm Inicial
<!DOCTYPE html> <html lang="pt-PT"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1"/> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <meta http-equiv="cache-control" content="no-cache,no-store"/> <meta http-equiv="pragma" content="no-cache"/> <meta http-equiv="expires" content="-1"/> <meta name='mswebdialog-title' content='Connecting to Universidade da Beira Interior'/> <title>Deteção do Realm Inicial</title> <script type='text/javascript'> //<![CDATA[ function HRDErrors(){this.invalidSuffix = 'N\u0026#227;o reconhecemos esta conta institucional. Introduza a sua conta institucional de novo ou contacte o administrador para obter mais informa\u0026#231;\u0026#245;es.';} //]]> </script> <script type='text/javascript'> //<![CDATA[ // Copyright (c) Microsoft Corporation. All rights reserved. function InputUtil(errTextElementID, errDisplayElementID) { if (!errTextElementID) errTextElementID = 'errorText'; if (!errDisplayElementID) errDisplayElementID = 'error'; this.hasFocus = false; this.errLabel = document.getElementById(errTextElementID); this.errDisplay = document.getElementById(errDisplayElementID); }; InputUtil.prototype.canDisplayError = function () { return this.errLabel && this.errDisplay; } InputUtil.prototype.checkError = function () { if (!this.canDisplayError){ throw new Error ('Error element not present'); } if (this.errLabel && this.errLabel.innerHTML) { this.errDisplay.style.display = ''; var cause = this.errLabel.getAttribute('for'); if (cause) { var causeNode = document.getElementById(cause); if (causeNode && causeNode.value) { causeNode.focus(); this.hasFocus = true; } } } else { this.errDisplay.style.display = 'none'; } }; InputUtil.prototype.setInitialFocus = function (input) { if (this.hasFocus) return; var node = document.getElementById(input); if (node) { if ((/^\s*$/).test(node.value)) { node.focus(); this.hasFocus = true; } } }; InputUtil.prototype.setError = function (input, errorMsg) { if (!this.canDisplayError) { throw new Error('Error element not present'); } input.focus(); if (errorMsg) { this.errLabel.innerHTML = errorMsg; } this.errLabel.setAttribute('for', input.id); this.errDisplay.style.display = ''; }; InputUtil.makePlaceholder = function (input) { var ua = navigator.userAgent; if (ua != null && (ua.match(/MSIE 9.0/) != null || ua.match(/MSIE 8.0/) != null || ua.match(/MSIE 7.0/) != null)) { var node = document.getElementById(input); if (node) { var placeholder = node.getAttribute("placeholder"); if (placeholder != null && placeholder != '') { var label = document.createElement('input'); label.type = "text"; label.value = placeholder; label.readOnly = true; label.style.position = 'absolute'; label.style.borderColor = 'transparent'; label.className = node.className + ' hint'; label.tabIndex = -1; label.onfocus = function () { this.nextSibling.focus(); }; node.style.position = 'relative'; node.parentNode.style.position = 'relative'; node.parentNode.insertBefore(label, node); node.onkeyup = function () { InputUtil.showHint(this); }; node.onblur = function () { InputUtil.showHint(this); }; node.style.background = 'transparent'; node.setAttribute("placeholder", ""); InputUtil.showHint(node); } } } }; InputUtil.focus = function (inputField) { var node = document.getElementById(inputField); if (node) node.focus(); }; InputUtil.hasClass = function(node, clsName) { return node.className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); }; InputUtil.addClass = function(node, clsName) { if (!this.hasClass(node, clsName)) node.className += " " + clsName; }; InputUtil.removeClass = function(node, clsName) { if (this.hasClass(node, clsName)) { var reg = new RegExp('(\\s|^)' + clsName + '(\\s|$)'); node.className = node.className.replace(reg, ' '); } }; InputUtil.showHint = function (node, gotFocus) { if (node.value && node.value != '') { node.previousSibling.style.display = 'none'; } else { node.previousSibling.style.display = ''; } }; InputUtil.updatePlaceholder = function (input, placeholderText) { var node = document.getElementById(input); if (node) { var ua = navigator.userAgent; if (ua != null && (ua.match(/MSIE 9.0/) != null || ua.match(/MSIE 8.0/) != null || ua.match(/MSIE 7.0/) != null)) { var label = node.previousSibling; if (label != null) { label.value = placeholderText; } } else { node.placeholder = placeholderText; } } }; //]]> </script> <link rel="stylesheet" type="text/css" href="/adfs/portal/css/style.css?id=B4241537C0A54500515FD837CFA52871FFE6A2B0AE45777EE99E5473CE512901" /><style>.illustrationClass {background-image:url(/adfs/portal/illustration/illustration.png?id=A7DC0B42F741CD4B646B6ACD8564581A99809444BE6D6232B1F22E70C7936C13);}</style> </head> <body dir="ltr" class="body"> <div id="noScript" style="position:static; width:100%; height:100%; z-index:100"> <h1>JavaScript obrigatório</h1> <p>O JavaScript é obrigatório. Este browser não suporta JavaScript ou o JavaScript não está ativado no mesmo.</p> <p>Para saber se o seu browser suporta JavaScript ou para ativar o JavaScript, consulte a ajuda do browser.</p> </div> <script type="text/javascript" language="JavaScript"> document.getElementById("noScript").style.display = "none"; </script> <div id="fullPage"> <div id="brandingWrapper" class="float"> <div id="branding"></div> </div> <div id="contentWrapper" class="float"> <div id="content"> <div id="header"> <h4>Universidade da Beira Interior</h4> </div> <main> <div id="workArea"> <div id="hrdArea"> <form id="hrd" method="post" autocomplete="off" novalidate="novalidate" action="/adfs/ls/?wa=wsignin1.0&wtrealm=https%3a%2f%2frad.ubi.pt%2f&wctx=rm%3d0%26id%3dpassive%26ru%3d%252fLogin.aspx&wct=2025-04-07T01%3a16%3a18Z&client-request-id=14821b76-32d5-4652-d23e-0080000000ef"> <div id="bySelection"> <div id="openingMessage" class="groupMargin">Inicie sessão com uma destas contas</div> <input id="hrdSelection" type="hidden" /> <div class="idp" tabIndex="1" role="button" aria-label="full.autenticacao.gov" onKeyPress="if (event && (event.keyCode == 32 || event.keyCode == 13)) HRD.selection('https://full.autenticacao.cartaodecidadao.pt');" onclick="HRD.selection('https://full.autenticacao.cartaodecidadao.pt'); return false;"><img class="largeIcon float" src="/adfs/portal/images/idp/idp.png?id=3EADD3E829A20DF612C7A77960FF811E66E3EE6BAE2C33C9B20E7478BAC87548" alt="full.autenticacao.gov"/><div class="idpDescription float"><span class="largeTextNoWrap indentNonCollapsible">full.autenticacao.gov</span></div></div><div class="idp" tabIndex="2" role="button" aria-label="Autenticacao.gov" onKeyPress="if (event && (event.keyCode == 32 || event.keyCode == 13)) HRD.selection('https://autenticacao.cartaodecidadao.pt');" onclick="HRD.selection('https://autenticacao.cartaodecidadao.pt'); return false;"><img class="largeIcon float" src="/adfs/portal/images/idp/idp.png?id=3EADD3E829A20DF612C7A77960FF811E66E3EE6BAE2C33C9B20E7478BAC87548" alt="Autenticacao.gov"/><div class="idpDescription float"><span class="largeTextNoWrap indentNonCollapsible">Autenticacao.gov</span></div></div><div class="idp" tabIndex="3" role="button" aria-label="Active Directory" onKeyPress="if (event && (event.keyCode == 32 || event.keyCode == 13)) HRD.selection('AD AUTHORITY');" onclick="HRD.selection('AD AUTHORITY'); return false;"><img class="largeIcon float" src="/adfs/portal/images/idp/localsts.png?id=A3911892BE04D81EBA5A8E0C74F77099AA1DB05E542FBFCC78C9DF4B0EC0E3A6" alt="Active Directory"/><div class="idpDescription float"><span class="largeTextNoWrap indentNonCollapsible">Active Directory</span></div></div> </div> <div id="byEmail" style="display:none"> <div class="groupMargin"> <img tabIndex="4" class="smallIcon float" onKeyPress="if (event && (event.keyCode == 32 || event.keyCode == 13)) HRD.hideEmailInput();" onclick="HRD.hideEmailInput(); return false;" src="data:image/Png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZEsRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTsAIABHmCAKQBMVka6X7B7CBDJy82FniFyAl8EAfB6WLwCcNPQM4BOB/+fpFnpfIHomAARm7M5GSwRF4g4JUuQLrbPipgalyxmGCVmvihBEcuJOWGRDT77LLKjmNmpPLaIxTmns1PZYu4V8bZMIUfEiK+ICzO5nCwR3xKxRoowlSviN+LYVA4zAwAUSWwXcFiJIjYRMYkfEuQi4uUA4EgJX3HcVyzgZAvEl3JJS8/hcxMSBXQdli7d1NqaQffkZKVwBAL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m5gooTN7TnwJYoI2MmMBYaJ8X5qDV2UKAHMC1MTBLDDkY/u8hYKsYkCl+fW43/gRkxARiOW6u7H8mSIx1nDPfGpcmWKPbQpBZstYjAhEq9LcaINHMMSLWdVDlLS2REWWfWD8pnHgeah/9VtGZBoG07QOtgJfEcWjdMtV8VXDLSTAuBIuCVMiI4mw1JwZQtdUiQEBXWNeAriWC9RVxHKDa097Wr8jdIhwFIK7oonFbD8MXH45yevOBn/oAAAAASUVORK5CYII=" alt="back"/> Outra conta institucional </div> <div id="emailArea" class="indent"> <div id="emailIntroduction" class="groupMargin"> A sua organização estabeleceu uma relação de fidedignidade com Universidade da Beira Interior, introduza a sua conta institucional abaixo. </div> <div id="error" class="fieldMargin error smallText" > <span id="errorText" for="emailInput" aria-live="assertive" role="alert"></span> </div> <div id="emailInputArea"> <label id="emailInputLabel" for="emailInput" class="hidden">E-mail</label> <input id="emailInput" name="Email" type="email" value="" autocomplete="off" class="text fullWidthIndent" spellcheck="false" placeholder="alguem@example.com"/> </div> <div id="submissionArea" class="submitMargin"> <input class="submit" name="HomeRealmByEmail" type="submit" value="Seguinte" onclick="return HRD.submitEmail()" /> </div> </div> </div> </form> <script type="text/javascript" language="JavaScript"> //<![CDATA[ function HRD() { } HRD.emailInput = 'emailInput'; HRD.emailMismatch = 'errorText'; HRD.selection = function (option) { var i = document.getElementById('hrdSelection'); i.name = "HomeRealmSelection"; i.value = option; document.forms['hrd'].submit(); return false; } HRD.showEmailInput = function () { var selection = document.getElementById('bySelection'); selection.style.display = 'none'; var email = document.getElementById('byEmail'); email.style.display = ''; var emailInput = document.getElementById('emailInput'); emailInput.focus(); } HRD.hideEmailInput = function () { var selection = document.getElementById('bySelection'); selection.style.display = ''; var email = document.getElementById('byEmail'); email.style.display = 'none'; } HRD.initialize = function () { var u = new InputUtil(); u.checkError(); var idpElements = document.getElementsByClassName('idp'); var emailError = document.getElementById(HRD.emailMismatch); if ((emailError && emailError.innerHTML) || idpElements.length == 0) { HRD.showEmailInput(); u.setInitialFocus(HRD.emailInput); } else { HRD.hideEmailInput(); } } (); HRD.submitEmail = function () { var u = new InputUtil(); var e = new HRDErrors() var email = document.getElementById(HRD.emailInput); if (!email.value || !email.value.match('[@]')) { u.setError(email, e.invalidSuffix); return false; } return true; }; InputUtil.makePlaceholder(HRD.emailInput); //]]> </script> </div> </div> </main> <div id="footerPlaceholder"></div> </div> <footer id="footer"> <div id="footerLinks" class="floatReverse"> <div><span id="copyright">© 2018 Microsoft</span><a id="home" class="pageLink footerLink " href="http://www.ubi.pt">UBI</a><a id="privacy" class="pageLink footerLink" href="http://www.ubi.pt/Pagina/Aviso_legal">Privacy</a><a id="helpDesk" class="pageLink footerLink" href="https://sigubi.ubi.pt/logincart.aspx">Registo do cartão do cidadão</a></div> </div> </footer> </div> </div> <script type='text/javascript'> //<![CDATA[ // Copyright (c) Microsoft Corporation. All rights reserved. // This file contains several workarounds on inconsistent browser behaviors that administrators may customize. "use strict"; // iPhone email friendly keyboard does not include "\" key, use regular keyboard instead. // Note change input type does not work on all versions of all browsers. if (navigator.userAgent.match(/iPhone/i) != null) { var emails = document.querySelectorAll("input[type='email']"); if (emails) { for (var i = 0; i < emails.length; i++) { emails[i].type = 'text'; } } } // In the CSS file we set the ms-viewport to be consistent with the device dimensions, // which is necessary for correct functionality of immersive IE. // However, for Windows 8 phone we need to reset the ms-viewport's dimension to its original // values (auto), otherwise the viewport dimensions will be wrong for Windows 8 phone. // Windows 8 phone has agent string 'IEMobile 10.0' if (navigator.userAgent.match(/IEMobile\/10\.0/)) { var msViewportStyle = document.createElement("style"); msViewportStyle.appendChild( document.createTextNode( "@-ms-viewport{width:auto!important}" ) ); msViewportStyle.appendChild( document.createTextNode( "@-ms-viewport{height:auto!important}" ) ); document.getElementsByTagName("head")[0].appendChild(msViewportStyle); } // If the innerWidth is defined, use it as the viewport width. if (window.innerWidth && window.outerWidth && window.innerWidth !== window.outerWidth) { var viewport = document.querySelector("meta[name=viewport]"); viewport.setAttribute('content', 'width=' + window.innerWidth + 'px; initial-scale=1.0; maximum-scale=1.0'); } // Gets the current style of a specific property for a specific element. function getStyle(element, styleProp) { var propStyle = null; if (element && element.currentStyle) { propStyle = element.currentStyle[styleProp]; } else if (element && window.getComputedStyle) { propStyle = document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp); } return propStyle; } // The script below is used for downloading the illustration image // only when the branding is displaying. This script work together // with the code in PageBase.cs that sets the html inline style // containing the class 'illustrationClass' with the background image. var computeLoadIllustration = function () { var branding = document.getElementById("branding"); var brandingDisplay = getStyle(branding, "display"); var brandingWrapperDisplay = getStyle(document.getElementById("brandingWrapper"), "display"); if (brandingDisplay && brandingDisplay !== "none" && brandingWrapperDisplay && brandingWrapperDisplay !== "none") { var newClass = "illustrationClass"; if (branding.classList && branding.classList.add) { branding.classList.add(newClass); } else if (branding.className !== undefined) { branding.className += " " + newClass; } if (window.removeEventListener) { window.removeEventListener('load', computeLoadIllustration, false); window.removeEventListener('resize', computeLoadIllustration, false); } else if (window.detachEvent) { window.detachEvent('onload', computeLoadIllustration); window.detachEvent('onresize', computeLoadIllustration); } } }; if (window.addEventListener) { window.addEventListener('resize', computeLoadIllustration, false); window.addEventListener('load', computeLoadIllustration, false); } else if (window.attachEvent) { window.attachEvent('onresize', computeLoadIllustration); window.attachEvent('onload', computeLoadIllustration); } // UBI HRD Customization // Check if we are in the HRD page if (document.getElementById("hrdArea")) { // Create an array of all claim provider trust sections in the page var listAllSpanForIdp = document.getElementsByClassName("idpDescription float") var inc; for (inc = 0; inc < listAllSpanForIdp.length; inc++) { // Replace text in html content listAllSpanForIdp[inc].innerHTML = listAllSpanForIdp[inc].innerHTML.replace("Autenticacao.gov", "Cartão de cidadão"); listAllSpanForIdp[inc].innerHTML = listAllSpanForIdp[inc].innerHTML.replace("Active Directory", "Autenticação UBI"); } // if (document.cookie.match(/^(.*;)?\s*MSISAuthenticated\s*=\s*[^;]+(.*)?$/) == -1) if (document.cookie.indexOf('MSISAuthenticated=') == -1 && window.location.href.indexOf("&RedirectToIdentityProvider=") == -1) { window.location.href = window.location.href+"&RedirectToIdentityProvider=AD%20AUTHORITY"; } } //if (window.location.href.indexOf("owa.ubi.pt") >= 0 || window.location.href.indexOf("MicrosoftOnline") >= 0) { // document.getElementById("UBICCTABLE").style["display"] = "none";; //} else { if (document.getElementById("UBICCANCHOR")) { document.getElementById("UBICCANCHOR").href = window.location.href; if (document.getElementById("UBICCANCHOR").href.indexOf("AD%20AUTHORITY") >= 0 || document.getElementById("UBICCANCHOR").href.indexOf("AD+AUTHORITY") >= 0 || document.getElementById("UBICCANCHOR").href.indexOf("AD AUTHORITY") >= 0) { document.getElementById("UBICCANCHOR").href = document.getElementById("UBICCANCHOR").href.replace("AD%20AUTHORITY", "https://autenticacao.cartaodecidadao.pt"); document.getElementById("UBICCANCHOR").href = document.getElementById("UBICCANCHOR").href.replace("AD+AUTHORITY", "https://autenticacao.cartaodecidadao.pt"); document.getElementById("UBICCANCHOR").href = document.getElementById("UBICCANCHOR").href.replace("AD AUTHORITY", "https://autenticacao.cartaodecidadao.pt"); } else { document.getElementById("UBICCANCHOR").href = document.getElementById("UBICCANCHOR").href + "&RedirectToIdentyProvider=https://autenticacao.cartaodecidadao.pt"; } } //} //Instrução para limpar os cookies if(window.location.href.indexOf("&clearcookies=true") != -1) { // var cookies = document.cookie.split(";"); // for (var i = 0; i < cookies.length; i++) { // var cookie = cookies[i]; // var eqPos = cookie.indexOf("="); // var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; // document.cookie = name + "=;path=/;expires=Thu, 01 Jan 1970 00:00:00 GMT"; // alert("cookie: " + name); // } // var cookies = document.cookie.split("; "); // alert(cookies.length); // console.log(window.location); // for (var c = 0; c < cookies.length; c++) { // var d = window.location.hostname.split("."); // while (d.length > 0) { // var cookieBase = encodeURIComponent(cookies[c].split(";")[0].split("=")[0]) + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=' + d.join('.') + ' ;path='; // var p = location.pathname.split('/'); // alert("P: [" + p + "]"); // document.cookie = cookieBase + '/'; // alert("cookieBase: [" + cookieBase +"]"); // while (p.length > 0) { // document.cookie = cookieBase + p.join('/'); // p.pop(); // }; // d.shift(); // } // } // document.cookie = "MSISIPSelectionSession=;path=/adfs;expires=Thu, 01 Jan 1970 00:00:00 GMT"; // alert("cookies: " + document.cookies); // alert("cookie: " + document.cookie); // alert("cookies limpas"); } //]]> </script> </body> </html>