Skip to content

Commit

Permalink
Init SAML DecryptionParserPool (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis-Cruz authored Sep 4, 2020
1 parent ed8f95e commit 42784fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bennu-saml-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@
<artifactId>pac4j-saml-opensamlv3</artifactId>
<version>${pac4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-ws-security-common</artifactId>
<version>2.3.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javamail_1.4_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<repositories>
<repository>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package org.fenixedu.bennu.saml.client;

import org.opensaml.core.config.ConfigurationService;
import org.opensaml.core.xml.schema.XSAny;
import org.opensaml.core.xml.schema.impl.XSAnyBuilder;
import org.opensaml.saml.common.xml.SAMLConstants;
import org.opensaml.xmlsec.config.DecryptionParserPool;
import org.pac4j.saml.client.SAML2Client;
import org.pac4j.saml.config.SAML2Configuration;
import org.apache.wss4j.common.saml.OpenSAMLUtil;

import javax.xml.namespace.QName;
import java.io.File;
Expand Down Expand Up @@ -98,6 +101,8 @@ private static SAML2Configuration getNewConfiguration(String[] govAttributesToRe

static {
CLIENT.setCallbackUrl(SAMLClientConfiguration.getConfiguration().callbackUrl());

ConfigurationService.register(DecryptionParserPool.class, new DecryptionParserPool(OpenSAMLUtil.getParserPool()));
}

public static SAML2Client getClient() {
Expand Down

0 comments on commit 42784fa

Please sign in to comment.