improve authentication system

This commit is contained in:
Sebastian Sdorra
2010-12-04 15:58:13 +01:00
parent 38c3a952c8
commit d506310e29
4 changed files with 60 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(propOrder =
{
"name", "displayName", "mail", "password", "admin", "type"
"name", "displayName", "mail", "password", "admin", "type", "lastLogin"
})
public class User
implements TypedObject, Principal, Cloneable, Validateable, Serializable
@@ -237,6 +237,17 @@ public class User
return displayName;
}
/**
* Method description
*
*
* @return
*/
public long getLastLogin()
{
return lastLogin;
}
/**
* Method description
*
@@ -332,6 +343,17 @@ public class User
this.displayName = displayName;
}
/**
* Method description
*
*
* @param lastLogin
*/
public void setLastLogin(long lastLogin)
{
this.lastLogin = lastLogin;
}
/**
* Method description
*
@@ -385,6 +407,9 @@ public class User
/** Field description */
private String displayName;
/** Field description */
private long lastLogin;
/** Field description */
private String mail;

View File

@@ -43,4 +43,16 @@ import sonia.scm.Manager;
* @author Sebastian Sdorra
*/
public interface UserManager
extends Manager<User, UserException>, ListenerSupport<UserListener> {}
extends Manager<User, UserException>, ListenerSupport<UserListener>
{
/**
* Method description
*
*
* @param username
*
* @return
*/
public boolean contains(String username);
}

View File

@@ -115,6 +115,20 @@ public class XmlUserManager extends AbstractUserManager
// do nothing
}
/**
* Method description
*
*
* @param username
*
* @return
*/
@Override
public boolean contains(String username)
{
return userDB.contains(username);
}
/**
* Method description
*