class UserAccount extends Account implements SecurityConstants
Modifier and Type | Field and Description |
---|---|
private boolean |
aged
Password needs change flag.
|
private java.lang.String |
authPlugin
Custom authentication plugin class override for this account.
|
private DateValue |
date
Date password was last changed.
|
private int[] |
groups
Indices of group accounts where this user belongs.
|
private int |
mode
Authorization mode override for this account.
|
private boolean |
modeInherited
Identifies whether this account keeps the auth mode and plugin settings
inherited from a parent group or default server settings.
|
private byte[] |
password
Hashed password for this account.
|
private boolean |
protect
Password protected account flag.
|
private TimeValue |
time
Time password was last changed.
|
ACC_ALL, ACC_GROUP, ACC_PROCESS, ACC_USER
AUTH_ACTION_ABORT, AUTH_ACTION_CONTINUE, AUTH_ACTION_DONE, AUTH_ACTION_RETRY, AUTH_MODE_CUSTOM, AUTH_MODE_HIGHEST, AUTH_MODE_IDPW, AUTH_MODE_LOWEST, AUTH_MODE_NONE, AUTH_MODE_X509, AUTH_MODE_X509_IDPW, AUTH_REQ_PROCESS, AUTH_REQ_PROGRAM, AUTH_REQ_USER, AUTH_RESULT_INSUFFICIENT_RIGHTS, AUTH_RESULT_INVALID_PASSWORD, AUTH_RESULT_INVALID_USERID, AUTH_RESULT_NONE, AUTH_RESULT_SKIP_TO_NEXT, AUTH_RESULT_SUCCESS, AUTH_RESULT_UNSPECIFIED_FAILURE, PKT_SIZE_SKIP_TO_NEXT
Constructor and Description |
---|
UserAccount(java.lang.String subjectId,
boolean enabled,
java.lang.String person,
java.lang.String alias,
int[] groups,
boolean protect,
byte[] password,
DateValue date,
TimeValue time,
java.lang.Integer mode,
java.lang.String authPlugin,
boolean modeInherited)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) int |
getAccountType()
Gets the account type of this account.
|
(package private) int |
getAuthMode()
Gets authorization mode override set forth for this account.
|
java.lang.String |
getAuthPlugin()
Gets the custom authentication plugin class for this account.
|
(package private) int[] |
getGroups()
Gets the groups to which this account belongs.
|
(package private) byte[] |
getPassword()
Gets the hashed password for this acoount.
|
(package private) DateValue |
getPasswordDate()
Gets the last password change date.
|
(package private) TimeValue |
getPasswordTime()
Gets the last password change time.
|
(package private) java.lang.String |
getPerson()
Gets the account owner's name.
|
boolean |
isModeInherited()
Identifies whether this account keeps the auth mode and plugin inherited
from a parent group or default server settings.
|
(package private) boolean |
isPasswordAged()
Gets password age status.
|
(package private) boolean |
isProtected()
Gets the password protected status of this account.
|
(package private) void |
setPassword(byte[] password,
DateValue date,
TimeValue time)
Sets a new hashed password for this acoount.
|
(package private) void |
setPasswordAged(boolean aged)
Sets password age status.
|
getAlias, getDescription, getSubjectId, isEnabled, setEnabled
private int[] groups
private boolean protect
If set to true
, password protection is in effect for this
account. The password field is expected to be present. If no password
is given to the constructor, all binary zeros are used as the password
hash, making this account effectively disabled.
If set to false
, this account is not protected. The contents
of the password hash field does not matter and no check will be done.
private byte[] password
private DateValue date
private TimeValue time
private boolean aged
private int mode
private java.lang.String authPlugin
private boolean modeInherited
UserAccount(java.lang.String subjectId, boolean enabled, java.lang.String person, java.lang.String alias, int[] groups, boolean protect, byte[] password, DateValue date, TimeValue time, java.lang.Integer mode, java.lang.String authPlugin, boolean modeInherited)
subjectId
- Subject ID also known as account name.enabled
- true
if this account is enabledperson
- Person's name, may be null
.alias
- Truststore alias associated with the user's certificate, may be null
.groups
- Indices of group accounts this where this account belongs, may be null
.protect
- true
if this account is password protectedpassword
- Hashed password data, may be null
.date
- The date the password was last changed.time
- The time the password was last changed.mode
- Authentication mode override, may be null
. Must be one of the valid
AUTH_MODE_*
constants in SecurityConstants
.authPlugin
- Custom authentication plugin class override for this account.modeInherited
- true
if this account keeps the auth mode and plugin settings
inherited from a parent group or default server settings.int getAccountType()
getAccountType
in class Account
ACC_USER
.boolean isProtected()
true
if the account is password protectedjava.lang.String getPerson()
int[] getGroups()
byte[] getPassword()
void setPassword(byte[] password, DateValue date, TimeValue time)
password
- The hashed password data.date
- The date the password was last changed.time
- The time the password was last changed.int getAuthMode()
DateValue getPasswordDate()
TimeValue getPasswordTime()
boolean isPasswordAged()
true
if this password is too old and needs
changing.void setPasswordAged(boolean aged)
aged
- true
if this password is too old and needs
changing.public java.lang.String getAuthPlugin()
public boolean isModeInherited()
true
if this account keeps the auth mode and
plugin inherited from a parent group or default server
settings. false
if these are user-specific values.