com.microsoft.tfs.core.util
Class CredentialsUtils

java.lang.Object
  extended by com.microsoft.tfs.core.util.CredentialsUtils

public class CredentialsUtils
extends java.lang.Object

Utility methods for dealing with Credentials used for authenticating to Team Foundation Servers.

Thread-safety:
unknown

Method Summary
static boolean needsPassword(Credentials credentials)
          Determines whether a set of credentials needs a password: this will be true for credential types which contain a password where the password is unset (null).
static boolean supportsDefaultCredentials()
           Determines whether the current environment supports DefaultNTCredentials (ie, "single signon" using NTLM and/or Kerberos authentication mechanisms.) This does not imply that the credentials will be accepted by the server, just that we have credentials that may be attempted.
static boolean supportsSpecifiedCredentials()
           Determines whether the current environments supports NTCredentials (username/password/domain based credentials.) This does not imply that any given credentials will be accepted by the server, just that we have the means to communicate them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

needsPassword

public static boolean needsPassword(Credentials credentials)
Determines whether a set of credentials needs a password: this will be true for credential types which contain a password where the password is unset (null).

Parameters:
credentials - the credentials to check
Returns:
true if the given Credentials requires a password, false otherwise

supportsDefaultCredentials

public static boolean supportsDefaultCredentials()

Determines whether the current environment supports DefaultNTCredentials (ie, "single signon" using NTLM and/or Kerberos authentication mechanisms.) This does not imply that the credentials will be accepted by the server, just that we have credentials that may be attempted.

The exact nature of whether this is supported is dependent on the operating system and system libraries. Generally speaking, this will always be true on Windows and will be true on Unix platforms if kerberos libraries are installed AND there is a default principal.

Returns:
true if default credentials are supported, false otherwise

supportsSpecifiedCredentials

public static boolean supportsSpecifiedCredentials()

Determines whether the current environments supports NTCredentials (username/password/domain based credentials.) This does not imply that any given credentials will be accepted by the server, just that we have the means to communicate them. Further, it does not imply what these credentials should be.

This is always expected to be true.

Returns:
true if specified credentials are supported, false otherwise


© 2015 Microsoft. All rights reserved.