|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.httpclient.auth.AuthorizationHeaderScheme
com.microsoft.tfs.core.httpclient.auth.RFC2617Scheme
com.microsoft.tfs.core.httpclient.auth.DigestScheme
public class DigestScheme
Digest authentication scheme as defined in RFC 2617. Both MD5 (default) and MD5-sess are supported. Currently only qop=auth or no qop is supported. qop=auth-int is unsupported. If auth and auth-int are provided, auth is used.
Credential charset is configured via the
credential charset
parameter. Since the digest username is included as clear
text in the generated Authentication header, the charset of the username must
be compatible with the
http element charset
.
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 | |
---|---|
DigestScheme()
Default constructor for the digest authetication scheme. |
|
DigestScheme(java.lang.String challenge)
Deprecated. Use parameterless constructor and AuthScheme.processChallenge(String) method |
Method Summary | |
---|---|
java.lang.String |
authenticate(AuthScope authscope,
Credentials credentials,
HttpMethod method)
Produces a digest authorization string for the given set of Credentials , method name and URI. |
java.lang.String |
authenticate(Credentials credentials,
java.lang.String method,
java.lang.String uri)
Deprecated. Use #authenticate(Credentials, HttpMethod) |
static java.lang.String |
createCnonce()
Creates a random cnonce value based on the current time. |
java.lang.String |
getID()
Deprecated. no longer used |
java.lang.String |
getSchemeName()
Returns textual designation of the digest authentication scheme. |
boolean |
isComplete()
Tests if the Digest authentication process has been completed. |
boolean |
isConnectionBased()
Returns false. |
void |
processChallenge(java.lang.String challenge)
Processes the Digest challenge. |
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.RFC2617Scheme |
---|
getParameter, getParameters, getRealm |
Methods inherited from class com.microsoft.tfs.core.httpclient.auth.AuthorizationHeaderScheme |
---|
authenticateHost, authenticateProxy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.microsoft.tfs.core.httpclient.auth.AuthScheme |
---|
authenticateHost, authenticateProxy |
Constructor Detail |
---|
public DigestScheme()
@Deprecated public DigestScheme(java.lang.String challenge) throws MalformedChallengeException
AuthScheme.processChallenge(String)
method
challenge
- authentication challenge
MalformedChallengeException
- is thrown if the authentication challenge is malformedMethod Detail |
---|
public boolean supportsCredentials(Credentials credentials)
AuthScheme
@Deprecated public java.lang.String getID()
getID
in class RFC2617Scheme
public void processChallenge(java.lang.String challenge) throws MalformedChallengeException
processChallenge
in interface AuthScheme
processChallenge
in class RFC2617Scheme
challenge
- the challenge string
MalformedChallengeException
- is thrown if the authentication challenge is malformedpublic boolean isComplete()
public java.lang.String getSchemeName()
digest
public boolean isConnectionBased()
@Deprecated public java.lang.String authenticate(Credentials credentials, java.lang.String method, java.lang.String uri) throws AuthenticationException
#authenticate(Credentials, HttpMethod)
Credentials
, method name and URI.
credentials
- A set of credentials to be used for athenticationmethod
- the name of the method that requires authorization.uri
- The URI for which authorization is needed.
HttpMethod.getName()
,
HttpMethod.getPath()
InvalidCredentialsException
- if authentication credentials are not valid or not applicable for
this authentication scheme
AuthenticationException
- if authorization string cannot be generated due to an
authentication failurepublic java.lang.String authenticate(AuthScope authscope, Credentials credentials, HttpMethod method) throws AuthenticationException
Credentials
, method name and URI.
authenticate
in class AuthorizationHeaderScheme
credentials
- A set of credentials to be used for athenticationmethod
- The method being authenticated
InvalidCredentialsException
- if authentication credentials are not valid or not applicable for
this authentication scheme
AuthenticationException
- if authorization string cannot be generated due to an
authentication failurepublic static java.lang.String createCnonce()
HttpClientError
- if MD5 algorithm is not supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |