protected void initSignatureTrustEngineProvider(final boolean forceReinit) {
        // Build provider for digital signature validation and encryption
        if (signatureTrustEngineProvider == null || forceReinit) {
            this.signatureTrustEngineProvider = new ExplicitSignatureTrustEngineProvider(
                this.identityProviderMetadataResolver, this.serviceProviderMetadataResolver);
            if (this.configuration.isAllSignatureValidationDisabled()) {
                this.signatureTrustEngineProvider = new LogOnlySignatureTrustEngineProvider(this.signatureTrustEngineProvider);
            }
        }
    }
This class is the client to authenticate and logout users with a SAML2 Identity Provider.

@author Michael Remond
@author Misagh Moayyed
@author Ruochao Zheng
@author Jerome Leleu
@since 1.5.0
pac4j-saml/src/main/java/org/pac4j/saml/client/SAML2Client.java