From 2887c1c1577fd558ca8f895b309f90f9729ff3ea Mon Sep 17 00:00:00 2001 From: gregor Date: Tue, 6 Jun 2006 19:17:13 +0000 Subject: =?UTF-8?q?Notwendige=20=C3=84nderungen=20f=C3=BCr=20Bugfix=20#=20?= =?UTF-8?q?320=20durchgef=C3=BChrt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@709 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/id/auth/data/AuthenticationSession.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'id.server/src/at/gv/egovernment') diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java b/id.server/src/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java index 27d91bf1f..74e31e45e 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java @@ -2,6 +2,8 @@ package at.gv.egovernment.moa.id.auth.data; import java.util.Date; +import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.Constants; /** * Session data to be stored between AuthenticationServer API calls. @@ -61,6 +63,8 @@ public class AuthenticationSession { */ private boolean businessService; + private static String TARGET_PREFIX_ = Constants.URN_PREFIX_CDID + "+"; + /** * Constructor for AuthenticationSession. * @@ -160,11 +164,20 @@ public class AuthenticationSession { } /** - * Sets the target. + * Sets the target. If the target includes the target prefix, the prefix will be stripped off. * @param target The target to set */ public void setTarget(String target) { - this.target = target; + if (target != null && target.startsWith(TARGET_PREFIX_)) + { + // If target starts with prefix "urn:publicid:gv.at:cdid+"; remove prefix + this.target = target.substring(TARGET_PREFIX_.length()); + Logger.debug("Target prefix stripped off; resulting target: " + this.target); + } + else + { + this.target = target; + } } /** -- cgit v1.2.3