org.eclipse.webdav.internal.authentication
Class DigestAuthority

java.lang.Object
  extended by org.eclipse.webdav.internal.authentication.AuthorizationAuthority
      extended by org.eclipse.webdav.internal.authentication.DigestAuthority

public class DigestAuthority
extends AuthorizationAuthority

The DigestAuthority provides the necessary behavior to authorizes client Requests for communication with HTTP servers using the Digest authentication scheme.

See Also:
AuthorizationAuthority

Field Summary
 
Fields inherited from class org.eclipse.webdav.internal.authentication.AuthorizationAuthority
authenticationSchemes, authenticatorStore
 
Constructor Summary
DigestAuthority(IAuthenticator authenticatorStore)
          Creates a new authenticator that stores its authentication information in the given authentication store.
 
Method Summary
protected  boolean confirmResponse(Request request, IResponse response, URL proxyServerUrl)
          Confirms whether the given response is valid by proving the server knows the client's authentication secret (password).
protected  Map getAuthenticationInfo(AuthenticateChallenge challenge, Map oldInfo, URL serverUrl, URL protectionSpaceUrl)
          Returns the new authentication information gleaned from the given authenticate challenge and the given old authentication information.
protected  String getAuthorization(Request request, Map info, URL serverUrl, URL protectionSpaceUrl, URL proxyServerUrl)
          Returns the authorization credentials for the given request.
 
Methods inherited from class org.eclipse.webdav.internal.authentication.AuthorizationAuthority
authorize, confirm, md5, md5, unquote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DigestAuthority

public DigestAuthority(IAuthenticator authenticatorStore)
Creates a new authenticator that stores its authentication information in the given authentication store.

The DigestAuthenticator authenticates according to the "Digest" authentication scheme.

Instances of this class must not be created directly, instead, use an instance of the class Authenticator to authorize requests.

Parameters:
authenticatorStore - a store that holds authentication information
Method Detail

confirmResponse

protected boolean confirmResponse(Request request,
                                  IResponse response,
                                  URL proxyServerUrl)
Description copied from class: AuthorizationAuthority
Confirms whether the given response is valid by proving the server knows the client's authentication secret (password). Moreover, the server may wish to communicate some authentication information in the response for the purposes of authorizing future request.

This method should be overridden by schema specific authenticators.

Overrides:
confirmResponse in class AuthorizationAuthority
Parameters:
request - the request that has already been sent
response - the response back from the server to be verified
proxyServerUrl - the URL of the proxy server, or null if there is none
See Also:
Authenticator#confirmResponse(Request, Response, URL)

getAuthenticationInfo

protected Map getAuthenticationInfo(AuthenticateChallenge challenge,
                                    Map oldInfo,
                                    URL serverUrl,
                                    URL protectionSpaceUrl)
Description copied from class: AuthorizationAuthority
Returns the new authentication information gleaned from the given authenticate challenge and the given old authentication information. The old authentication information may be null. The authentication information usually contains directives such as usernames and passwords.

This method should be overridden by schema specific authenticators.

Overrides:
getAuthenticationInfo in class AuthorizationAuthority
Parameters:
challenge - the authenticate challenge from the server
oldInfo - the old authentication information
serverUrl - the URL of the server
protectionSpaceUrl - the URL of the protected resource
Returns:
new authentication information
See Also:
Authenticator#getAuthenticationInfo(AuthenticateChallenge, Map, URL, URL)

getAuthorization

protected String getAuthorization(Request request,
                                  Map info,
                                  URL serverUrl,
                                  URL protectionSpaceUrl,
                                  URL proxyServerUrl)
Description copied from class: AuthorizationAuthority
Returns the authorization credentials for the given request. The authorization credentials are derived from the given authentication info. The authentication info may contain directives such as usernames and passwords.

This method should be overridden by schema specific authenticators.

Overrides:
getAuthorization in class AuthorizationAuthority
Parameters:
request - the request being authorized
info - the authentication information used to derive the authorization credentials
serverUrl - the URL of the server
protectionSpaceUrl - the URL of the protected resource
proxyServerUrl - the URL of the proxy server, or null if there is none
Returns:
the authorization credentials for the given request
See Also:
Authenticator#getAuthorization(Request, Map, URL, URL, URL)


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.