001/* 002 * (C) Copyright 2010 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Nuxeo - initial API and implementation 016 */ 017 018package org.nuxeo.ecm.platform.shibboleth.service; 019 020import java.util.HashMap; 021import java.util.Map; 022 023import org.nuxeo.common.xmap.annotation.XNode; 024import org.nuxeo.common.xmap.annotation.XNodeMap; 025import org.nuxeo.common.xmap.annotation.XObject; 026 027@XObject("config") 028public class ShibbolethAuthenticationConfig { 029 030 @XNodeMap(value = "uidHeaders/uidHeader", key = "@idpUrl", type = HashMap.class, componentType = String.class) 031 protected Map<String, String> uidHeaders = new HashMap<String, String>(); 032 033 @XNode("uidHeaders/default") 034 protected String defaultUidHeader; 035 036 @XNode("loginURL") 037 protected String loginURL; 038 039 @XNode("loginRedirectURLParameter") 040 protected String loginRedirectURLParameter = "target"; 041 042 @XNode("logoutURL") 043 protected String logoutURL; 044 045 @XNode("logoutRedirectURLParameter") 046 protected String logoutRedirectURLParameter = "return"; 047 048 @XNode("idpHeader") 049 protected String idpHeader = "shib-identity-provider"; 050 051 @XNode("@headerEncoding") 052 protected String headerEncoding = "UTF-8"; 053 054 @XNodeMap(value = "fieldMapping", key = "@header", type = HashMap.class, componentType = String.class) 055 protected Map<String, String> fieldMapping = new HashMap<String, String>(); 056 057 public Map<String, String> getUidHeaders() { 058 return uidHeaders; 059 } 060 061 public String getDefaultUidHeader() { 062 return defaultUidHeader; 063 } 064 065 public String getLoginURL() { 066 return loginURL; 067 } 068 069 public String getLogoutURL() { 070 return logoutURL; 071 } 072 073 public String getLoginRedirectURLParameter() { 074 return loginRedirectURLParameter; 075 } 076 077 public String getLogoutRedirectURLParameter() { 078 return logoutRedirectURLParameter; 079 } 080 081 public Map<String, String> getFieldMapping() { 082 return fieldMapping; 083 } 084 085 public String getIdpHeader() { 086 return idpHeader; 087 } 088 089 public String getHeaderEncoding() { return headerEncoding; } 090}