diff options
| author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2020-02-21 16:22:31 +0100 | 
|---|---|---|
| committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2020-02-21 16:22:31 +0100 | 
| commit | 7ba8da297b7be40255ba5efb40c69a21fb130b3b (patch) | |
| tree | 14294d39790209235180d6a1de48539e163e7ebf /connector/src/test/java | |
| parent | d5f104bf22d204732897ef7127ad704d43d7a194 (diff) | |
| download | National_eIDAS_Gateway-7ba8da297b7be40255ba5efb40c69a21fb130b3b.tar.gz National_eIDAS_Gateway-7ba8da297b7be40255ba5efb40c69a21fb130b3b.tar.bz2 National_eIDAS_Gateway-7ba8da297b7be40255ba5efb40c69a21fb130b3b.zip | |
update to latest EAAF-components that uses OpenSAML3.x
Diffstat (limited to 'connector/src/test/java')
| -rw-r--r-- | connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java index db863815..e34c8036 100644 --- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java +++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/AuthnRequestValidatorTest.java @@ -12,11 +12,11 @@ import org.junit.Before;  import org.junit.BeforeClass;  import org.junit.Test;  import org.junit.runner.RunWith; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.xml.ConfigurationException; -import org.opensaml.xml.io.Unmarshaller; -import org.opensaml.xml.io.UnmarshallerFactory; -import org.opensaml.xml.io.UnmarshallingException; +import org.opensaml.core.config.InitializationException; +import org.opensaml.core.xml.io.Unmarshaller; +import org.opensaml.core.xml.io.UnmarshallingException; +import org.opensaml.core.xml.util.XMLObjectSupport; +import org.opensaml.saml.saml2.core.AuthnRequest;  import org.springframework.beans.factory.annotation.Autowired;  import org.springframework.mock.web.MockHttpServletRequest;  import org.springframework.mock.web.MockHttpServletResponse; @@ -38,7 +38,8 @@ import at.gv.egiz.eaaf.core.exceptions.AuthnRequestValidatorException;  import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl;  import at.gv.egiz.eaaf.core.impl.utils.DomUtils;  import at.gv.egiz.eaaf.modules.pvp2.api.validation.IAuthnRequestPostProcessor; -import at.gv.egiz.eaaf.modules.pvp2.impl.opensaml.initialize.EaafDefaultSaml2Bootstrap; +import at.gv.egiz.eaaf.modules.pvp2.impl.opensaml.initialize.EaafOpenSaml3xInitializer; +import net.shibboleth.utilities.java.support.component.ComponentInitializationException;  @RunWith(SpringJUnit4ClassRunner.class)  @ContextConfiguration({ @@ -61,15 +62,16 @@ public class AuthnRequestValidatorTest {    /**     * jUnit class initializer. -   * @throws ConfigurationException In case of an error +   * @throws ComponentInitializationException In case of an error +   * @throws InitializationException In case of an error     *      */    @BeforeClass -  public static void classInitializer() throws ConfigurationException { +  public static void classInitializer() throws InitializationException, ComponentInitializationException  {      final String current = new java.io.File(".").toURI().toString();      System.setProperty("eidas.ms.configuration", current + "src/test/resources/config/junit_config_1.properties"); -    EaafDefaultSaml2Bootstrap.bootstrap(); +    EaafOpenSaml3xInitializer.eaafInitialize();    }    /** @@ -286,9 +288,7 @@ public class AuthnRequestValidatorTest {      final Element authBlockDom =          DomUtils.parseXmlValidating(AuthnRequestValidatorTest.class.getResourceAsStream(resource)); -    final UnmarshallerFactory unmarshallerFactory = -        org.opensaml.xml.Configuration.getUnmarshallerFactory(); -    final Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(authBlockDom); +    final Unmarshaller unmarshaller = XMLObjectSupport.getUnmarshaller(authBlockDom);      return (AuthnRequest) unmarshaller.unmarshall(authBlockDom);    } | 
