Search in sources :

Example 6 with SAML2ClientConfiguration

use of org.pac4j.saml.client.SAML2ClientConfiguration in project pac4j by pac4j.

the class SAML2IdentityProviderMetadataResolverTest method setUp.

@Before
public void setUp() {
    SAML2ClientConfiguration configuration = new SAML2ClientConfiguration();
    configuration.setIdentityProviderMetadataResource(new ClassPathResource("idp-metadata.xml"));
    metadataResolver = new SAML2IdentityProviderMetadataResolver(configuration);
}
Also used : SAML2ClientConfiguration(org.pac4j.saml.client.SAML2ClientConfiguration) ClassPathResource(org.springframework.core.io.ClassPathResource) Before(org.junit.Before)

Example 7 with SAML2ClientConfiguration

use of org.pac4j.saml.client.SAML2ClientConfiguration in project pac4j by pac4j.

the class RunTestshib method getClient.

@Override
protected IndirectClient getClient() {
    final SAML2ClientConfiguration cfg = new SAML2ClientConfiguration(new ClassPathResource("samlKeystore.jks"), "pac4j-demo-passwd", "pac4j-demo-passwd", new ClassPathResource("testshib-providers.xml"));
    cfg.setMaximumAuthenticationLifetime(3600);
    cfg.setServiceProviderEntityId("urn:mace:saml:pac4j.org");
    cfg.setServiceProviderMetadataResource(new FileSystemResource(new File("target", "test-sp-metadata.xml").getAbsolutePath()));
    cfg.setDestinationBindingType(SAMLConstants.SAML2_REDIRECT_BINDING_URI);
    final SAML2Client client = new SAML2Client(cfg);
    client.setCallbackUrl(PAC4J_URL);
    return client;
}
Also used : SAML2Client(org.pac4j.saml.client.SAML2Client) SAML2ClientConfiguration(org.pac4j.saml.client.SAML2ClientConfiguration) FileSystemResource(org.springframework.core.io.FileSystemResource) File(java.io.File) ClassPathResource(org.springframework.core.io.ClassPathResource)

Aggregations

SAML2ClientConfiguration (org.pac4j.saml.client.SAML2ClientConfiguration)7 SAML2Client (org.pac4j.saml.client.SAML2Client)5 CasClient (org.pac4j.cas.client.CasClient)3 FacebookClient (org.pac4j.oauth.client.FacebookClient)3 TwitterClient (org.pac4j.oauth.client.TwitterClient)3 GoogleOidcClient (org.pac4j.oidc.client.GoogleOidcClient)3 OidcClient (org.pac4j.oidc.client.OidcClient)3 Verb (com.github.scribejava.core.model.Verb)2 JWSAlgorithm (com.nimbusds.jose.JWSAlgorithm)2 Collection (java.util.Collection)2 LinkedHashSet (java.util.LinkedHashSet)2 Set (java.util.Set)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 StringUtils (org.apache.commons.lang3.StringUtils)2 Before (org.junit.Before)2 CasConfiguration (org.pac4j.cas.config.CasConfiguration)2 BaseClient (org.pac4j.core.client.BaseClient)2 Clients (org.pac4j.core.client.Clients)2 ClassPathResource (org.springframework.core.io.ClassPathResource)2 File (java.io.File)1