Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Authenticator.java @ 9747:cfc0aab9947f 3.2.x
Enable bind-mounting client configuration in docker container
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 05 Sep 2022 17:55:32 +0200 |
parents | 2c8259176c46 |
children |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Authenticator.java Tue Aug 30 15:02:10 2022 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Authenticator.java Mon Sep 05 17:55:32 2022 +0200 @@ -8,6 +8,7 @@ package org.dive4elements.river.client.server.auth.was; +import java.io.File; import java.io.IOException; import java.security.GeneralSecurityException; import javax.servlet.ServletContext; @@ -62,12 +63,15 @@ return null; } else { - String trustedKey = - (String)context.getInitParameter("saml-trusted-public-key"); + File trustedKey = new File( + context.getInitParameter("saml-trusted-public-key")); + String path = trustedKey.isAbsolute() + ? trustedKey.getPath() + : context.getRealPath(trustedKey.getPath()); String timeEpsilon = context.getInitParameter( "saml-time-tolerance"); return new Response(entity, username, password, features, - context.getRealPath(trustedKey), timeEpsilon); + path, timeEpsilon); } } catch(GeneralSecurityException e) {