org.apache.cactus.client.authentication
Class AbstractAuthentication
java.lang.Object
org.apache.cactus.client.authentication.AbstractAuthentication
- All Implemented Interfaces:
- Authentication
- Direct Known Subclasses:
- BasicAuthentication, FormAuthentication
- public abstract class AbstractAuthentication
- extends java.lang.Object
- implements Authentication
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 238991 2004-05-22 11:34:50Z vmassol $
Method Summary |
java.lang.String |
getName()
|
java.lang.String |
getPassword()
|
void |
setName(java.lang.String theName)
Sets the user name. |
void |
setPassword(java.lang.String thePassword)
Sets the user password of the Credential. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAuthentication
public AbstractAuthentication(java.lang.String theName,
java.lang.String thePassword)
- Parameters:
theName
- user name of the CredentialthePassword
- user password of the Credential
setName
public final void setName(java.lang.String theName)
- Sets the user name.
- Parameters:
theName
- user name of the Credential
getName
public final java.lang.String getName()
- Returns:
- the user name of the Credential
setPassword
public final void setPassword(java.lang.String thePassword)
- Sets the user password of the Credential.
- Parameters:
thePassword
- the user password of the Credential
getPassword
public final java.lang.String getPassword()
- Returns:
- the user password of the Credential
Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.