public class HttpBasicAuthentication extends Object implements HttpAuthentication, Configurable
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
HttpBasicAuthentication(String challenge,
Configuration conf)
Construct an HttpBasicAuthentication for the given challenge parameters.
|
Modifier and Type | Method and Description |
---|---|
static HttpBasicAuthentication |
getAuthentication(String challenge,
Configuration conf)
This method is responsible for providing Basic authentication information.
|
static Pattern |
getBasicPattern()
Provides a pattern which can be used by an outside resource to determine if
this class can provide credentials based on simple header information.
|
Configuration |
getConf() |
List<String> |
getCredentials()
Gets the Basic credentials generated by this HttpBasicAuthentication object
|
String |
getRealm()
Gets the realm attribute of the HttpBasicAuthentication object.
|
void |
setConf(Configuration conf) |
protected HttpBasicAuthentication(String challenge, Configuration conf) throws HttpAuthenticationException
WWW-Authenticate: Basic realm="myrealm"
challenge
- WWW-Authenticate header from web serverHttpAuthenticationException
public void setConf(Configuration conf)
setConf
in interface Configurable
public Configuration getConf()
getConf
in interface Configurable
public List<String> getCredentials()
getCredentials
in interface HttpAuthentication
Authorization: Basic <Base64 encoded userid:password>
public String getRealm()
getAuthentication(String, Configuration)
static methodgetRealm
in interface HttpAuthentication
public static HttpBasicAuthentication getAuthentication(String challenge, Configuration conf)
challenge
- The challenge string provided by the webserver. This is the text
which follows the WWW-Authenticate header, including the Basic
tag.public static final Pattern getBasicPattern()
Copyright © 2015 The Apache Software Foundation