diff options
author | Florian Reimair <florian.reimair@iaik.tugraz.at> | 2014-01-31 08:55:04 +0100 |
---|---|---|
committer | Florian Reimair <florian.reimair@iaik.tugraz.at> | 2014-01-31 17:17:31 +0100 |
commit | 5ee3da37829fa14d70ad827e19364be4800fab37 (patch) | |
tree | e134685762f1a1b88aaaae99aae2801de7ddf05f /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java | |
parent | e1e410da00a399a8b059645a14a7848b39d3525c (diff) | |
download | moa-id-spss-5ee3da37829fa14d70ad827e19364be4800fab37.tar.gz moa-id-spss-5ee3da37829fa14d70ad827e19364be4800fab37.tar.bz2 moa-id-spss-5ee3da37829fa14d70ad827e19364be4800fab37.zip |
fixed target type for MIS info
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java index bd8c6420d..9dfce7838 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/PEPSConnectorServlet.java @@ -200,6 +200,22 @@ public class PEPSConnectorServlet extends AuthServlet { OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(moasession.getPublicOAURLPrefix());
if (oaParam == null)
throw new AuthenticationException("auth.00", new Object[] { moasession.getPublicOAURLPrefix() });
+
+ // retrieve target
+ //TODO: check in case of SSO!!!
+ String targetType = null;
+ String targetValue = null;
+ if(oaParam.getBusinessService()) {
+ String id = oaParam.getIdentityLinkDomainIdentifier();
+ if (id.startsWith(AuthenticationSession.REGISTERANDORDNR_PREFIX_))
+ targetValue = id.substring(AuthenticationSession.REGISTERANDORDNR_PREFIX_.length());
+ else
+ targetValue = moasession.getDomainIdentifier();
+ targetType = AuthenticationSession.REGISTERANDORDNR_PREFIX_;
+ } else {
+ targetType = AuthenticationSession.TARGET_PREFIX_;
+ targetValue = oaParam.getTarget();
+ }
Logger.debug("Starting connecting SZR Gateway");
//contact SZR Gateway
@@ -207,7 +223,7 @@ public class PEPSConnectorServlet extends AuthServlet { try {
identityLink = STORKResponseProcessor.connectToSZRGateway(authnResponse.getPersonalAttributeList(),
oaParam.getFriendlyName(),
- oaParam.getTarget(),
+ targetType, targetValue,
oaParam.getMandateProfiles());
} catch (STORKException e) {
// this is really nasty but we work against the system here. We are supposed to get the gender attribute from
|