|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAuthenticator
Implementations of this interface are used by clients to store and retrieve information for authentication purposes.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Method Summary | |
---|---|
void |
addAuthenticationInfo(URL serverUrl,
String realm,
String scheme,
Map info)
Adds the given authentication information to the store. |
void |
addProtectionSpace(URL resourceUrl,
String realm)
Adds the specified resource to the protection space specified by the given realm. |
Map |
getAuthenticationInfo(URL serverUrl,
String realm,
String scheme)
Returns the authentication information for the specified protection space and given authentication scheme. |
String |
getProtectionSpace(URL resourceUrl)
Returns the protection space (realm) for the specified resource, or null if the realm is unknown. |
Map |
requestAuthenticationInfo(URL resourceUrl,
String realm,
String scheme)
Returns the authentication information for the specified protection space and given authentication scheme. |
Method Detail |
---|
void addAuthenticationInfo(URL serverUrl, String realm, String scheme, Map info)
Map
of String
to String
and typically
contain information such as usernames and passwords.
serverUrl
- the URL identifying the server for this authentication
information. For example, "http://www.hostname.com/".realm
- the subsection of the given server to which this
authentication information applies. For example,
"realm1@hostname.com" or "" for no realm.scheme
- the scheme for which this authentication information
applies. For example, "Basic" or "" for no authentication schemeinfo
- a Map
containing authentication information
such as usernames and passwordsvoid addProtectionSpace(URL resourceUrl, String realm)
resourceUrl
- the URL identifying the resources to be added to
the specified protection space. For example,
"http://www.hostname.com/folder/".realm
- the name of the protection space. For example,
"realm1@hostname.com"Map getAuthenticationInfo(URL serverUrl, String realm, String scheme)
null
if no
such information exists.
This method is similar to requestAuthenticationInfo
except the user is not prompted for the result. Instead, the store is
queried for the information (such as username and password).
serverUrl
- the URL identifying the server for the authentication
information. For example, "http://www.hostname.com/".realm
- the subsection of the given server to which the
authentication information applies. For example,
"realm1@hostname.com" or "" for no realm.scheme
- the scheme for which the authentication information
applies. For example, "Basic" or "" for no authentication scheme
null
if no
such information existsrequestAuthenticationInfo(URL, String, String)
String getProtectionSpace(URL resourceUrl)
null
if the realm is unknown.
resourceUrl
- the URL of the resource whose protection space is
returned. For example, "http://www.hostname.com/folder/".
null
if the realm is unknownMap requestAuthenticationInfo(URL resourceUrl, String realm, String scheme)
null
if no
such information exists.
This method is similar to getAuthenticationInfo
except
the store is usually not queried for the result. Instead, the user is
prompted for the information (such as username and password).
resourceUrl
- the URL identifying the server for the authentication
information. For example, "http://www.hostname.com/".realm
- the subsection of the given server to which the
authentication information applies. For example,
"realm1@hostname.com" or "" for no realm.scheme
- the scheme for which the authentication information
applies. For example, "Basic" or "" for no authentication scheme
null
if no
such information existsgetAuthenticationInfo(URL, String, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |