|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cactus.client.authentication.AbstractAuthentication
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'>".
Field Summary | |
protected java.lang.String |
name
User name part of the Credential |
protected java.lang.String |
password
Password part of the Credential |
Constructor Summary | |
AbstractAuthentication(java.lang.String theName,
java.lang.String thePassword)
|
Method Summary | |
java.lang.String |
getName()
|
protected 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. |
protected abstract void |
validateName(java.lang.String theName)
Verify that the user name passed as parameter is a valid user name for the current authentication scheme. |
protected abstract void |
validatePassword(java.lang.String thePassword)
Verify that the user password passed as parameter is a valid user password for the current authentication scheme. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cactus.client.authentication.Authentication |
configure |
Field Detail |
protected java.lang.String name
protected java.lang.String password
Constructor Detail |
public AbstractAuthentication(java.lang.String theName, java.lang.String thePassword)
theName
- user name of the CredentialthePassword
- user password of the CredentialMethod Detail |
public final void setName(java.lang.String theName)
theName
- user name of the Credentialpublic final java.lang.String getName()
public final void setPassword(java.lang.String thePassword)
thePassword
- the user password of the Credentialprotected final java.lang.String getPassword()
protected abstract void validateName(java.lang.String theName)
theName
- the user name to validateprotected abstract void validatePassword(java.lang.String thePassword)
thePassword
- the user password to validate
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |