From 782d8e40a0bd60f1119170601d7ea54ed8785cda Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Wed, 25 Dec 2019 22:03:55 +0100 Subject: [PATCH] Use proper scheme names in text --- .../hc/client5/testing/auth/BasicAuthTokenExtractor.java | 2 +- .../org/apache/hc/client5/http/impl/auth/KerberosScheme.java | 2 +- .../http/examples/ClientPreemptiveBasicAuthentication.java | 4 ++-- .../http/examples/ClientPreemptiveDigestAuthentication.java | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/auth/BasicAuthTokenExtractor.java b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/auth/BasicAuthTokenExtractor.java index 5fd0db13e..105ffa07e 100644 --- a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/auth/BasicAuthTokenExtractor.java +++ b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/auth/BasicAuthTokenExtractor.java @@ -52,7 +52,7 @@ public class BasicAuthTokenExtractor { final BinaryDecoder codec = new Base64(); return new String(codec.decode(credsRaw), StandardCharsets.US_ASCII); } catch (final DecoderException ex) { - throw new ProtocolException("Malformed BASIC credentials"); + throw new ProtocolException("Malformed Basic credentials"); } } } diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/KerberosScheme.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/KerberosScheme.java index e9675f5ca..181f6df63 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/KerberosScheme.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/KerberosScheme.java @@ -34,7 +34,7 @@ import org.ietf.jgss.GSSException; import org.ietf.jgss.Oid; /** - * KERBEROS authentication scheme. + * Kerberos authentication scheme. *

* Please note this class is considered experimental and may be discontinued or removed * in the future. diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveBasicAuthentication.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveBasicAuthentication.java index e34493a8f..7b71f821b 100644 --- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveBasicAuthentication.java +++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveBasicAuthentication.java @@ -38,7 +38,7 @@ import org.apache.hc.core5.http.io.entity.EntityUtils; /** * An example of how HttpClient can be customized to authenticate - * preemptively using BASIC scheme. + * preemptively using Basic scheme. * * Generally, preemptive authentication can be considered less * secure than a response to an authentication challenge @@ -49,7 +49,7 @@ public class ClientPreemptiveBasicAuthentication { public static void main(final String[] args) throws Exception { try (final CloseableHttpClient httpclient = HttpClients.createDefault()) { - // Generate BASIC scheme object and add it to the local auth cache + // Generate Basic scheme object and add it to the local auth cache final BasicScheme basicAuth = new BasicScheme(); basicAuth.initPreemptive(new UsernamePasswordCredentials("user", "passwd".toCharArray())); diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveDigestAuthentication.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveDigestAuthentication.java index e18c23556..08af92d5a 100644 --- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveDigestAuthentication.java +++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientPreemptiveDigestAuthentication.java @@ -42,9 +42,9 @@ import org.apache.hc.core5.http.io.entity.EntityUtils; /** * An example of how HttpClient can authenticate multiple requests - * using the same DIGEST scheme. After the initial request / response exchange + * using the same Digest scheme. After the initial request / response exchange * all subsequent requests sharing the same execution context can re-use - * the last DIGEST nonce value to authenticate with the server. + * the last Digest nonce value to authenticate with the server. */ public class ClientPreemptiveDigestAuthentication {