This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 2a6b3fb0a6 Remove deprecated code 2a6b3fb0a6 is described below commit 2a6b3fb0a61c547afd05a4f6c600142c93de35f3 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Mar 15 13:47:25 2023 +0000 Remove deprecated code --- java/org/apache/catalina/Realm.java | 43 +--------------------- .../authenticator/DigestAuthenticator.java | 6 --- java/org/apache/catalina/realm/RealmBase.java | 24 ------------ 3 files changed, 2 insertions(+), 71 deletions(-) diff --git a/java/org/apache/catalina/Realm.java b/java/org/apache/catalina/Realm.java index e81802965e..bf15dc2982 100644 --- a/java/org/apache/catalina/Realm.java +++ b/java/org/apache/catalina/Realm.java @@ -84,47 +84,10 @@ public interface Realm extends Contained { Principal authenticate(String username, String credentials); - /** - * Try to authenticate with the specified username, which - * matches the digest calculated using the given parameters using the - * method described in RFC 2617 (which is a superset of RFC 2069). - * - * @param username Username of the Principal to look up - * @param digest Digest which has been submitted by the client - * @param nonce Unique (or supposedly unique) token which has been used - * for this request - * @param nc the nonce counter - * @param cnonce the client chosen nonce - * @param qop the "quality of protection" ({@code nc} and {@code cnonce} - * will only be used, if {@code qop} is not {@code null}). - * @param realm Realm name - * @param digestA2 Second digest calculated as digest(Method + ":" + uri) - * - * @return the associated principal, or {@code null} if there is none. - * - * @deprecated Unused. Use {@link #authenticate(String, String, String, - * String, String, String, String, String, String)}. Will be removed in - * Tomcat 11. - */ - @Deprecated - Principal authenticate(String username, String digest, - String nonce, String nc, String cnonce, - String qop, String realm, - String digestA2); - - /** * Try to authenticate with the specified username, which * matches the digest calculated using the given parameters using the * method described in RFC 7616. - * <p> - * The default implementation calls {@link #authenticate(String, String, - * String, String, String, String, String, String)} for backwards - * compatibility which effectively forces the use of MD5 regardless of the - * algorithm specified in the call to this method. - * <p> - * Implementations are expected to override the default implementation and - * take account of the algorithm parameter. * * @param username Username of the Principal to look up * @param digest Digest which has been submitted by the client @@ -140,12 +103,10 @@ public interface Realm extends Contained { * * @return the associated principal, or {@code null} if there is none. */ - default Principal authenticate(String username, String digest, + Principal authenticate(String username, String digest, String nonce, String nc, String cnonce, String qop, String realm, - String digestA2, String algorithm) { - return authenticate(username, digest, nonce, nc, cnonce, qop, realm, digestA2); - } + String digestA2, String algorithm); /** diff --git a/java/org/apache/catalina/authenticator/DigestAuthenticator.java b/java/org/apache/catalina/authenticator/DigestAuthenticator.java index f80f2181e9..2843abdbe0 100644 --- a/java/org/apache/catalina/authenticator/DigestAuthenticator.java +++ b/java/org/apache/catalina/authenticator/DigestAuthenticator.java @@ -558,12 +558,6 @@ public class DigestAuthenticator extends AuthenticatorBase { return true; } - @Deprecated - public boolean validate(Request request) { - List<AuthDigest> fallbackList = Arrays.asList(FALLBACK_DIGEST); - return validate(request, fallbackList); - } - public boolean validate(Request request, List<AuthDigest> algorithms) { if ((userName == null) || (realmName == null) || (nonce == null) || (uri == null) || (response == null)) { return false; diff --git a/java/org/apache/catalina/realm/RealmBase.java b/java/org/apache/catalina/realm/RealmBase.java index c7bc3f9097..a91c2f4763 100644 --- a/java/org/apache/catalina/realm/RealmBase.java +++ b/java/org/apache/catalina/realm/RealmBase.java @@ -328,14 +328,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements Realm { } - @Deprecated - @Override - public Principal authenticate(String username, String clientDigest, String nonce, String nc, String cnonce, - String qop, String realm, String digestA2) { - return authenticate(username, clientDigest, nonce, nc, cnonce, qop, realm, digestA2, "MD5"); - } - - @Override public Principal authenticate(String username, String clientDigest, String nonce, String nc, String cnonce, String qop, String realm, String digestA2, String algorithm) { @@ -1028,22 +1020,6 @@ public abstract class RealmBase extends LifecycleMBeanBase implements Realm { } - /** - * Return the digest associated with given principal's user name. - * - * @param username The user name - * @param realmName The realm name - * - * @return the digest for the specified user - * - * @deprecated Unused. Use {@link #getDigest(String, String, String)}. Will be removed in Tomcat 11. - */ - @Deprecated - protected String getDigest(String username, String realmName) { - return getDigest(username, realmName, "MD5"); - } - - /** * Return the digest associated with given principal's user name. * --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org