[java-identity-provider] branch main updated: IDP-1959 IdPAttributes to stop carrying Display Information

Rod Widdowson rdw at steadingsoftware.com
Sun Jul 17 14:13:44 UTC 2022


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=58e7723982835899d67445dd30b4872e9a140a8b

The following commit(s) were added to refs/heads/main by this push:
     new 58e772398 IDP-1959 IdPAttributes to stop carrying Display Information
58e772398 is described below

commit 58e7723982835899d67445dd30b4872e9a140a8b
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Jul 17 15:06:01 2022 +0100

    IDP-1959 IdPAttributes to stop carrying Display Information
    
    https://shibboleth.atlassian.net/browse/IDP-1959
    
    Stop consulting the attributes for display information (during consent)
---
 .../logic/impl/AttributeDisplayDescriptionFunction.java    | 14 +-------------
 .../consent/logic/impl/AttributeDisplayNameFunction.java   | 14 +-------------
 2 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayDescriptionFunction.java b/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayDescriptionFunction.java
index f492fb79a..f3f1c6fed 100644
--- a/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayDescriptionFunction.java
+++ b/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayDescriptionFunction.java
@@ -23,11 +23,8 @@ import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-import jakarta.servlet.http.HttpServletRequest;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
+import jakarta.servlet.http.HttpServletRequest;
 import net.shibboleth.idp.attribute.IdPAttribute;
 import net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry;
 import net.shibboleth.utilities.java.support.service.ReloadableService;
@@ -38,9 +35,6 @@ import net.shibboleth.utilities.java.support.service.ReloadableService;
  */
 public class AttributeDisplayDescriptionFunction extends AbstractAttributeDisplayFunction {
 
-    /** Logger. */
-    private final Logger log = LoggerFactory.getLogger(AttributeDisplayDescriptionFunction.class);
-    
     /**
      * Constructor.
      * 
@@ -57,12 +51,6 @@ public class AttributeDisplayDescriptionFunction extends AbstractAttributeDispla
     /** {@inheritDoc} */
     protected Map<Locale, String> getDisplayInfo( @Nonnull final AttributeTranscoderRegistry registry,
             @Nonnull final IdPAttribute attribute) {
-        @SuppressWarnings("removal")
-        final Map<Locale, String>  fromAttribute = attribute.getDisplayDescriptions();
-        if (fromAttribute != null  && !fromAttribute.isEmpty()) {
-            log.debug("Attribute {} carried locally defines descriptions, skipping the registry", attribute.getId());
-            return fromAttribute;
-        }
         return registry.getDescriptions(attribute);
     }
 }
diff --git a/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayNameFunction.java b/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayNameFunction.java
index e78327de4..83c622f39 100644
--- a/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayNameFunction.java
+++ b/idp-consent-impl/src/main/java/net/shibboleth/idp/consent/logic/impl/AttributeDisplayNameFunction.java
@@ -23,11 +23,8 @@ import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-import jakarta.servlet.http.HttpServletRequest;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
+import jakarta.servlet.http.HttpServletRequest;
 import net.shibboleth.idp.attribute.IdPAttribute;
 import net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry;
 import net.shibboleth.utilities.java.support.service.ReloadableService;
@@ -38,9 +35,6 @@ import net.shibboleth.utilities.java.support.service.ReloadableService;
  */
 public class AttributeDisplayNameFunction extends AbstractAttributeDisplayFunction {
 
-    /** Logger. */
-    private final Logger log = LoggerFactory.getLogger(AttributeDisplayNameFunction.class);
-
     /**
      * Constructor.
      * 
@@ -58,12 +52,6 @@ public class AttributeDisplayNameFunction extends AbstractAttributeDisplayFuncti
     @Override @Nonnull protected Map<Locale, String> getDisplayInfo(
             @Nonnull final AttributeTranscoderRegistry registry,
             @Nonnull final IdPAttribute attribute) {
-        @SuppressWarnings("removal")
-        final Map<Locale, String>  fromAttribute = attribute.getDisplayNames();
-        if (fromAttribute != null && !fromAttribute.isEmpty()) {
-            log.debug("Attribute {} carried locally defined names, skipping the registry", attribute.getId());
-            return fromAttribute;
-        }
         return  registry.getDisplayNames(attribute);
     }
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list