com.microsoft.tfs.core.httpclient.auth
Class AuthState

java.lang.Object
  extended by com.microsoft.tfs.core.httpclient.auth.AuthState

public class AuthState
extends java.lang.Object

This class provides detailed information about the state of the authentication process.

Since:
3.0

Field Summary
static java.lang.Class[] preemptiveAuthSchemes
           
 
Constructor Summary
AuthState()
          Default constructor.
 
Method Summary
 AuthScheme getAuthScheme()
          Returns the authentication scheme.
 void invalidate()
          Invalidates the authentication state by resetting its parameters.
 boolean isAuthAttempted()
          Tests whether authentication challenge has been responded to
 boolean isAuthRequested()
          Tests whether authentication challenge has been received
 boolean isPreemptive()
          Tests if preemptive authentication is used.
 void setAuthAttempted(boolean challengeResponded)
          Sets authentication attempt status
 void setAuthRequested(boolean challengeReceived)
          Sets authentication request status
 void setAuthScheme(AuthScheme authScheme)
          Assigns the given authentication scheme.
 void setPreemptive(Credentials credentials)
          Preemptively assigns a suitable authentication scheme.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

preemptiveAuthSchemes

public static final java.lang.Class[] preemptiveAuthSchemes
Constructor Detail

AuthState

public AuthState()
Default constructor.

Method Detail

invalidate

public void invalidate()
Invalidates the authentication state by resetting its parameters.


isAuthRequested

public boolean isAuthRequested()
Tests whether authentication challenge has been received

Returns:
true if authentication challenge has been received, false otherwise

setAuthRequested

public void setAuthRequested(boolean challengeReceived)
Sets authentication request status

Parameters:
challengeReceived - true if authentication has been requested, false otherwise

isAuthAttempted

public boolean isAuthAttempted()
Tests whether authentication challenge has been responded to

Returns:
true if authentication challenge has been responded to, false otherwise

setAuthAttempted

public void setAuthAttempted(boolean challengeResponded)
Sets authentication attempt status

Parameters:
challengeResponded - true if authentication has been attempted, false otherwise

setPreemptive

public void setPreemptive(Credentials credentials)
Preemptively assigns a suitable authentication scheme.


isPreemptive

public boolean isPreemptive()
Tests if preemptive authentication is used.

Returns:
true if using the default Basic authentication scheme, false otherwise.

setAuthScheme

public void setAuthScheme(AuthScheme authScheme)
Assigns the given authentication scheme.

Parameters:
authScheme - the authentication scheme

getAuthScheme

public AuthScheme getAuthScheme()
Returns the authentication scheme.

Returns:
authentication scheme

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© 2015 Microsoft. All rights reserved.