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

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

public class WRAPAuthScheme
extends AuthorizationHeaderScheme


Field Summary
 
Fields inherited from class com.microsoft.tfs.core.httpclient.auth.AuthorizationHeaderScheme
HOST_CHALLENGE_HEADER, HOST_RESPONSE_HEADER, PROXY_CHALLENGE_HEADER, PROXY_RESPONSE_HEADER
 
Constructor Summary
WRAPAuthScheme()
           
 
Method Summary
protected  java.lang.String authenticate(AuthScope authScope, Credentials credentials, HttpMethod method)
          Provides the Authorization or Proxy-Authorization headers for authentication 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 com.microsoft.tfs.core.httpclient.auth.AuthorizationHeaderScheme
authenticateHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WRAPAuthScheme

public WRAPAuthScheme()
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.

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

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.

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.

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

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.

Returns:
true if the authentication process has been completed, false otherwise.

authenticate

protected java.lang.String authenticate(AuthScope authScope,
                                        Credentials credentials,
                                        HttpMethod method)
                                 throws AuthenticationException
Description copied from class: AuthorizationHeaderScheme
Provides the Authorization or Proxy-Authorization headers for authentication with the given Credentials.

Specified by:
authenticate in class AuthorizationHeaderScheme
credentials - The set of credentials to be used for authentication
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
Overrides:
authenticateProxy in class AuthorizationHeaderScheme
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.