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

java.lang.Object
  extended by com.microsoft.tfs.core.httpclient.auth.CookieAuthScheme
All Implemented Interfaces:
AuthScheme

public class CookieAuthScheme
extends java.lang.Object
implements AuthScheme


Constructor Summary
CookieAuthScheme()
           
 
Method Summary
 void authenticateHost(AuthScope authscope, Credentials credentials, HttpState state, HttpMethod method)
          Configures the given HttpMethod for authentication to the host with the given Credentials.
 void authenticateProxy(AuthScope authScope, Credentials credentials, HttpState state, HttpMethod method)
          Configures the given HttpMethod for authentication to the proxy with the given Credentials.
 java.lang.String getParameter(java.lang.String name)
          Returns authentication parameter with the given name, if available.
 java.lang.String getSchemeName()
          Returns textual designation of the given authentication scheme.
 boolean isComplete()
          Authentication process may involve a series of challenge-response exchanges.
 boolean isConnectionBased()
          Tests if the authentication scheme is provides authorization on a per connection basis instead of usual per request basis
 void processChallenge(java.lang.String challenge)
          Processes the given challenge token.
 boolean supportsCredentials(Credentials credentials)
          Determines whether this auth scheme supports credentials of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieAuthScheme

public CookieAuthScheme()
Method Detail

supportsCredentials

public boolean supportsCredentials(Credentials credentials)
Description copied from interface: AuthScheme
Determines whether this auth scheme supports credentials of the given type. For example, NegotiateScheme only supports DefaultNTCredentials.

Specified by:
supportsCredentials in interface AuthScheme
Returns:
true if these credentials are supported, false otherwise

processChallenge

public void processChallenge(java.lang.String challenge)
                      throws MalformedChallengeException
Description copied from interface: AuthScheme
Processes the given challenge token. Some authentication schemes may involve multiple challenge-response exchanges. Such schemes must be able to maintain the state information when dealing with sequential challenges

Specified by:
processChallenge in interface AuthScheme
Parameters:
challenge - the challenge string
Throws:
MalformedChallengeException

getSchemeName

public java.lang.String getSchemeName()
Description copied from interface: AuthScheme
Returns textual designation of the given authentication scheme.

Specified by:
getSchemeName in interface AuthScheme
Returns:
the name of the given authentication scheme

getParameter

public java.lang.String getParameter(java.lang.String name)
Description copied from interface: AuthScheme
Returns authentication parameter with the given name, if available.

Specified by:
getParameter in interface AuthScheme
Parameters:
name - The name of the parameter to be returned
Returns:
the parameter with the given name

isConnectionBased

public boolean isConnectionBased()
Description copied from interface: AuthScheme
Tests if the authentication scheme is provides authorization on a per connection basis instead of usual per request basis

Specified by:
isConnectionBased in interface AuthScheme
Returns:
true if the scheme is connection based, false if the scheme is request based.

isComplete

public boolean isComplete()
Description copied from interface: AuthScheme
Authentication process may involve a series of challenge-response exchanges. This method tests if the authorization process has been completed, either successfully or unsuccessfully, that is, all the required authorization challenges have been processed in their entirety.

Specified by:
isComplete in interface AuthScheme
Returns:
true if the authentication process has been completed, false otherwise.

authenticateHost

public void authenticateHost(AuthScope authscope,
                             Credentials credentials,
                             HttpState state,
                             HttpMethod method)
                      throws AuthenticationException
Description copied from interface: AuthScheme
Configures the given HttpMethod for authentication to the host with the given Credentials.

Specified by:
authenticateHost in interface AuthScheme
Parameters:
authscope - The authentication scope
credentials - The set of credentials to be used for athentication
method - The method being authenticated
Throws:
AuthenticationException - if authorization string cannot be generated due to an authentication failure

authenticateProxy

public void authenticateProxy(AuthScope authScope,
                              Credentials credentials,
                              HttpState state,
                              HttpMethod method)
                       throws AuthenticationException
Description copied from interface: AuthScheme
Configures the given HttpMethod for authentication to the proxy with the given Credentials.

Specified by:
authenticateProxy in interface AuthScheme
credentials - The set of credentials to be used for athentication
method - The method being authenticated
Throws:
AuthenticationException - if authorization string cannot be generated due to an authentication failure


© 2015 Microsoft. All rights reserved.