| java.lang.Object sun.net.www.protocol.http.AuthenticationInfo sun.net.www.protocol.http.BasicAuthentication
BasicAuthentication | class BasicAuthentication extends AuthenticationInfo (Code) | | BasicAuthentication: Encapsulate an http server authentication using
the "basic" scheme.
version: 1.9, 02/02/00 |
Field Summary | |
final static char | BASIC_AUTH | String | auth The authentication string for this host, port, and realm. |
Constructor Summary | |
public | BasicAuthentication(boolean isProxy, String host, int port, String realm, PasswordAuthentication pw) | public | BasicAuthentication(boolean isProxy, String host, int port, String realm, String auth) | public | BasicAuthentication(boolean isProxy, URL url, String realm, PasswordAuthentication pw) | public | BasicAuthentication(boolean isProxy, URL url, String realm, String auth) |
BASIC_AUTH | final static char BASIC_AUTH(Code) | | |
auth | String auth(Code) | | The authentication string for this host, port, and realm. This is
a simple BASE64 encoding of "login:password".
|
BasicAuthentication | public BasicAuthentication(boolean isProxy, String host, int port, String realm, String auth)(Code) | | Create a BasicAuthentication
|
BasicAuthentication | public BasicAuthentication(boolean isProxy, URL url, String realm, String auth)(Code) | | Create a BasicAuthentication
|
checkResponse | void checkResponse(String header, String method, URL url)(Code) | | For Basic Authentication, there is no security information in the
response
|
getHeaderName | String getHeaderName()(Code) | | the name of the HTTP header this authentication wants set |
getHeaderValue | String getHeaderValue(URL url, String method)(Code) | | the value of the HTTP header this authentication wants set |
getRootPath | static String getRootPath(String npath, String opath)(Code) | | the common root path between npath and path. This is used to detect when we have an authentication for twopaths and the root of th authentication space is the common root. |
isAuthorizationStale | boolean isAuthorizationStale(String header)(Code) | | For Basic Authentication, the security parameters can never be stale.
In other words there is no possibility to reuse the credentials.
They are always either valid or invalid.
|
setHeaders | boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw)(Code) | | Set header(s) on the given connection. This will only be called for
definitive (i.e. non-preemptive) authorization.
Parameters: conn - The connection to apply the header(s) to Parameters: p - A source of header values for this connection, if needed. Parameters: raw - The raw header values for this connection, if needed. true if all goes well, false if no headers were set. |
supportsPreemptiveAuthorization | boolean supportsPreemptiveAuthorization()(Code) | | true if this authentication supports preemptive authorization |
Methods inherited from sun.net.www.protocol.http.AuthenticationInfo | void addToCache()(Code)(Java Doc) String cacheKey(boolean includeRealm)(Code)(Java Doc) abstract void checkResponse(String header, String method, URL url) throws IOException(Code)(Java Doc) public Object clone()(Code)(Java Doc) void endAuthRequest()(Code)(Java Doc) static AuthenticationInfo getAuth(String key, URL url)(Code)(Java Doc) abstract String getHeaderName()(Code)(Java Doc) abstract String getHeaderValue(URL url, String method)(Code)(Java Doc) static AuthenticationInfo getProxyAuth(String host, int port)(Code)(Java Doc) static AuthenticationInfo getProxyAuth(String host, int port, String realm, char atype)(Code)(Java Doc) static AuthenticationInfo getServerAuth(URL url)(Code)(Java Doc) static AuthenticationInfo getServerAuth(URL url, String realm, char atype)(Code)(Java Doc) abstract boolean isAuthorizationStale(String header)(Code)(Java Doc) static void printCache()(Code)(Java Doc) static String reducePath(String urlPath)(Code)(Java Doc) void removeFromCache()(Code)(Java Doc) abstract boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw)(Code)(Java Doc) abstract boolean supportsPreemptiveAuthorization()(Code)(Java Doc)
|
|
|