com.microsoft.tfs.core.credentials
Class CredentialsManagerFactory
java.lang.Object
com.microsoft.tfs.core.credentials.CredentialsManagerFactory
public class CredentialsManagerFactory
- extends java.lang.Object
Static methods to get a CredentialsManager
with the best storage
mechanism for the running platform.
Core classes must pass the active ConnectionAdvisor
's
PersistenceStoreProvider
when calling
getCredentialsManager(PersistenceStoreProvider)
.
- Thread-safety:
- thread-safe
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CredentialsManagerFactory
public CredentialsManagerFactory()
getCredentialsManager
public static CredentialsManager getCredentialsManager(PersistenceStoreProvider persistenceProvider)
- Gets the best
CredentialsManager
for this platform. If the
platform provides credential management services (Windows CredMan, Mac OS
X Keychain), an implementation that uses that service is returned,
otherwise the given PersistenceStoreProvider
may be used for
storage. Test the returned CredentialsManager
for its
capabilities (whether it is secure, is read-only, etc.).
- Parameters:
persistenceProvider
- a PersistenceStoreProvider
to use if there are no secure
platform storage services available (must not be null
)
- Returns:
- a
CredentialsManager
(never null
)
getCredentialsManager
public static CredentialsManager getCredentialsManager(PersistenceStoreProvider persistenceProvider,
boolean usePersistanceCredentialsManager)
- Gets the best
CredentialsManager
for this platform. If the
platform provides credential management services (Windows CredMan, Mac OS
X Keychain or PersistnaceCredentialsManager), an implementation that uses
that service is returned, otherwise the given
PersistenceStoreProvider
may be used for storage. Test the
returned CredentialsManager
for its capabilities (whether it is
secure, is read-only, etc.).
- Parameters:
persistenceProvider
- a PersistenceStoreProvider
to use if there are no secure
platform storage services available (must not be null
)usePersistanceCredentialsManager
- a boolean if set to true then on Mac OS use
PersistanceCredentialsManager otherwise on Mac OS use keychain
- Returns:
- a
CredentialsManager
(never null
)
© 2015 Microsoft. All rights reserved.