/* * Copyright 2014 Federal Chancellery Austria * MOA-ID has been developed in a cooperation between BRZ, the Federal * Chancellery Austria - ICT staff unit, and Graz University of Technology. * * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by * the European Commission - subsequent versions of the EUPL (the "Licence"); * You may not use this work except in compliance with the Licence. * You may obtain a copy of the Licence at: * http://www.osor.eu/eupl/ * * Unless required by applicable law or agreed to in writing, software * distributed under the Licence is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Licence for the specific language governing permissions and * limitations under the Licence. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. */ package at.gv.egovernment.moa.id.commons; import java.util.ArrayList; import java.util.Collections; import java.util.Hashtable; import java.util.List; import java.util.Map; import at.gv.egiz.eaaf.core.api.data.EAAFConstants; import at.gv.egovernment.moa.util.Constants; /** * @author tlenz * */ public class MOAIDConstants { //general configuration constants public static final String DEFAULT_CONTENT_TYPE_HTML_UTF8 = EAAFConstants.CONTENTTYPE_HTML_UTF8; public static final String FILE_URI_PREFIX = "file:/"; public static final String PREFIX_BASEID = EAAFConstants.URN_PREFIX_BASEID; public static final String PREFIX_PBK = EAAFConstants.URN_PREFIX_BPK; public static final String PREFIX_HPI = Constants.URN_PREFIX_HPI; public static final String PREFIX_CDID = EAAFConstants.URN_PREFIX_CDID; public static final String PREFIX_WPBK = EAAFConstants.URN_PREFIX_WBPK; public static final String PREFIX_STORK = Constants.URN_PREFIX_STORK + "+"; public static final String PREFIX_EIDAS = EAAFConstants.URN_PREFIX_EIDAS; public static final String IDENIFICATIONTYPE_FN = "FN"; public static final String IDENIFICATIONTYPE_ERSB = "ERSB"; public static final String IDENIFICATIONTYPE_ZVR = "ZVR"; public static final String IDENIFICATIONTYPE_STORK = "STORK"; public static final String IDENIFICATIONTYPE_EIDAS = "eIDAS"; public static final String KEYBOXIDENTIFIER_SECURE = "SecureSignatureKeypair"; public static final String KEYBOXIDENTIFIER_CERTIFIED = "CertifiedKeypair"; public static final String TESTCREDENTIALROOTOID = "1.2.40.0.10.2.4.1"; public static final String REDIRECTTARGET_TOP = "_top"; public static final String REDIRECTTARGET_SELF = "_self"; public static final String REDIRECTTARGET_PARENT = "_parent"; public static final String REDIRECTTARGET_BLANK = "_blank"; public static final Map BUSINESSSERVICENAMES; public static final List ALLOWED_WBPK_PREFIXES; public static final List ALLOWED_KEYBOXIDENTIFIER; public static final List ALLOWED_REDIRECTTARGETNAMES; public static final List ALLOWED_STORKATTRIBUTEPROVIDERS; public static final List ALLOWED_eIDAS_LOA; public static final List JDBC_DRIVER_NEEDS_WORKAROUND; public static final String eIDAS_LOA_LOW = "http://eidas.europa.eu/LoA/low"; public static final String eIDAS_LOA_SUBSTANTIAL = "http://eidas.europa.eu/LoA/substantial"; public static final String eIDAS_LOA_HIGH = "http://eidas.europa.eu/LoA/high"; static { Hashtable tmp = new Hashtable(); tmp.put(IDENIFICATIONTYPE_FN, "Firmenbuchnummer"); tmp.put(IDENIFICATIONTYPE_ZVR, "Vereinsnummer"); tmp.put(IDENIFICATIONTYPE_ERSB, "ERsB Kennzahl"); tmp.put(IDENIFICATIONTYPE_STORK, "STORK"); tmp.put(IDENIFICATIONTYPE_EIDAS, "eIDAS"); BUSINESSSERVICENAMES = Collections.unmodifiableMap(tmp); List awbpk = new ArrayList(); awbpk.add(IDENIFICATIONTYPE_FN); awbpk.add(IDENIFICATIONTYPE_ERSB); awbpk.add(IDENIFICATIONTYPE_ZVR); awbpk.add(PREFIX_WPBK + IDENIFICATIONTYPE_FN); awbpk.add(PREFIX_WPBK + IDENIFICATIONTYPE_ERSB); awbpk.add(PREFIX_WPBK + IDENIFICATIONTYPE_ZVR); ALLOWED_WBPK_PREFIXES = Collections.unmodifiableList(awbpk); List keyboxIDs = new ArrayList(); keyboxIDs.add(KEYBOXIDENTIFIER_SECURE); keyboxIDs.add(KEYBOXIDENTIFIER_CERTIFIED); ALLOWED_KEYBOXIDENTIFIER = Collections.unmodifiableList(keyboxIDs); List eIDASLOA = new ArrayList(); eIDASLOA.add(eIDAS_LOA_LOW); eIDASLOA.add(eIDAS_LOA_SUBSTANTIAL); eIDASLOA.add(eIDAS_LOA_HIGH); ALLOWED_eIDAS_LOA = Collections.unmodifiableList(eIDASLOA); List redirectTargets = new ArrayList(); redirectTargets.add(REDIRECTTARGET_BLANK); redirectTargets.add(REDIRECTTARGET_PARENT); redirectTargets.add(REDIRECTTARGET_SELF); redirectTargets.add(REDIRECTTARGET_TOP); ALLOWED_REDIRECTTARGETNAMES = Collections.unmodifiableList(redirectTargets); } static { List storkAttrProvider = new ArrayList(); storkAttrProvider.add("StorkAttributeRequestProvider"); storkAttrProvider.add("EHvdAttributeProvider"); storkAttrProvider.add("SignedDocAttributeRequestProvider"); storkAttrProvider.add("MandateAttributeRequestProvider"); storkAttrProvider.add("PVPAuthenticationProvider"); ALLOWED_STORKATTRIBUTEPROVIDERS = Collections.unmodifiableList(storkAttrProvider); } static { List jdbcDriverWorkaround = new ArrayList(); jdbcDriverWorkaround.add("oracle.jdbc."); jdbcDriverWorkaround.add("com.microsoft.sqlserver."); jdbcDriverWorkaround.add("org.postgresql."); JDBC_DRIVER_NEEDS_WORKAROUND = Collections.unmodifiableList(jdbcDriverWorkaround); } }