Java源码示例:org.springframework.security.saml.websso.ArtifactResolutionProfileImpl

示例1
@Bean
@Conditional(InsightsSAMLBeanInitializationCondition.class)
public SAMLProcessorImpl processor() {

	Collection<SAMLBinding> bindings = new ArrayList<>();

	ArtifactResolutionProfileImpl artifactResolutionProfile = new ArtifactResolutionProfileImpl(httpClient());
	HTTPSOAP11Binding soapBinding = new HTTPSOAP11Binding(parserPool());
	artifactResolutionProfile.setProcessor(new SAMLProcessorImpl(soapBinding));

	bindings.add(httpRedirectDeflateBinding());
	bindings.add(httpPostBinding());
	bindings.add(new HTTPArtifactBinding(parserPool(), velocityEngine(), artifactResolutionProfile));
	bindings.add(new HTTPSOAP11Binding(parserPool()));
	bindings.add(new HTTPPAOS11Binding(parserPool()));
	return new SAMLProcessorImpl(bindings);
}
 
示例2
@Bean
public SAMLProcessorImpl processor() {
    HttpClient httpClient = new HttpClient(new MultiThreadedHttpConnectionManager());
    ArtifactResolutionProfileImpl artifactResolutionProfile = new ArtifactResolutionProfileImpl(httpClient);
    HTTPSOAP11Binding soapBinding = new HTTPSOAP11Binding(parserPool());
    artifactResolutionProfile.setProcessor(new SAMLProcessorImpl(soapBinding));

    VelocityEngine velocityEngine = VelocityFactory.getEngine();
    Collection<SAMLBinding> bindings = new ArrayList<>();
    bindings.add(new HTTPRedirectDeflateBinding(parserPool()));
    bindings.add(new HTTPPostBinding(parserPool(), velocityEngine));
    bindings.add(new HTTPArtifactBinding(parserPool(), velocityEngine, artifactResolutionProfile));
    bindings.add(new HTTPSOAP11Binding(parserPool()));
    bindings.add(new HTTPPAOS11Binding(parserPool()));
    return new SAMLProcessorImpl(bindings);
}
 
示例3
@VisibleForTesting
protected HTTPArtifactBinding createDefaultArtifactBinding(ServiceProviderBuilder builder) {
    HttpClientParams params = new HttpClientParams();
    params.setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT, 60000);
    HttpClient httpClient = new HttpClient(params, new MultiThreadedHttpConnectionManager());
    ArtifactResolutionProfileImpl artifactResolutionProfile = new ArtifactResolutionProfileImpl(httpClient);
    builder.setSharedObject(ArtifactResolutionProfile.class, artifactResolutionProfile);
    HTTPSOAP11Binding soapBinding = new HTTPSOAP11Binding(parserPool);
    artifactResolutionProfile.setProcessor(new SAMLProcessorImpl(soapBinding));
    return new HTTPArtifactBinding(parserPool, getVelocityEngine(), artifactResolutionProfile);
}