<%@ page language="java"%> <%@ page import="java.util.Set,java.util.Map,java.util.Vector,edu.ucsb.nceas.utilities.*, edu.ucsb.nceas.metacat.properties.PropertyService, edu.ucsb.nceas.metacat.admin.AuthAdmin" %> <% /** * '$RCSfile$' * Copyright: 2008 Regents of the University of California and the * National Center for Ecological Analysis and Synthesis * For Details: http://www.nceas.ucsb.edu/ * * '$Author$' * '$Date$' * '$Revision$' * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ %> Authentication Configuration <%@ include file="./head-section.jsp"%> <%@ include file="./header-section.jsp"%>

Authentication Configuration

Enter authentication service properties here.


<%@ include file="./page-message-section.jsp"%>
<% // metadata holds all group and properties metadata PropertiesMetaData metadata = (PropertiesMetaData)request.getAttribute("metadata"); if (metadata != null) { // each group describes a section of properties Map groupMap = metadata.getGroups(); Set groupIdSet = groupMap.keySet(); for (Integer groupId : groupIdSet) { if (groupId == 0) { continue; } // for this group, display the header (group name) MetaDataGroup metaDataGroup = (MetaDataGroup)groupMap.get(groupId); %>

<%= metaDataGroup.getName() %>

<%= metaDataGroup.getDescription() %>

<% // get all the properties in this group Map propertyMap = metadata.getPropertiesInGroup(metaDataGroup.getIndex()); Set propertyIndexes = propertyMap.keySet(); // iterate through each property and display appropriately for (Integer propertyIndex : propertyIndexes) { MetaDataProperty metaDataProperty = propertyMap.get(propertyIndex); String fieldType = metaDataProperty.getFieldType(); if (metaDataProperty.getIsRequired()) { %> <% } if (fieldType.equals("select")) { %>
<% if (metaDataProperty.getDescription() != null) { %>
[<%= metaDataProperty.getDescription() %>]
<% } } else if (fieldType.equals("password")) { %>
<% if (metaDataProperty.getDescription() != null) { %>
[<%= metaDataProperty.getDescription() %>]
<% } } else { %>
<% if(metaDataProperty.getKey().equals("auth.userManagementUrl")) { //System.out.println("getURL ==== "+request.getRequestURL().toString()); //System.out.println("getURI ==== "+request.getRequestURI()); //System.out.println("getServletpath ==== "+request.getServletPath()); //System.out.println("getScheme ==== "+request.getScheme()); //System.out.println("getServer name ==== "+request.getServerName()); //System.out.println("getServer port ==== "+request.getServerPort()); //System.out.println("getServer context ==== "+request.getContextPath()); String userManagementUrl = (String)request.getAttribute(metaDataProperty.getKey()); if(userManagementUrl == null || userManagementUrl.equals("")) { userManagementUrl = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+PropertyService.getProperty("auth.defaultUserManagementPage"); } %> <% } else { %> <% } %>
<% if (metaDataProperty.getDescription() != null) { %>
[<%= metaDataProperty.getDescription() %>]
<% } } } %>
<% } } %> <% String FILEGROUPNAME = "File-based_Authentication_Configuration"; String LDAPGROUPNAME = "LDAP_Authentication_Configuration"; String AUTHCLASSID = "auth_class"; %>
<%@ include file="./footer-section.jsp"%>