| Modifier and Type | Field and Description |
|---|---|
| pack-priv final String | auth
The authentication string for this host, port, and realm. |
| Access | Constructor and Description |
|---|---|
| public | BasicAuthentication(boolean isProxy, String host, int port, String realm, PasswordAuthentication pw, boolean isUTF8)
Create a BasicAuthentication |
| public | BasicAuthentication(boolean isProxy, String host, int port, String realm, String auth)
Create a BasicAuthentication |
| public | BasicAuthentication(boolean isProxy, URL url, String realm, PasswordAuthentication pw, boolean isUTF8)
Create a BasicAuthentication |
| public | BasicAuthentication(boolean isProxy, URL url, String realm, String auth)
Create a BasicAuthentication |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public String | Returns: the value of the HTTP header this authentication wants setImplements abstract sun. Calculates and returns the authentication header value based on the stored authentication parameters. |
| pack-priv static String | |
| public boolean | isAuthorizationStale(String header)
Implements abstract sun. For Basic Authentication, the security parameters can never be stale. |
| public void | setHeaders(HttpURLConnection
The connection to apply the header(s) to conn, HeaderParser A source of header values for this connection, if needed. p, String The raw header values for this connection, if needed. raw)Implements abstract sun. Set header(s) on the given connection. |
| public boolean | supportsPreemptiveAuthorization()
Implements abstract sun. Returns: true if this authentication supports preemptive authorization |
| auth | back to summary |
|---|---|
| pack-priv final String auth The authentication string for this host, port, and realm. This is a simple BASE64 encoding of "login:password". | |
| BasicAuthentication | back to summary |
|---|---|
| public BasicAuthentication(boolean isProxy, String host, int port, String realm, PasswordAuthentication pw, boolean isUTF8) Create a BasicAuthentication | |
| BasicAuthentication | back to summary |
|---|---|
| public BasicAuthentication(boolean isProxy, String host, int port, String realm, String auth) Create a BasicAuthentication | |
| BasicAuthentication | back to summary |
|---|---|
| public BasicAuthentication(boolean isProxy, URL url, String realm, PasswordAuthentication pw, boolean isUTF8) Create a BasicAuthentication | |
| BasicAuthentication | back to summary |
|---|---|
| public BasicAuthentication(boolean isProxy, URL url, String realm, String auth) Create a BasicAuthentication | |
| authValueFrom | back to summary |
|---|---|
| private static String authValueFrom(PasswordAuthentication pw, boolean isUTF8) | |
| getHeaderValue | back to summary |
|---|---|
| public String getHeaderValue(URL url, String method) Implements abstract sun. Doc from sun. Calculates and returns the authentication header value based on the stored authentication parameters. If the calculation does not depend on the URL or the request method then these parameters are ignored. | |
| getRootPath | back to summary |
|---|---|
pack-priv static String getRootPath(String npath, String opath)
| |
| isAuthorizationStale | back to summary |
|---|---|
| public boolean isAuthorizationStale(String header) Implements abstract sun. 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 | back to summary |
|---|---|
| public void setHeaders(HttpURLConnection conn, HeaderParser p, String raw) Implements abstract sun. Set header(s) on the given connection. This will only be called for definitive (i.e. non-preemptive) authorization.
| |
| supportsPreemptiveAuthorization | back to summary |
|---|---|
| public boolean supportsPreemptiveAuthorization() Implements abstract sun.
| |