diff options
Diffstat (limited to 'eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/builder/PvpAttributeBuilder.java')
-rw-r--r-- | eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/builder/PvpAttributeBuilder.java | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/builder/PvpAttributeBuilder.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/builder/PvpAttributeBuilder.java index 73ba73c7..39d2a493 100644 --- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/builder/PvpAttributeBuilder.java +++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/builder/PvpAttributeBuilder.java @@ -25,10 +25,16 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.ServiceLoader; + +import org.opensaml.saml2.core.Attribute; +import org.opensaml.saml2.metadata.RequestedAttribute; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import at.gv.egiz.eaaf.core.api.idp.IAttributeBuilder; import at.gv.egiz.eaaf.core.api.idp.IAttributeGenerator; import at.gv.egiz.eaaf.core.api.idp.IAuthData; -import at.gv.egiz.eaaf.core.api.idp.IspConfiguration; +import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration; import at.gv.egiz.eaaf.core.exceptions.AttributeBuilderException; import at.gv.egiz.eaaf.core.exceptions.InvalidDateFormatAttributeException; import at.gv.egiz.eaaf.core.exceptions.UnavailableAttributeException; @@ -36,10 +42,6 @@ import at.gv.egiz.eaaf.core.impl.idp.builder.attributes.PvpMetadata; import at.gv.egiz.eaaf.modules.pvp2.exception.InvalidDateFormatException; import at.gv.egiz.eaaf.modules.pvp2.exception.Pvp2Exception; import at.gv.egiz.eaaf.modules.pvp2.impl.utils.Saml2Utils; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.metadata.RequestedAttribute; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class PvpAttributeBuilder { @@ -78,7 +80,6 @@ public class PvpAttributeBuilder { } - /** * Get a specific attribute builder. * @@ -94,7 +95,7 @@ public class PvpAttributeBuilder { /** * Build an SAML2 attribute. * - * @param name attribute name + * @param name attribute name * @param value attribute value * @return SAML2 attribute */ @@ -110,14 +111,14 @@ public class PvpAttributeBuilder { /** * Build a SAML2 attribute. * - * @param name attribute name - * @param oaParam Service-Provider configuration + * @param name attribute name + * @param oaParam Service-Provider configuration * @param authData serice-provider specific authentication data * @return SAML2 attribute - * @throws Pvp2Exception In case of a general error + * @throws Pvp2Exception In case of a general error * @throws AttributeBuilderException In case of an attribute builder error */ - public static Attribute buildAttribute(final String name, final IspConfiguration oaParam, + public static Attribute buildAttribute(final String name, final ISpConfiguration oaParam, final IAuthData authData) throws Pvp2Exception, AttributeBuilderException { if (builders.containsKey(name)) { try { @@ -151,10 +152,6 @@ public class PvpAttributeBuilder { return null; } - - - - /** * Return all attributes that has a {@link PvpMetadata} annotation. * @@ -182,9 +179,9 @@ public class PvpAttributeBuilder { /** * Build a requested attribute. * - * @param name attribute name + * @param name attribute name * @param friendlyName attribute friendlyname - * @param required is attribute mandatory + * @param required is attribute mandatory * @return SAML2 requested attribute */ public static RequestedAttribute buildReqAttribute(final String name, final String friendlyName, @@ -200,13 +197,15 @@ public class PvpAttributeBuilder { /** * Build a set of PVP Response-Attributes <br> * <br> - * <b>INFO:</b> If a specific attribute can not be build, a info is logged, but no execpetion is - * thrown. Therefore, the return List must not include all requested attributes. + * <b>INFO:</b> If a specific attribute can not be build, a info is logged, but + * no execpetion is thrown. Therefore, the return List must not include all + * requested attributes. * - * @param authData AuthenticationData <code>IAuthData</code> which is used to build the attribute - * values, but never <code>null</code> - * @param reqAttributenName List of PVP attribute names which are requested, but never - * <code>null</code> + * @param authData AuthenticationData <code>IAuthData</code> which is + * used to build the attribute values, but never + * <code>null</code> + * @param reqAttributenName List of PVP attribute names which are requested, but + * never <code>null</code> * @return List of PVP attributes, but never <code>null</code> */ public static List<Attribute> buildSetOfResponseAttributes(final IAuthData authData, @@ -240,5 +239,4 @@ public class PvpAttributeBuilder { return attrList; } - } |