aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-02-13 09:56:50 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-02-13 09:56:50 +0100
commit713ca50cbcb276254689088ea558401af018ffcd (patch)
treeebc9591308c9bb84ab27ac7d2f31144a161dbfd5 /id
parent6fabc9a604d61622f19ff8ca0b9237c114021c0e (diff)
downloadmoa-id-spss-713ca50cbcb276254689088ea558401af018ffcd.tar.gz
moa-id-spss-713ca50cbcb276254689088ea558401af018ffcd.tar.bz2
moa-id-spss-713ca50cbcb276254689088ea558401af018ffcd.zip
now fetchSavedCredential use a database query to get the certificate from entity
Diffstat (limited to 'id')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/EntityVerifier.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/EntityVerifier.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/EntityVerifier.java
index 4ef9919ca..550643da1 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/EntityVerifier.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/EntityVerifier.java
@@ -22,7 +22,6 @@
*******************************************************************************/
package at.gv.egovernment.moa.id.protocols.pvp2x.verification;
-import java.util.Iterator;
import java.util.List;
import org.opensaml.saml2.metadata.EntitiesDescriptor;
@@ -44,18 +43,25 @@ import at.gv.egovernment.moa.logging.Logger;
public class EntityVerifier {
public static byte[] fetchSavedCredential(String entityID) {
- List<OnlineApplication> oaList = ConfigurationDBRead
- .getAllActiveOnlineApplications();
- Iterator<OnlineApplication> oaIt = oaList.iterator();
- while (oaIt.hasNext()) {
- OnlineApplication oa = oaIt.next();
- if (oa.getPublicURLPrefix().equals(entityID)) {
+// List<OnlineApplication> oaList = ConfigurationDBRead
+// .getAllActiveOnlineApplications();
+
+ OnlineApplication oa = ConfigurationDBRead
+ .getActiveOnlineApplication(entityID);
+
+// Iterator<OnlineApplication> oaIt = oaList.iterator();
+// while (oaIt.hasNext()) {
+// OnlineApplication oa = oaIt.next();
+// if (oa.getPublicURLPrefix().equals(entityID)) {
+
+ if (oa != null && oa.getAuthComponentOA() != null) {
+
OAPVP2 pvp2Config = oa.getAuthComponentOA().getOAPVP2();
if (pvp2Config != null) {
return pvp2Config.getCertificate();
}
}
- }
+// }
return null;
}