mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-36: Add password reset date to schema.
This commit is contained in:
@@ -21,6 +21,7 @@ package org.apache.guacamole.auth.jdbc.user;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.sql.Time;
|
||||
import java.sql.Timestamp;
|
||||
import org.apache.guacamole.auth.jdbc.base.ObjectModel;
|
||||
|
||||
/**
|
||||
@@ -41,6 +42,11 @@ public class UserModel extends ObjectModel {
|
||||
*/
|
||||
private byte[] passwordSalt;
|
||||
|
||||
/**
|
||||
* The time this user's password was last reset.
|
||||
*/
|
||||
private Timestamp passwordDate;
|
||||
|
||||
/**
|
||||
* Whether the user account is disabled. Disabled accounts exist and can
|
||||
* be modified, but cannot be used.
|
||||
@@ -143,6 +149,30 @@ public class UserModel extends ObjectModel {
|
||||
this.passwordSalt = passwordSalt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date that this user's password was last set/reset. This
|
||||
* value is required to be manually updated whenever the user's password is
|
||||
* changed; it will not be automatically updated by the database.
|
||||
*
|
||||
* @return
|
||||
* The date that this user's password was last set/reset.
|
||||
*/
|
||||
public Timestamp getPasswordDate() {
|
||||
return passwordDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the date that this user's password was last set/reset. This
|
||||
* value is required to be manually updated whenever the user's password is
|
||||
* changed; it will not be automatically updated by the database.
|
||||
*
|
||||
* @param passwordDate
|
||||
* The date that this user's password was last set/reset.
|
||||
*/
|
||||
public void setPasswordDate(Timestamp passwordDate) {
|
||||
this.passwordDate = passwordDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the user has been disabled. Disabled users are not
|
||||
* allowed to login. Although their account data exists, all login attempts
|
||||
|
Reference in New Issue
Block a user