aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java
diff options
context:
space:
mode:
authorpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-12-06 16:47:48 +0000
committerpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-12-06 16:47:48 +0000
commit029b777dfc1bf108ffd8d20b7cbec9988ad4c73a (patch)
tree0dfd52406f0a0345852dd91ed59c09610dfd1d98 /id/server/idserverlib/src/main/java
parent4d92d1f3c7a94df1078583b728fbba20c42fdef6 (diff)
downloadmoa-id-spss-029b777dfc1bf108ffd8d20b7cbec9988ad4c73a.tar.gz
moa-id-spss-029b777dfc1bf108ffd8d20b7cbec9988ad4c73a.tar.bz2
moa-id-spss-029b777dfc1bf108ffd8d20b7cbec9988ad4c73a.zip
Added SessionCleaner which removes sessions began and not picked up SAML-assertions
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1052 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/main/java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java11
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java2
2 files changed, 7 insertions, 6 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index caeff905b..3457051c4 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -1044,7 +1044,7 @@ public class AuthenticationServer implements MOAIDAuthConstants {
} else {
authData.setBPK(identityLink.getIdentificationValue());
if (identityLink.getIdentificationType().equals(Constants.URN_PREFIX_BASEID)) {
- // only compute bPK if online applcation is a public service and we have the Stammzahl
+ // only compute bPK if online application is a public service and we have the Stammzahl
String bpkBase64 = new BPKBuilder().buildBPK(
identityLink.getIdentificationValue(),
session.getTarget());
@@ -1202,15 +1202,14 @@ public class AuthenticationServer implements MOAIDAuthConstants {
synchronized (authenticationDataStore) {
Set keys = new HashSet(authenticationDataStore.keySet());
for (Iterator iter = keys.iterator(); iter.hasNext();) {
- String samlArtifact = (String) iter.next();
- AuthenticationData authData =
- (AuthenticationData) authenticationDataStore.get(samlArtifact);
+ String samlAssertionHandle = (String) iter.next();
+ AuthenticationData authData = (AuthenticationData) authenticationDataStore.get(samlAssertionHandle);
if (now - authData.getTimestamp().getTime() > authDataTimeOut) {
Logger.info(
MOAIDMessageProvider.getInstance().getMessage(
"cleaner.03",
- new Object[] { samlArtifact }));
- authenticationDataStore.remove(samlArtifact);
+ new Object[] { authData.getAssertionID() }));
+ authenticationDataStore.remove(samlAssertionHandle);
}
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
index 7964e2fb6..dadfc16d6 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
@@ -158,6 +158,8 @@ public class MOAIDAuthInitializer {
.setSecondsAuthDataTimeOut(authDataTimeOut);
}
+ // Starts the session cleaner thread to remove unpicked authentication data
+ AuthenticationSessionCleaner.start();
}
} \ No newline at end of file