org.eclipse.webdav.internal.authentication
Class DigestAuthority
java.lang.Object
org.eclipse.webdav.internal.authentication.AuthorizationAuthority
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 sentresponse
- the response back from the server to be verifiedproxyServerUrl
- 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 serveroldInfo
- the old authentication informationserverUrl
- the URL of the serverprotectionSpaceUrl
- 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 authorizedinfo
- the authentication information used to derive the
authorization credentialsserverUrl
- the URL of the serverprotectionSpaceUrl
- the URL of the protected resourceproxyServerUrl
- 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.