public class HttpBasicAuthentication extends Object implements HttpAuthentication, org.apache.hadoop.conf.Configurable
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
HttpBasicAuthentication(String challenge,
org.apache.hadoop.conf.Configuration conf)
Construct an HttpBasicAuthentication for the given challenge
parameters.
|
Modifier and Type | Method and Description |
---|---|
static HttpBasicAuthentication |
getAuthentication(String challenge,
org.apache.hadoop.conf.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.
|
org.apache.hadoop.conf.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(org.apache.hadoop.conf.Configuration conf) |
protected HttpBasicAuthentication(String challenge, org.apache.hadoop.conf.Configuration conf) throws HttpAuthenticationException
WWW-Authenticate: Basic realm="myrealm"
challenge
- WWW-Authenticate header from web serverHttpAuthenticationException
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.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, org.apache.hadoop.conf.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 © 2014 The Apache Software Foundation