org.apache.cactus.client.authentication
class AbstractAuthentication
java.lang.Object
|
+--org.apache.cactus.client.authentication.AbstractAuthentication
- Direct Known Subclasses:
- BasicAuthentication
- Known Advisors:
- LogAspect
- public abstract class AbstractAuthentication
- extends java.lang.Object
This class was designed with the simple assumption that ALL authentication
implementations will have a String Name
and a String
Password
. Two abstract functions validateName
and
validatePassword
provide for concrete implementations to
perform character validation. All the work is then done in the
configure
abstract function. In the
BasicAuthentication
class, for example, the configuring is done
by adding the request property "Authorization" with a value
"Basic <base64encode of 'userid:password'>".
- Since:
- 1.3
- Version:
- $Id: AbstractAuthentication.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
- Author:
- Vincent Massol
, Jason Robertson
Method Summary |
abstract void |
configure(HttpURLConnection theConnection)
Modify the HttpURLConnection passed as parameter so
that it will carry authentication information. |
String |
getName()
|
void |
setName(String theName)
Sets the user name.
Affected by: LogAspect |
void |
setPassword(String thePassword)
Sets the user password of the Credential.
Affected by: LogAspect |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAuthentication
public AbstractAuthentication(String theName,
String thePassword)
- Parameters:
theName
- user name of the Credential
thePassword
- user password of the Credential
configure
public abstract void configure(HttpURLConnection theConnection)
- Modify the
HttpURLConnection
passed as parameter so
that it will carry authentication information.
- Parameters:
theConnection
- the HTTP connection to the server URL
getName
public String getName()
- Returns:
- the user name of the Credential
setName
public void setName(String theName)
- Sets the user name.
- Parameters:
theName
- user name of the Credential
Affected by: around() in LogAspect
.
setPassword
public void setPassword(String thePassword)
- Sets the user password of the Credential.
- Parameters:
thePassword
- the user password of the Credential
Affected by: around() in LogAspect
.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.