Search in sources :

Example 1 with SAML2RedirectActionBuilder

use of org.pac4j.saml.redirect.SAML2RedirectActionBuilder in project pac4j by pac4j.

the class SAML2Client method clientInit.

@Override
protected void clientInit() {
    CommonHelper.assertNotNull("configuration", this.configuration);
    // First of all, initialize the configuration. It may dynamically load some properties, if it is not a static one.
    this.configuration.init(getName());
    initCredentialProvider();
    initDecrypter();
    initSignatureSigningParametersProvider();
    final MetadataResolver metadataManager = initChainingMetadataResolver(initIdentityProviderMetadataResolver(), initServiceProviderMetadataResolver());
    initSAMLContextProvider(metadataManager);
    initSignatureTrustEngineProvider(metadataManager);
    initSAMLResponseValidator();
    initSAMLProfileHandler();
    defaultRedirectActionBuilder(new SAML2RedirectActionBuilder(this));
    defaultCredentialsExtractor(ctx -> {
        final SAML2MessageContext samlContext = this.contextProvider.buildContext(ctx);
        final SAML2Credentials credentials = (SAML2Credentials) this.profileHandler.receive(samlContext);
        return credentials;
    });
    defaultAuthenticator(new SAML2Authenticator());
    defaultLogoutActionBuilder(new SAML2LogoutActionBuilder<>(this));
}
Also used : SAML2MessageContext(org.pac4j.saml.context.SAML2MessageContext) SAML2RedirectActionBuilder(org.pac4j.saml.redirect.SAML2RedirectActionBuilder) SAML2Credentials(org.pac4j.saml.credentials.SAML2Credentials) SAML2IdentityProviderMetadataResolver(org.pac4j.saml.metadata.SAML2IdentityProviderMetadataResolver) SAML2ServiceProviderMetadataResolver(org.pac4j.saml.metadata.SAML2ServiceProviderMetadataResolver) SAML2MetadataResolver(org.pac4j.saml.metadata.SAML2MetadataResolver) MetadataResolver(org.opensaml.saml.metadata.resolver.MetadataResolver) ChainingMetadataResolver(org.opensaml.saml.metadata.resolver.ChainingMetadataResolver) SAML2Authenticator(org.pac4j.saml.credentials.authenticator.SAML2Authenticator)

Aggregations

ChainingMetadataResolver (org.opensaml.saml.metadata.resolver.ChainingMetadataResolver)1 MetadataResolver (org.opensaml.saml.metadata.resolver.MetadataResolver)1 SAML2MessageContext (org.pac4j.saml.context.SAML2MessageContext)1 SAML2Credentials (org.pac4j.saml.credentials.SAML2Credentials)1 SAML2Authenticator (org.pac4j.saml.credentials.authenticator.SAML2Authenticator)1 SAML2IdentityProviderMetadataResolver (org.pac4j.saml.metadata.SAML2IdentityProviderMetadataResolver)1 SAML2MetadataResolver (org.pac4j.saml.metadata.SAML2MetadataResolver)1 SAML2ServiceProviderMetadataResolver (org.pac4j.saml.metadata.SAML2ServiceProviderMetadataResolver)1 SAML2RedirectActionBuilder (org.pac4j.saml.redirect.SAML2RedirectActionBuilder)1