|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.security.spi.impl.LdapCredentialHandler
CredentialHandler
Field Summary | |
private LdapUserCredentialDao |
ldap
The LdapUserCredentialDao . |
private static org.apache.commons.logging.Log |
LOG
The logger. |
Constructor Summary | |
LdapCredentialHandler()
Default constructor. |
|
LdapCredentialHandler(LdapUserCredentialDao ldap)
Constructor given a LdapUserCredentialDao . |
Method Summary | |
boolean |
authenticate(String uid,
String password)
Authenticate a user. |
Set |
getPrivateCredentials(String uid)
Gets the private credentials for the user. |
Set |
getPublicCredentials(String username)
Gets the public credentials for the user. |
private void |
logSecurityException(org.apache.jetspeed.security.SecurityException e,
String uid)
|
void |
setPassword(String uid,
String oldPassword,
String newPassword)
Adds or updates a private password credential. |
void |
setPasswordEnabled(String userName,
boolean enabled)
Set the enabled state of the user password credential. |
void |
setPasswordExpiration(String userName,
Date expirationDate)
Set the expiration date and the expired flag of the password credential. |
void |
setPasswordUpdateRequired(String userName,
boolean updateRequired)
Set the update required state of the user password credential. |
private void |
validate(String uid,
String password)
Validates the uid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final org.apache.commons.logging.Log LOG
private LdapUserCredentialDao ldap
LdapUserCredentialDao
.
Constructor Detail |
public LdapCredentialHandler() throws NamingException, org.apache.jetspeed.security.SecurityException
Default constructor.
public LdapCredentialHandler(LdapUserCredentialDao ldap) throws NamingException, org.apache.jetspeed.security.SecurityException
Constructor given a LdapUserCredentialDao
.
ldap
- The LdapUserCredentialDao
.
NamingException
- A NamingException
.
org.apache.jetspeed.security.SecurityException
- A SecurityException
.Method Detail |
public Set getPublicCredentials(String username)
CredentialHandler
Gets the public credentials for the user.
getPublicCredentials
in interface CredentialHandler
username
- The username.
CredentialHandler.getPublicCredentials(java.lang.String)
public Set getPrivateCredentials(String uid)
CredentialHandler
Gets the private credentials for the user.
getPrivateCredentials
in interface CredentialHandler
uid
- The username.
CredentialHandler.getPrivateCredentials(java.lang.String)
private void logSecurityException(org.apache.jetspeed.security.SecurityException e, String uid)
public void setPassword(String uid, String oldPassword, String newPassword) throws org.apache.jetspeed.security.SecurityException
Adds or updates a private password credential.
If oldPassword
is not null, the oldPassword will first be
checked (authenticated).
setPassword
in interface CredentialHandler
uid
- The LDAP uid attribute.oldPassword
- The old PasswordCredential
.newPassword
- The new PasswordCredential
.
org.apache.jetspeed.security.SecurityException
- when the lookup fails because the user does not
exist or the non-null password is not correct. Throws a
SecurityException
.public void setPasswordEnabled(String userName, boolean enabled) throws org.apache.jetspeed.security.SecurityException
CredentialHandler
Set the enabled state of the user password credential.
setPasswordEnabled
in interface CredentialHandler
userName
- The user name.enabled
- The enabled state.
org.apache.jetspeed.security.SecurityException
CredentialHandler.setPasswordEnabled(java.lang.String,
boolean)
public void setPasswordUpdateRequired(String userName, boolean updateRequired) throws org.apache.jetspeed.security.SecurityException
CredentialHandler
Set the update required state of the user password credential.
setPasswordUpdateRequired
in interface CredentialHandler
userName
- The user name.updateRequired
- The update required state.
org.apache.jetspeed.security.SecurityException
CredentialHandler.setPasswordUpdateRequired(java.lang.String,
boolean)
public void setPasswordExpiration(String userName, Date expirationDate) throws org.apache.jetspeed.security.SecurityException
CredentialHandler
Set the expiration date and the expired flag of the password credential.
If a date equal or before the current date is provided, the expired flag will be set to true, otherwise to false.
setPasswordExpiration
in interface CredentialHandler
userName
- The user name.expirationDate
- The expiration date to set.
org.apache.jetspeed.security.SecurityException
CredentialHandler.setPasswordExpiration(java.lang.String, java.sql.Date)
public boolean authenticate(String uid, String password) throws org.apache.jetspeed.security.SecurityException
CredentialHandler
Authenticate a user.
authenticate
in interface CredentialHandler
uid
- The user name.password
- The user password.
org.apache.jetspeed.security.SecurityException
CredentialHandler.authenticate(java.lang.String, java.lang.String)
private void validate(String uid, String password) throws org.apache.jetspeed.security.SecurityException
Validates the uid.
uid
- The uid.password
- The password.
org.apache.jetspeed.security.SecurityException
- Throws a SecurityException
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |