public class BasicAuthenticationHandler extends Object
Constructor and Description |
---|
BasicAuthenticationHandler()
Constructs a new BasicAuthenticationHandler with UTF-8 as the charset.
|
BasicAuthenticationHandler(Charset charset)
Deprecated.
This constructor is deprecated to enforce the use of
StandardCharsets.UTF_8 encoding
in compliance with RFC 7617 for HTTP Basic Authentication. Use the default constructor BasicAuthenticationHandler() instead. |
Modifier and Type | Method and Description |
---|---|
String |
challenge(List<org.apache.hc.core5.http.NameValuePair> params) |
String |
extractAuthToken(String challengeResponse) |
@Deprecated public BasicAuthenticationHandler(Charset charset)
StandardCharsets.UTF_8
encoding
in compliance with RFC 7617 for HTTP Basic Authentication. Use the default constructor BasicAuthenticationHandler()
instead.charset
- the Charset
set to be used for encoding credentials. This parameter is ignored as UTF-8 is always used.public BasicAuthenticationHandler()
public final String challenge(List<org.apache.hc.core5.http.NameValuePair> params)
challenge
in interface AuthenticationHandler<String>
public final String extractAuthToken(String challengeResponse) throws org.apache.hc.core5.http.HttpException
extractAuthToken
in interface AuthenticationHandler<String>
org.apache.hc.core5.http.HttpException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.