<%
// make sure the redirect path is valid and prefixed with the context path
String redirect = request.getParameter("resource");
if (redirect == null || !AuthUtil.isRedirectValid(request, redirect)) {
redirect = "/";
}
if (!redirect.startsWith(contextPath)) {
redirect = contextPath + redirect;
}
String urlLogin = request.getContextPath() + resource.getPath() + ".html" + getAuthURLSuffix(slingRequest);
if (authType == null || user == null || userManagementService.getAnonymousId().equals(user)) {
%>
<%-- If IMS is provided we render the choice --%>
<% if (imsLoginUrl != null) { %>
0 ? "" : "hidden" %>>
<%= xssAPI.encodeForHTML(reason) %>
<%= xssAPI.encodeForHTML(i18n.get("Sign in locally (admin tasks only)")) %>
<% if (isError && reason.length() > 0) { %>
<%= xssAPI.encodeForHTML(i18n.get("Please contact your administrator or try again later.")) %>
<%= xssAPI.encodeForHTML(reason) %>
<% } else { %>
<% String autocomplete = cfg.get("box/autocomplete", false) ? "on" : "off" ; %>
"/>
"/>
"/>
"/>
"/>
"/>
<% } %>
<%-- else render standard local login --%>
<% } else { %>
<% if (isError && reason.length() > 0) { %>
<%= xssAPI.encodeForHTML(i18n.get("Please contact your administrator or try again later.")) %>
<%= xssAPI.encodeForHTML(reason) %>
<% } else { %>
<% String autocomplete = cfg.get("box/autocomplete", false) ? "on" : "off" ; %>
"/>
"/>
"/>
"/>
"/>
"/>
<% } %>
<% } %>