java.lang.Object
java.net.URLConnection
java.net.HttpURLConnection
org.codelibs.jcifs.smb.http.NtlmHttpURLConnection
Deprecated.
This is broken by design, even a possible vulnerability. Deprecation is conditional on whether future JDK
versions will allow to do this safely.
Wraps an
HttpURLConnection to provide NTLM authentication
services.
Please read Using jCIFS NTLM Authentication for HTTP Connections.
Warning: Do not use this if there is a chance that you might have multiple connections (even plain
HttpURLConnections, for the complete JRE) to the same host with different or mixed anonymous/authenticated
credentials. Authenticated connections can/will be reused.-
Field Summary
Fields inherited from class java.net.HttpURLConnection
chunkLength, fixedContentLength, fixedContentLengthLong, HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, instanceFollowRedirects, method, responseCode, responseMessageFields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches -
Constructor Summary
ConstructorsConstructorDescriptionNtlmHttpURLConnection(HttpURLConnection connection, CIFSContext tc) Deprecated.Creates a new NTLM HTTP URL connection that wraps an existing HTTP connection. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequestProperty(String key, String value) Deprecated.voidconnect()Deprecated.voidDeprecated.booleanDeprecated.intDeprecated.Deprecated.getContent(Class[] classes) Deprecated.Deprecated.intDeprecated.Deprecated.longgetDate()Deprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.Deprecated.longDeprecated.getHeaderField(int index) Deprecated.getHeaderField(String header) Deprecated.longgetHeaderFieldDate(String header, long def) Deprecated.intgetHeaderFieldInt(String header, int def) Deprecated.getHeaderFieldKey(int index) Deprecated.Deprecated.longDeprecated.Deprecated.booleanDeprecated.longDeprecated.Deprecated.Deprecated.intDeprecated.Deprecated.Deprecated.getRequestProperty(String key) Deprecated.intDeprecated.Deprecated.getURL()Deprecated.booleanDeprecated.voidsetAllowUserInteraction(boolean allowUserInteraction) Deprecated.voidsetConnectTimeout(int timeout) Deprecated.voidsetDefaultUseCaches(boolean defaultUseCaches) Deprecated.voidsetDoInput(boolean doInput) Deprecated.voidsetDoOutput(boolean doOutput) Deprecated.voidsetIfModifiedSince(long ifModifiedSince) Deprecated.voidsetInstanceFollowRedirects(boolean instanceFollowRedirects) Deprecated.voidsetReadTimeout(int timeout) Deprecated.voidsetRequestMethod(String requestMethod) Deprecated.voidsetRequestProperty(String key, String value) Deprecated.voidsetUseCaches(boolean useCaches) Deprecated.toString()Deprecated.booleanDeprecated.Methods inherited from class java.net.HttpURLConnection
getFollowRedirects, setAuthenticator, setChunkedStreamingMode, setFixedLengthStreamingMode, setFixedLengthStreamingMode, setFollowRedirectsMethods inherited from class java.net.URLConnection
getContentLengthLong, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getFileNameMap, getHeaderFieldLong, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setFileNameMap
-
Constructor Details
-
NtlmHttpURLConnection
Deprecated.Creates a new NTLM HTTP URL connection that wraps an existing HTTP connection.- Parameters:
connection- connection to wraptc- context to use
-
-
Method Details
-
connect
Deprecated.- Specified by:
connectin classURLConnection- Throws:
IOException
-
getURL
Deprecated.- Overrides:
getURLin classURLConnection
-
getContentLength
public int getContentLength()Deprecated.- Overrides:
getContentLengthin classURLConnection
-
getContentType
Deprecated.- Overrides:
getContentTypein classURLConnection
-
getContentEncoding
Deprecated.- Overrides:
getContentEncodingin classURLConnection
-
getExpiration
public long getExpiration()Deprecated.- Overrides:
getExpirationin classURLConnection
-
getDate
public long getDate()Deprecated.- Overrides:
getDatein classURLConnection
-
getLastModified
public long getLastModified()Deprecated.- Overrides:
getLastModifiedin classURLConnection
-
getHeaderField
Deprecated.- Overrides:
getHeaderFieldin classURLConnection
-
getHeaderFields
Deprecated.- Overrides:
getHeaderFieldsin classURLConnection
-
getHeaderFieldInt
Deprecated.- Overrides:
getHeaderFieldIntin classURLConnection
-
getHeaderFieldDate
Deprecated.- Overrides:
getHeaderFieldDatein classHttpURLConnection
-
getHeaderFieldKey
Deprecated.- Overrides:
getHeaderFieldKeyin classHttpURLConnection
-
getHeaderField
Deprecated.- Overrides:
getHeaderFieldin classHttpURLConnection
-
getContent
Deprecated.- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getContent
Deprecated.- Overrides:
getContentin classURLConnection- Throws:
IOException
-
getPermission
Deprecated.- Overrides:
getPermissionin classHttpURLConnection- Throws:
IOException
-
getInputStream
Deprecated.- Overrides:
getInputStreamin classURLConnection- Throws:
IOException
-
getOutputStream
Deprecated.- Overrides:
getOutputStreamin classURLConnection- Throws:
IOException
-
toString
Deprecated.- Overrides:
toStringin classURLConnection
-
setDoInput
public void setDoInput(boolean doInput) Deprecated.- Overrides:
setDoInputin classURLConnection
-
getDoInput
public boolean getDoInput()Deprecated.- Overrides:
getDoInputin classURLConnection
-
setDoOutput
public void setDoOutput(boolean doOutput) Deprecated.- Overrides:
setDoOutputin classURLConnection
-
getDoOutput
public boolean getDoOutput()Deprecated.- Overrides:
getDoOutputin classURLConnection
-
setAllowUserInteraction
public void setAllowUserInteraction(boolean allowUserInteraction) Deprecated.- Overrides:
setAllowUserInteractionin classURLConnection
-
getAllowUserInteraction
public boolean getAllowUserInteraction()Deprecated.- Overrides:
getAllowUserInteractionin classURLConnection
-
setUseCaches
public void setUseCaches(boolean useCaches) Deprecated.- Overrides:
setUseCachesin classURLConnection
-
getUseCaches
public boolean getUseCaches()Deprecated.- Overrides:
getUseCachesin classURLConnection
-
setIfModifiedSince
public void setIfModifiedSince(long ifModifiedSince) Deprecated.- Overrides:
setIfModifiedSincein classURLConnection
-
getIfModifiedSince
public long getIfModifiedSince()Deprecated.- Overrides:
getIfModifiedSincein classURLConnection
-
getDefaultUseCaches
public boolean getDefaultUseCaches()Deprecated.- Overrides:
getDefaultUseCachesin classURLConnection
-
setDefaultUseCaches
public void setDefaultUseCaches(boolean defaultUseCaches) Deprecated.- Overrides:
setDefaultUseCachesin classURLConnection
-
getConnectTimeout
public int getConnectTimeout()Deprecated.- Overrides:
getConnectTimeoutin classURLConnection
-
setConnectTimeout
public void setConnectTimeout(int timeout) Deprecated.- Overrides:
setConnectTimeoutin classURLConnection
-
getReadTimeout
public int getReadTimeout()Deprecated.- Overrides:
getReadTimeoutin classURLConnection
-
setReadTimeout
public void setReadTimeout(int timeout) Deprecated.- Overrides:
setReadTimeoutin classURLConnection
-
setRequestProperty
Deprecated.- Overrides:
setRequestPropertyin classURLConnection
-
addRequestProperty
Deprecated.- Overrides:
addRequestPropertyin classURLConnection
-
getRequestProperty
Deprecated.- Overrides:
getRequestPropertyin classURLConnection
-
getRequestProperties
Deprecated.- Overrides:
getRequestPropertiesin classURLConnection
-
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean instanceFollowRedirects) Deprecated.- Overrides:
setInstanceFollowRedirectsin classHttpURLConnection
-
getInstanceFollowRedirects
public boolean getInstanceFollowRedirects()Deprecated.- Overrides:
getInstanceFollowRedirectsin classHttpURLConnection
-
setRequestMethod
Deprecated.- Overrides:
setRequestMethodin classHttpURLConnection- Throws:
ProtocolException
-
getRequestMethod
Deprecated.- Overrides:
getRequestMethodin classHttpURLConnection
-
getResponseCode
Deprecated.- Overrides:
getResponseCodein classHttpURLConnection- Throws:
IOException
-
getResponseMessage
Deprecated.- Overrides:
getResponseMessagein classHttpURLConnection- Throws:
IOException
-
disconnect
public void disconnect()Deprecated.- Specified by:
disconnectin classHttpURLConnection
-
usingProxy
public boolean usingProxy()Deprecated.- Specified by:
usingProxyin classHttpURLConnection
-
getErrorStream
Deprecated.- Overrides:
getErrorStreamin classHttpURLConnection
-