[java-opensaml] branch main updated: Add deprecations in HttpClientSecurityParameters.

Brent Putman putmanb at georgetown.edu
Wed Aug 30 03:36:21 UTC 2023


This is an automated email from the git hooks/post-receive script.

putmanb pushed a commit to branch main
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=f1e2e3539ddc4218992b0ccb408c61215fa7c920

The following commit(s) were added to refs/heads/main by this push:
     new f1e2e3539 Add deprecations in HttpClientSecurityParameters.
f1e2e3539 is described below

commit f1e2e3539ddc4218992b0ccb408c61215fa7c920
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Tue Aug 29 23:36:15 2023 -0400

    Add deprecations in HttpClientSecurityParameters.
---
 .../httpclient/HttpClientSecurityParameters.java        | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/opensaml-security-api/src/main/java/org/opensaml/security/httpclient/HttpClientSecurityParameters.java b/opensaml-security-api/src/main/java/org/opensaml/security/httpclient/HttpClientSecurityParameters.java
index 02cdd5459..82eb42e83 100644
--- a/opensaml-security-api/src/main/java/org/opensaml/security/httpclient/HttpClientSecurityParameters.java
+++ b/opensaml-security-api/src/main/java/org/opensaml/security/httpclient/HttpClientSecurityParameters.java
@@ -26,6 +26,8 @@ import javax.net.ssl.HostnameVerifier;
 import net.shibboleth.shared.annotation.constraint.NotLive;
 import net.shibboleth.shared.annotation.constraint.Unmodifiable;
 import net.shibboleth.shared.collection.CollectionSupport;
+import net.shibboleth.shared.primitive.DeprecationSupport;
+import net.shibboleth.shared.primitive.DeprecationSupport.ObjectType;
 import net.shibboleth.shared.primitive.StringSupport;
 import net.shibboleth.shared.resolver.CriteriaSet;
 
@@ -144,8 +146,14 @@ public class HttpClientSecurityParameters {
      * @return this object
      * 
      * @since 3.4.0
+     * 
+     * @deprecated use {@link #setPreemptiveBasicAuthMap(Map)}
      */
+    @Deprecated
     @Nonnull public HttpClientSecurityParameters setAuthCache(@Nullable final AuthCache cache) {
+        DeprecationSupport.warn(ObjectType.METHOD, "setAuthCache", "HttpClientSecurityParameters",
+                "setPreemptiveBasicAuthMap(Map)");
+
         authCache = cache;
         
         return this;
@@ -164,7 +172,10 @@ public class HttpClientSecurityParameters {
      * provide an instance of {@link CredentialsProvider} via {@link #setCredentialsProvider(CredentialsProvider)}.</p>
      * 
      * @param credentials the username and password credentials
+     * 
+     * @deprecated use {@link #setPreemptiveBasicAuthMap(Map)} or {@link #setCredentialsProvider(CredentialsProvider)}
      */
+    @Deprecated
     public void setBasicCredentials(@Nullable final UsernamePasswordCredentials credentials) {
         setBasicCredentialsWithScope(credentials, null);
     }
@@ -184,11 +195,17 @@ public class HttpClientSecurityParameters {
      * @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 #setPreemptiveBasicAuthMap(Map)} or {@link #setCredentialsProvider(CredentialsProvider)}
+     * 
      * @return this object
      */
+    @Deprecated
     @Nonnull public HttpClientSecurityParameters setBasicCredentialsWithScope(
             @Nullable final UsernamePasswordCredentials credentials,
             @Nullable final AuthScope scope) {
+        
+        DeprecationSupport.warn(ObjectType.METHOD, "setBasicCredentialsWithScope", "HttpClientSecurityParameters",
+                "setPreemptiveBasicAuthMap(Map) or setCredentialsProvider(CredentialsProvider)");
 
         if (credentials != null) {
             AuthScope authScope = scope;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list