[java-opensaml COMMIT] in /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl: AbstractD...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Oct 21 17:59:07 EDT 2016
Author: putmanb
Date: Fri Oct 21 17:59:07 2016
New Revision: 4549
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4549&view=rev
Log:
OSJ-142: Update HTTP-based metadata resolvers to support HttpClientSecurityParameters
Modified:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicHTTPMetadataResolver.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/HTTPMetadataResolver.java
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicHTTPMetadataResolver.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicHTTPMetadataResolver.java?rev=4549&r1=4548&r2=4549&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicHTTPMetadataResolver.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractDynamicHTTPMetadataResolver.java Fri Oct 21 17:59:07 2016
@@ -47,6 +47,7 @@
import org.opensaml.core.xml.io.UnmarshallingException;
import org.opensaml.core.xml.util.XMLObjectSource;
import org.opensaml.security.httpclient.HttpClientSecurityConstants;
+import org.opensaml.security.httpclient.HttpClientSecurityParameters;
import org.opensaml.security.httpclient.HttpClientSecuritySupport;
import org.opensaml.security.trust.TrustEngine;
import org.opensaml.security.x509.X509Credential;
@@ -105,11 +106,18 @@
/** HttpClient ResponseHandler instance to use. */
@Nonnull private ResponseHandler<XMLObject> responseHandler;
- /** HttpClient credentials provider. */
+ /** HttpClient credentials provider.
+ * @deprecated use {@link #httpClientSecurityParameters}.
+ * */
@Nullable private CredentialsProvider credentialsProvider;
- /** Optional trust engine used in evaluating server TLS credentials. */
+ /** Optional trust engine used in evaluating server TLS credentials.
+ * @deprecated use {@link #httpClientSecurityParameters}.
+ * */
@Nullable private TrustEngine<? super X509Credential> tlsTrustEngine;
+
+ /** Optional HttpClient security parameters.*/
+ @Nullable private HttpClientSecurityParameters httpClientSecurityParameters;
/**
* Constructor.
@@ -140,14 +148,13 @@
* Sets the optional trust engine used in evaluating server TLS credentials.
*
* <p>
- * Must be used in conjunction with an HttpClient instance which is configured with either a
- * {@link org.opensaml.security.httpclient.impl.SecurityEnhancedTLSSocketFactory} or the (deprecated)
- * {@link org.opensaml.security.httpclient.impl.TrustEngineTLSSocketFactory}. If such a socket
- * factory is not configured, then this will result in no TLS trust evaluation being performed
- * and a {@link ResolverException} will ultimately be thrown.
+ * See TLS socket factory requirements documented for
+ * {@link #setHttpClientSecurityParameters(HttpClientSecurityParameters)}.
* </p>
*
* @param engine the trust engine instance to use
+ *
+ * @deprecated use {@link #setHttpClientSecurityParameters(HttpClientSecurityParameters)}
*/
public void setTLSTrustEngine(@Nullable final TrustEngine<? super X509Credential> engine) {
tlsTrustEngine = engine;
@@ -157,6 +164,8 @@
* Set an instance of {@link CredentialsProvider} used for authentication by the HttpClient instance.
*
* @param provider the credentials provider
+ *
+ * @deprecated use {@link #setHttpClientSecurityParameters(HttpClientSecurityParameters)}
*/
public void setCredentialsProvider(@Nullable final CredentialsProvider provider) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
@@ -177,6 +186,8 @@
* provide an instance of {@link CredentialsProvider} via {@link #setCredentialsProvider(CredentialsProvider)}.</p>
*
* @param credentials the username and password credentials
+ *
+ * @deprecated use {@link #setHttpClientSecurityParameters(HttpClientSecurityParameters)}
*/
public void setBasicCredentials(@Nullable final UsernamePasswordCredentials credentials) {
setBasicCredentialsWithScope(credentials, null);
@@ -196,6 +207,8 @@
*
* @param credentials the username and password credentials
* @param scope the HTTP client auth scope with which to scope the credentials, may be null
+ *
+ * @deprecated use {@link #setHttpClientSecurityParameters(HttpClientSecurityParameters)}
*/
public void setBasicCredentialsWithScope(@Nullable final UsernamePasswordCredentials credentials,
@Nullable final AuthScope scope) {
@@ -215,6 +228,50 @@
credentialsProvider = null;
}
+ }
+
+ /**
[... 213 lines stripped ...]
More information about the commits
mailing list