From f77f1a4ec8766550641cf6079d08c724f9cf15f5 Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Sun, 22 Jun 2014 05:17:37 +0200 Subject: spcountry workaround --- MOA.iml | 13 +++++ common/moa-common.iml | 30 ++++++++++ id/id.iml | 13 +++++ id/oa/moa-id-oa.iml | 64 ++++++++++++++++++++++ .../MandateAttributeRequestProvider.java | 18 ++++++ spss/spss.iml | 13 +++++ 6 files changed, 151 insertions(+) create mode 100644 MOA.iml create mode 100644 common/moa-common.iml create mode 100644 id/id.iml create mode 100644 id/oa/moa-id-oa.iml create mode 100644 spss/spss.iml diff --git a/MOA.iml b/MOA.iml new file mode 100644 index 000000000..c418d6693 --- /dev/null +++ b/MOA.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/common/moa-common.iml b/common/moa-common.iml new file mode 100644 index 000000000..d9cc344fc --- /dev/null +++ b/common/moa-common.iml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/id/id.iml b/id/id.iml new file mode 100644 index 000000000..c418d6693 --- /dev/null +++ b/id/id.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/id/oa/moa-id-oa.iml b/id/oa/moa-id-oa.iml new file mode 100644 index 000000000..b2663c565 --- /dev/null +++ b/id/oa/moa-id-oa.iml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/MandateAttributeRequestProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/MandateAttributeRequestProvider.java index cd9042342..8df3c00aa 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/MandateAttributeRequestProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/MandateAttributeRequestProvider.java @@ -127,6 +127,24 @@ public class MandateAttributeRequestProvider extends AttributeProvider { String spInstitution = StringUtils.isEmpty(oaParam.getFriendlyName()) ? "UNKNOWN" : oaParam.getFriendlyName(); String spApplication = spInstitution; + if ((spCountryCode == null) || (spCountryCode.length()<2)) { + spCountryCode = oaParam.getTarget(); + Logger.info("Setting spcountry target: " + oaParam.getTarget()); + Logger.info("idlink ident " + oaParam.getIdentityLinkDomainIdentifier()); + Logger.info("idlink type " + oaParam.getIdentityLinkDomainIdentifierType()); + Logger.info("Setting spcountry target friendly : " + oaParam.getTargetFriendlyName()); + Logger.info("Oatype : " + oaParam.getOaType()); + Logger.info("puburl : " + oaParam.getPublicURLPrefix()); + if ("STORK".equals(oaParam.getIdentityLinkDomainIdentifierType())) { + + spCountryCode = oaParam.getIdentityLinkDomainIdentifier().substring(oaParam.getIdentityLinkDomainIdentifier().length()-2); + Logger.info("Set to " +spCountryCode); + } + + } + + + //generate AttrQueryRequest STORKAttrQueryRequest attributeRequest = new STORKAttrQueryRequest(); attributeRequest.setDestination(destination); diff --git a/spss/spss.iml b/spss/spss.iml new file mode 100644 index 000000000..c418d6693 --- /dev/null +++ b/spss/spss.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + -- cgit v1.2.3