aboutsummaryrefslogtreecommitdiff
path: root/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-01-29 16:21:24 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-01-29 16:21:24 +0100
commit91710631a3b7dc469edb83379c773b7bc27728ab (patch)
tree6c2ad97b485ab00a5cc0b41bf0fcd2e5c7b9dcea /id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
parentd8bc160b455fd8b9edc01fc054d74d06f2399cab (diff)
downloadmoa-id-spss-91710631a3b7dc469edb83379c773b7bc27728ab.tar.gz
moa-id-spss-91710631a3b7dc469edb83379c773b7bc27728ab.tar.bz2
moa-id-spss-91710631a3b7dc469edb83379c773b7bc27728ab.zip
add EUPL headers
Diffstat (limited to 'id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java')
-rw-r--r--id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java33
1 files changed, 29 insertions, 4 deletions
diff --git a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
index 0ca5464a7..c143d050b 100644
--- a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
+++ b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
@@ -1,3 +1,25 @@
+/*******************************************************************************
+ * 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.demoOA;
@@ -63,6 +85,7 @@ public class Configuration {
return publicURLPreFix;
}
+
public KeyStore getPVP2KeyStore() throws ConfigurationException {
try {
@@ -75,8 +98,7 @@ public class Configuration {
keyStore = KeyStore.getInstance(keystoretype);
}
-
-
+
String file = getPVP2MetadataKeystoreURL();
if (MiscUtil.isEmpty(file)) {
throw new ConfigurationException("KeyStoreURL is empty");
@@ -191,6 +213,7 @@ public class Configuration {
fis.close();
+ //load OpenSAML library
DefaultBootstrap.bootstrap();
} catch ( FileNotFoundException e) {
@@ -208,7 +231,8 @@ public class Configuration {
private void initalPVP2Login() throws ConfigurationException {
try {
-
+
+ //load IDP certificate to validate IDP metadata
String metadataCert = getPVP2IDPMetadataCertificate();
if (MiscUtil.isEmpty(metadataCert)) {
throw new ConfigurationException("NO IDP Certificate to verify IDP Metadata");
@@ -224,7 +248,8 @@ public class Configuration {
if (MiscUtil.isEmpty(metadataurl)) {
throw new ConfigurationException("NO IDP Metadata URL.");
}
-
+
+ //load IDP metadata into metadataprovider
idpMetadataProvider = new HTTPMetadataProvider(new Timer(), new HttpClient(), metadataurl);
idpMetadataProvider.setRequireValidMetadata(true);
idpMetadataProvider.setParserPool(new BasicParserPool());