|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CredentialsManager
Manages network authentication credentials. Implementations may use to secure
system storage (Mac OS Keychain, Windows Credential Manager) or use a a
non-secure storage mechanism (plain text in the filesystem). Call
isSecure()
to test whether the implementation offers secure storage.
Implementations are not required to support writing (saving) credentials.
Implementations may alter the URI
before it is saved by
setCredentials(CachedCredentials)
and when it is matched by
getCredentials(URI)
. A common alteration is to remove the path and
query parts from the URI so only the scheme, host, and port are saved and
matched. This lets a user authenticate to all resources on one server (TFS
configuration server, TFS project collections, SharePoint sites, etc.) using
a single saved credentials item.
Method Summary | |
---|---|
boolean |
canWrite()
Tests whether this credentials provider is writable. |
CachedCredentials[] |
getCredentials()
Returns all the credentials that are currently configured for any server. |
CachedCredentials |
getCredentials(java.net.URI serverURI)
Provides the credentials for the given URI . |
java.lang.String |
getUIMechanismName()
Gets the localized name of the storage mechanism this provider uses. |
boolean |
isSecure()
Queries whether the credentials are stored in a secure mechanism as determined by the operating system, for example, Apple Keychain, GNOME Keyring, Windows CredMan, Eclipse's credential store, or encrypted using a system mechanism such as Windows DPAPI. |
boolean |
removeCredentials(CachedCredentials cachedCredentials)
Removes the credentials for the given URI. |
boolean |
removeCredentials(java.net.URI uri)
Removes the credentials for the given URI. |
boolean |
setCredentials(CachedCredentials cachedCredentials)
Sets the credentials for the given URI . |
Method Detail |
---|
java.lang.String getUIMechanismName()
null
)boolean canWrite()
true
if the credentials provider is writable,
false
otherwiseboolean isSecure()
true
if these credentials are stored securely,
false
otherwiseCachedCredentials[] getCredentials()
null
)CachedCredentials getCredentials(java.net.URI serverURI)
URI
. The given URI
may be a TFS server, an HTTP proxy or a TFS proxy.
This method may return CachedCredentials
that match only some
parts of the given URI
(instead of all parts).
serverURI
- The URI to connect to (never null
)
null
)boolean setCredentials(CachedCredentials cachedCredentials)
URI
. The given URI
may
be a TFS server, an HTTP proxy or a TFS proxy.
Users should ensure that this credentials provider is writable by calling
the canWrite()
method for calling this one.
See class documentation for CredentialsManager
for information on
how this URI
may be altered before being saved.
cachedCredentials
- The credentials to connect with (never null
)
true
if the credentials were successfully saved,
false
otherwise
java.lang.RuntimeException
- if the credentials store is not writableboolean removeCredentials(CachedCredentials cachedCredentials)
Users should ensure that this credentials provider is writable by calling
the canWrite()
method for calling this one.
cachedCredentials
- The credentials to remove (not null
)
true
if the credentials were successfully removed,
false
otherwise
java.lang.RuntimeException
- if the credentials store is not writableboolean removeCredentials(java.net.URI uri)
Users should ensure that this credentials provider is writable by calling
the canWrite()
method for calling this one.
cachedCredentials
- The credentials to remove (not null
)
true
if the credentials were successfully removed,
false
otherwise
java.lang.RuntimeException
- if the credentials store is not writable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |