APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.net.http

pack-priv Class AuthenticationFilter

extends Object
implements HeaderFilter
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.HeaderFilter
Imports
java.io.IOException, java.net.MalformedURLException, .PasswordAuthentication, .URI, .InetSocketAddress, .URISyntaxException, .URL, java.util.Base64, .LinkedList, .List, .Objects, .WeakHashMap, java.net.http.HttpHeaders, jdk.internal.net.http.common.Log, .Utils

Implementation of Http Basic authentication.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final String
pack-priv static final WeakHashMap<HttpClientImpl, AuthenticationFilter.Cache>
pack-priv static final int
private static final Base64.Encoder
pack-priv volatile MultiExchange<?>
pack-priv static final int
pack-priv static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
addBasicCredentials(HttpRequestImpl r, boolean proxy, PasswordAuthentication pw, boolean isUTF8)

pack-priv static synchronized AuthenticationFilter.Cache
getCache(MultiExchange<?> exchange)

private PasswordAuthentication
getCredentials(String header, boolean proxy, HttpRequestImpl req)

private URI
pack-priv static URI
normalize(URI uri, boolean isPrimaryKey)

public void
public HttpRequestImpl
response(Response r)

Implements jdk.internal.net.http.HeaderFilter.response.

Returns null if response ok to be given to user.

private URL
toURL(URI uri, String method, boolean proxy)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BASIC_DUMMYback to summary
private static final String BASIC_DUMMY
cachesback to summary
pack-priv static final WeakHashMap<HttpClientImpl, AuthenticationFilter.Cache> caches
DEFAULT_RETRY_LIMITback to summary
pack-priv static final int DEFAULT_RETRY_LIMIT
encoderback to summary
private static final Base64.Encoder encoder
exchangeback to summary
pack-priv volatile MultiExchange<?> exchange
PROXY_UNAUTHORIZEDback to summary
pack-priv static final int PROXY_UNAUTHORIZED
retry_limitback to summary
pack-priv static final int retry_limit
UNAUTHORIZEDback to summary
pack-priv static final int UNAUTHORIZED

Constructor Detail

AuthenticationFilterback to summary
public AuthenticationFilter()

Method Detail

addBasicCredentialsback to summary
private static void addBasicCredentials(HttpRequestImpl r, boolean proxy, PasswordAuthentication pw, boolean isUTF8)
getCacheback to summary
pack-priv static synchronized AuthenticationFilter.Cache getCache(MultiExchange<?> exchange)
getCredentialsback to summary
private PasswordAuthentication getCredentials(String header, boolean proxy, HttpRequestImpl req) throws IOException
getProxyURIback to summary
private URI getProxyURI(HttpRequestImpl r)
normalizeback to summary
pack-priv static URI normalize(URI uri, boolean isPrimaryKey)
requestback to summary
public void request(HttpRequestImpl r, MultiExchange<?> e) throws IOException

Implements jdk.internal.net.http.HeaderFilter.request.

Annotations
@Override
responseback to summary
public HttpRequestImpl response(Response r) throws IOException

Implements jdk.internal.net.http.HeaderFilter.response.

Doc from jdk.internal.net.http.HeaderFilter.response.

Returns null if response ok to be given to user. Non null is a request that must be resent and its response given to user. If impl throws an exception that is returned to user instead.

Annotations
@Override
toURLback to summary
private URL toURL(URI uri, String method, boolean proxy) throws MalformedURLException
jdk.internal.net.http back to summary

pack-priv Class AuthenticationFilter.AuthInfo

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv AuthenticationFilter.CacheEntry
pack-priv PasswordAuthentication
pack-priv final boolean
pack-priv final boolean
pack-priv int
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv
AuthInfo(boolean fromcache, String scheme, PasswordAuthentication credentials, boolean isUTF8)

pack-priv
AuthInfo(boolean fromcache, String scheme, PasswordAuthentication credentials, AuthenticationFilter.CacheEntry ca, boolean isUTF8)

Method Summary

Modifier and TypeMethod and Description
pack-priv AuthenticationFilter.AuthInfo
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheEntryback to summary
pack-priv AuthenticationFilter.CacheEntry cacheEntry
credentialsback to summary
pack-priv PasswordAuthentication credentials
fromcacheback to summary
pack-priv final boolean fromcache
isUTF8back to summary
pack-priv final boolean isUTF8
retriesback to summary
pack-priv int retries
schemeback to summary
pack-priv final String scheme

Constructor Detail

AuthInfoback to summary
pack-priv AuthInfo(boolean fromcache, String scheme, PasswordAuthentication credentials, boolean isUTF8)
AuthInfoback to summary
pack-priv AuthInfo(boolean fromcache, String scheme, PasswordAuthentication credentials, AuthenticationFilter.CacheEntry ca, boolean isUTF8)

Method Detail

retryWithCredentialsback to summary
pack-priv AuthenticationFilter.AuthInfo retryWithCredentials(PasswordAuthentication pw, boolean isUTF8)
jdk.internal.net.http back to summary

pack-priv final Class AuthenticationFilter.Cache

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final LinkedList<AuthenticationFilter.CacheEntry>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static boolean
pack-priv synchronized AuthenticationFilter.CacheEntry
get(URI uri, boolean proxy)

pack-priv synchronized void
remove(String authscheme, URI domain, boolean proxy)

pack-priv synchronized void
pack-priv synchronized void
store(String authscheme, URI domain, boolean proxy, PasswordAuthentication value, boolean isUTF8)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entriesback to summary
pack-priv final LinkedList<AuthenticationFilter.CacheEntry> entries

Constructor Detail

Cacheback to summary
pack-priv Cache()

Method Detail

equalsIgnoreCaseback to summary
private static boolean equalsIgnoreCase(String s1, String s2)
getback to summary
pack-priv synchronized AuthenticationFilter.CacheEntry get(URI uri, boolean proxy)
removeback to summary
pack-priv synchronized void remove(String authscheme, URI domain, boolean proxy)
removeback to summary
pack-priv synchronized void remove(AuthenticationFilter.CacheEntry entry)
storeback to summary
pack-priv synchronized void store(String authscheme, URI domain, boolean proxy, PasswordAuthentication value, boolean isUTF8)
jdk.internal.net.http back to summary

pack-priv final Class AuthenticationFilter.CacheEntry

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
pack-priv final boolean
pack-priv final String
pack-priv final String
pack-priv final PasswordAuthentication

Constructor Summary

AccessConstructor and Description
pack-priv
CacheEntry(String authscheme, URI uri, boolean proxy, PasswordAuthentication value, boolean isUTF8)

Method Summary

Modifier and TypeMethod and Description
public boolean
equalsKey(URI uri, boolean proxy)

public PasswordAuthentication
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isUTF8back to summary
pack-priv final boolean isUTF8
proxyback to summary
pack-priv final boolean proxy
rootback to summary
pack-priv final String root
schemeback to summary
pack-priv final String scheme
valueback to summary
pack-priv final PasswordAuthentication value

Constructor Detail

CacheEntryback to summary
pack-priv CacheEntry(String authscheme, URI uri, boolean proxy, PasswordAuthentication value, boolean isUTF8)

Method Detail

equalsKeyback to summary
public boolean equalsKey(URI uri, boolean proxy)
valueback to summary
public PasswordAuthentication value()