Modifier and Type | Class and Description |
---|---|
private static class |
ServerInfo.LineParser
Class for parsing multi-part HTTP header lines that may appear as the
values of the WWW-Authenticate, Proxy-Authenticate, Authorization-Info
or Proxy-Authorization-Info header lines.
|
Modifier and Type | Field and Description |
---|---|
(package private) String |
authAlgorithm
authentication algorithm
|
(package private) String |
authNonce
authentication challenge
|
(package private) String |
authOpaque
authentication cookie
|
(package private) String |
authPassword
authentication password
|
(package private) String |
authRealm
authentication realm
|
(package private) String |
authScheme
authentication scheme, if any
|
(package private) String |
authUser
authentication username
|
private static char[] |
hexChars
hexadecimal char conversion table
|
(package private) String |
host
server host name
|
(package private) int |
major
HTTP major version
|
(package private) int |
minor
HTTP minor version
|
(package private) static long |
NO_TIMESTAMP
blank timestamp value
|
(package private) int |
port
server port
|
(package private) long |
timestamp
time of last update
|
Constructor and Description |
---|
ServerInfo(String host,
int port)
Creates new ServerInfo for server at given host/port.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
private String |
computeDigest(String method,
String uri)
Computes digest authentication response for request using the given
method and uri.
|
private String |
encode(MessageDigest md,
String str)
Returns digest of the given string, represented as string of hexadecimal
digits.
|
(package private) String |
getAuthString(String protocol,
String method,
String uri)
Returns (possibly null) authorization string based on current
authentication information in conjunction with the given request
arguments.
|
private PasswordAuthentication |
getPassword(String protocol)
Obtains PasswordAuthentication from the currently installed
Authenticator.
|
(package private) void |
setAuthInfo(String str)
Sets authentication information based on contents of given challenge
string (which should be the value of either the "WWW-Authenticate" or
"Proxy-Authenticate" header fields).
|
(package private) void |
updateAuthInfo(String str)
Updates authentication information based on contents of given string
(which should be the value of either the "Authorization-Info" or
"Proxy-Authorization-Info" header fields).
|
static final long NO_TIMESTAMP
private static final char[] hexChars
final String host
final int port
int major
int minor
String authScheme
String authRealm
String authAlgorithm
String authOpaque
String authNonce
String authUser
String authPassword
long timestamp
ServerInfo(String host, int port)
void setAuthInfo(String str) throws HttpParseException
HttpParseException
void updateAuthInfo(String str) throws HttpParseException
HttpParseException
String getAuthString(String protocol, String method, String uri)
private String computeDigest(String method, String uri) throws NoSuchAlgorithmException
NoSuchAlgorithmException
private String encode(MessageDigest md, String str)
private PasswordAuthentication getPassword(String protocol)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.