org.eclipse.webdav.internal.authentication
Class BasicAuthority

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

public class BasicAuthority
extends AuthorizationAuthority

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

See Also:
AuthorizationAuthority

Field Summary
 
Fields inherited from class org.eclipse.webdav.internal.authentication.AuthorizationAuthority
authenticationSchemes, authenticatorStore
 
Constructor Summary
BasicAuthority(IAuthenticator authenticationStore)
          Creates a new authenticator that stores its authentication information in the given authentication store.
 
Method Summary
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, confirmResponse, md5, md5, unquote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthority

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

The BasicAuthenticator authenticates according to the "Basic" authentication scheme.

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

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

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.