public static final class CustomAuthenticator.CredentialsSpec extends Object implements Destroyable
Authenticator
.Constructor and Description |
---|
CredentialsSpec() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
boolean |
equals(Object obj) |
protected void |
finalize() |
int |
hashCode() |
boolean |
isDestroyed() |
void |
setDeny(boolean value)
If set to
true , then setUserName(String) and setPassword(char[]) are
ignored, and authentication is denied for this spec. |
void |
setPassword(char[] password)
The password to use iff this
<credentials> element matches. |
void |
setRequestingHost(Pattern regex)
The pattern to match against the hostname of the site or proxy.
|
void |
setRequestingPort(Pattern regex)
The pattern to match against "the port number for the requested connection".
|
void |
setRequestingPrompt(Pattern regex)
The pattern to match against "the prompt string given by the requestor (the "realm" for HTTP authentication)".
|
void |
setRequestingProtocol(Pattern regex)
The pattern to match against "the protocol that's requesting the connection".
|
void |
setRequestingScheme(Pattern regex)
The pattern to match against "the scheme of the requestor".
|
void |
setRequestingSite(Pattern regex)
The pattern to match against the
InetAddress of the site. |
void |
setRequestingUrl(Pattern regex)
The pattern to match against "the URL that resulted in this request for authentication".
|
void |
setRequestorType(Pattern regex)
Whether the requestor is a Proxy or a Server.
|
void |
setUserName(String userName)
The user name to use iff this
<credentials> element matches. |
public void destroy()
destroy
in interface Destroyable
public boolean isDestroyed()
isDestroyed
in interface Destroyable
public void setRequestingHost(@Nullable Pattern regex)
null
(the default) means "any host".public void setRequestingSite(@Nullable Pattern regex)
InetAddress
of the site. null
(the default) means "any
site".public void setRequestingPort(@Nullable Pattern regex)
null
(the default)
means "any port".public void setRequestingProtocol(@Nullable Pattern regex)
null
(the default)
means "any protocol".public void setRequestingPrompt(@Nullable Pattern regex)
null
(the default) means
"any prompt string".public void setRequestingScheme(@Nullable Pattern regex)
null
(the default) means "any scheme".public void setRequestingUrl(@Nullable Pattern regex)
null
(the
default) means "any URL".public void setRequestorType(@Nullable Pattern regex)
PROXY
SERVER
null
(the default) means "any requestor type".
public void setDeny(boolean value)
true
, then setUserName(String)
and setPassword(char[])
are
ignored, and authentication is denied for this spec. The default is "false".public void setUserName(@Nullable String userName)
<credentials>
element matches.public void setPassword(@Nullable char[] password)
<credentials>
element matches.Copyright © 2018 Arno Unkrig. All rights reserved.