summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-02-26 17:07:00 +0100
committerSimon Rettberg2015-02-26 17:07:00 +0100
commit59f17e9a1d1f6b1ef45a52cb59fa625551d3e357 (patch)
tree93d3eaf6c7919c295b08a748cdc5f8b3f00a4a8f
parentRemove some debug messages, fix possible race condition in ImageProcessor (diff)
downloadmasterserver-59f17e9a1d1f6b1ef45a52cb59fa625551d3e357.tar.gz
masterserver-59f17e9a1d1f6b1ef45a52cb59fa625551d3e357.tar.xz
masterserver-59f17e9a1d1f6b1ef45a52cb59fa625551d3e357.zip
Stuff
-rw-r--r--extras/import-idp.php19
-rw-r--r--src/main/java/org/openslx/imagemaster/db/DbSatellite.java1
-rw-r--r--src/main/properties/log4j.properties5
3 files changed, 17 insertions, 8 deletions
diff --git a/extras/import-idp.php b/extras/import-idp.php
index 6ea9cb6..0b9adf1 100644
--- a/extras/import-idp.php
+++ b/extras/import-idp.php
@@ -20,7 +20,12 @@ $db = new mysqli($settings['host'], $settings['user'], $settings['password'], $s
if ($db->connect_errno) die("Could not connect to db: " . $db->connect_error . "\n");
$db->set_charset("utf8");
-$url = 'https://www.aai.dfn.de/fileadmin/metadata/DFN-AAI-metadata.xml';
+if ($argc > 2) {
+ $url = $argv[2];
+} else {
+ $url = 'https://www.aai.dfn.de/fileadmin/metadata/DFN-AAI-metadata.xml';
+}
+echo "Using $url...\n";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
@@ -34,9 +39,15 @@ preg_match_all('#<EntityDescriptor.*?</EntityDescriptor>#s', $data, $out);
foreach ($out[0] as $data) {
$data = preg_replace('#<(/?)[a-zA-Z0-9]+:#', '<\1', $data);
$xml = json_decode(json_encode(simplexml_load_string('<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . $data)), true);
- if (!isset($xml["Extensions"]["EntityAttributes"]["Attribute"]["AttributeValue"])) continue;
- if (!isset($xml["IDPSSODescriptor"]["Extensions"]["Scope"])) continue;
- if ($xml["Extensions"]["EntityAttributes"]["Attribute"]["AttributeValue"] !== 'http://aai.dfn.de/category/bwidm-member') continue;
+ //if (!isset($xml["Extensions"]["EntityAttributes"]["Attribute"]["AttributeValue"])) {
+ // echo "no EntityAttributes.Attribute.AttributeValue!\n";
+ // continue;
+ //}
+ //if ($xml["Extensions"]["EntityAttributes"]["Attribute"]["AttributeValue"] !== 'http://aai.dfn.de/category/bwidm-member') continue;
+ if (!isset($xml["IDPSSODescriptor"]["Extensions"]["Scope"])) {
+ echo "No Extensions.Scope!\n";
+ continue;
+ }
$scope = $xml["IDPSSODescriptor"]["Extensions"]["Scope"];
if (!is_array($scope)) $scope = array($scope);
$name = $xml["IDPSSODescriptor"]["Extensions"]["UIInfo"]["DisplayName"];
diff --git a/src/main/java/org/openslx/imagemaster/db/DbSatellite.java b/src/main/java/org/openslx/imagemaster/db/DbSatellite.java
index 4f2576e..4f5a0c8 100644
--- a/src/main/java/org/openslx/imagemaster/db/DbSatellite.java
+++ b/src/main/java/org/openslx/imagemaster/db/DbSatellite.java
@@ -29,6 +29,7 @@ public class DbSatellite
this.address = address;
this.name = name;
this.publickeyString = publickeyString;
+ this.authMethod = authMethod;
}
public static DbSatellite fromOrganizationId( String organizationId )
diff --git a/src/main/properties/log4j.properties b/src/main/properties/log4j.properties
index 5452d52..881887e 100644
--- a/src/main/properties/log4j.properties
+++ b/src/main/properties/log4j.properties
@@ -8,7 +8,4 @@ log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %F - %m%n
log4j.logger.org.apache.directory=ERROR
log4j.logger.org.apache.mina=ERROR
-log4j.logger.org.apache.ftpserver=ERROR
-log4j.logger.org.openslx.filetransfer=ERROR
-
-org.apache.thrift.server.AbstractNonblockingServer=ERROR \ No newline at end of file
+log4j.logger.org.apache.thrift.server.AbstractNonblockingServer=ERROR