[java-idp-oidc] branch main updated: JOIDC-54 - Plugin makes indirect use of AWT

Henri Mikkonen henri.mikkonen at iki.fi
Tue Mar 1 14:57:15 UTC 2022


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

hjmikkon pushed a commit to branch main
in repository java-idp-oidc.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=b661360a5f893c2c89315c81b5d94a3088e4b7ed

The following commit(s) were added to refs/heads/main by this push:
     new b661360a JOIDC-54 - Plugin makes indirect use of AWT
b661360a is described below

commit b661360a5f893c2c89315c81b5d94a3088e4b7ed
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Tue Mar 1 16:54:34 2022 +0200

    JOIDC-54 - Plugin makes indirect use of AWT
    
    https://shibboleth.atlassian.net/browse/JOIDC-54
    
    Removed the AWK dependency. This also means that we're not setting the
    logo height or width to the mdui:Logo -element, that is dynamically built
    via logo_uri claim of the RP metadata. Even though those attributes are
    required by XML schema, this seems to be acceptable approach as the SAML
    metadata is built for RelyingPartyUIContext's purposes. Its code seems to
    be able to handle null values for height and width.
---
 ...lizeOutboundAuthenticationResponseMessageContext.java | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/InitializeOutboundAuthenticationResponseMessageContext.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/InitializeOutboundAuthenticationResponseMessageContext.java
index 49734cd3..970b9d65 100644
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/InitializeOutboundAuthenticationResponseMessageContext.java
+++ b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/InitializeOutboundAuthenticationResponseMessageContext.java
@@ -24,14 +24,11 @@ import net.shibboleth.idp.saml.profile.context.navigate.SAMLMetadataContextLooku
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
-import java.awt.image.BufferedImage;
-import java.io.IOException;
 import java.net.URI;
 import java.util.List;
 import java.util.function.Function;
 
 import javax.annotation.Nonnull;
-import javax.imageio.ImageIO;
 
 import org.opensaml.messaging.context.MessageContext;
 import org.opensaml.messaging.context.navigate.ChildContextLookup;
@@ -249,16 +246,9 @@ public class InitializeOutboundAuthenticationResponseMessageContext
             final Logo logo = new LogoBuilder().buildObject();
             logo.setXMLLang(tag == null ? defaultLanguage : tag.getLanguage());
             final URI logoUri = oidcMetadata.getLogoURI(tag);
-            try {
-                final BufferedImage image = ImageIO.read(oidcMetadata.getLogoURI(tag).toURL());
-                if (image != null) {
-                    logo.setURI(logoUri.toString());
-                    logo.setWidth(image.getWidth());
-                    logo.setHeight(image.getHeight());
-                    uiInfo.getLogos().add(logo);
-                }
-            } catch (final IOException e) {
-                log.warn("{} Could not load the image from the URI {}", getLogPrefix(), logoUri);
+            if (logoUri != null) {
+                logo.setURI(logoUri.toString());
+                uiInfo.getLogos().add(logo);
             }
         }
         for (final LangTag tag : oidcMetadata.getPolicyURIEntries().keySet()) {

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


More information about the commits mailing list