From c559071dcf6d1fc0f3dbea3cfb0820719c42439f Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Fri, 7 Nov 2014 15:08:58 +0100 Subject: stork2-commons update --- .../src/main/java/eu/stork/peps/auth/commons/Linker.java | 5 ++++- .../main/java/eu/stork/peps/auth/commons/PEPSErrors.java | 9 +++++++-- .../java/eu/stork/peps/auth/commons/PEPSParameters.java | 14 +++++++++++++- .../eu/stork/peps/auth/commons/PersonalAttributeList.java | 4 ++-- .../eu/stork/peps/auth/commons/STORKAttrQueryResponse.java | 2 +- .../eu/stork/peps/auth/commons/STORKAuthnResponse.java | 2 +- 6 files changed, 28 insertions(+), 8 deletions(-) (limited to 'id/server/stork2-commons/src/main/java/eu/stork/peps/auth') diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java index 6e7c891da..94882de77 100644 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java @@ -145,7 +145,10 @@ public final class Linker implements Serializable { //Assertion storage this.assertions.put(source, attrResponse); - + // previously: getTotalPersonalAttributeList() in both cases + if ( source.getSourceType()==AttributeSource.SOURCE_REMOTE_COUNTRY ) + this.attributeProvidersMap.put(source, attrResponse.getTotalPersonalAttributeList()); + else this.attributeProvidersMap.put(source, attrResponse.getPersonalAttributeList()); //this.attributeProvidersMap.put(source, attrResponse.getTotalPersonalAttributeList()); } diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java index 5da9ba494..f2493db4e 100644 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java @@ -325,8 +325,13 @@ public enum PEPSErrors { /** * Represents the 'colleagueAttributeRequest.invalidSAML' constant error identifier. */ - COLLEAGUE_ATTR_REQ_INVALID_SAML("colleagueAttributeRequest.invalidSAML"); - + COLLEAGUE_ATTR_REQ_INVALID_SAML("colleagueAttributeRequest.invalidSAML"), + + /** + * Represents the 'invalid.attr.country.code' constant error identifier. + */ + INVALID_COUNTRY_CODE("invalid.attr.country.code"); + /** * Represents the constant's value. */ diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java index 15c2ae552..dd534499d 100644 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java @@ -407,10 +407,17 @@ public enum PEPSParameters { * Represents the 'spCountry' constant value. */ SPCOUNTRY("spCountry"), + /** * Represents the 'spInstitution' constant value. */ SPINSTITUTION("spInstitution"), + + /** + * Represents the 'spCountryCode' constant value. + */ + SP_COUNTRY_CODE("spCountryCode"), + /** * Represents the 'storkAttribute.number' parameter constant. */ @@ -598,7 +605,12 @@ public enum PEPSParameters { /** * Represents the 'complexAttrListOpt' parameter constant. */ - COMPLEX_ATTR_LIST_OPT("complexAttrListOpt"); + COMPLEX_ATTR_LIST_OPT("complexAttrListOpt"), + /** + * Represents the 'idPDerivedAttrList' parameter constant. + */ + + IDP_DERIVED_ATTR_LIST("idPDerivedAttrList"); /** * Represents the constant's value. diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java index 9a0f87488..991682c9b 100644 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java @@ -54,13 +54,13 @@ public final class PersonalAttributeList extends /** * Hash with the latest fetched attribute name alias. */ - private final Map latestAttrAlias = + private final transient Map latestAttrAlias = new HashMap(); /** * Hash with mapping number of alias or the attribute name. */ - private final Map attrAliasNumber = + private final transient Map attrAliasNumber = new HashMap(); /** diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java index 1974f4f66..f6d459878 100644 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java @@ -71,7 +71,7 @@ public class STORKAttrQueryResponse implements Serializable { private List attributeLists; /** Citizen's personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); + private transient IPersonalAttributeList attributeList = new PersonalAttributeList(); /** * Logger object. diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java index c4a3e2b6c..d2cc370d3 100644 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java +++ b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java @@ -68,7 +68,7 @@ public final class STORKAuthnResponse implements Serializable { private String country; /** Citizen's personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); + private transient IPersonalAttributeList attributeList = new PersonalAttributeList(); /** List of all assertions in response **/ private List assertions; -- cgit v1.2.3