public class Session extends FortEntity implements PwMessage, Serializable
Session
session.getUserId() => demoUser4
session.getInternalUserId() => be2dd2e:12a82ba707e:-7fee
session.getMessage() => Fortress checkPwPolicies userId <demouser4> VALIDATION GOOD
session.getErrorId() => 0
session.getWarningId() => 11
session.getExpirationSeconds() => 469831
session.getGraceLogins() => 0
session.getIsAuthenticated() => true
session.getLastAccess() => 1283623680440
session.getSessionId() => -7410986f:12addeea576:-7fff
User user = session.getUser();
user.getUserId() => demoUser4
user.getInternalId() => be2dd2e:12a82ba707e:-7fee
user.getCn() => JoeUser4
user.getDescription() => Demo Test User 4
user.getOu() => test
user.getSn() => User4
user.getBeginDate() => 20090101
user.getEndDate() => none
user.getBeginLockDate() => none
user.getEndLockDate() => none
user.getDayMask() => 1234567
user.getTimeout() => 60
List<UserRole> roles = session.getRoles();
UserRole userRole = roles.get(i);
userRole.getName() => role1
userRole.getBeginTime() => 0000
userRole.getEndTime() => 0000
userRole.getBeginDate() => none
userRole.getEndDate() => none
userRole.getBeginLockDate() => null
userRole.getEndLockDate() => null
userRole.getDayMask() => null
userRole.getTimeout() => 0
List<UserAdminRole> adminRoles = session.getAdminRoles();
UserAdminRole userAdminRole = adminRoles.get(i);
userAdminRole.getName() => DemoAdminUsers
userAdminRole.getBeginTime() => 0000
userAdminRole.getEndTime() => 0000
userAdminRole.getBeginDate() => none
userAdminRole.getEndDate() => none
userAdminRole.getBeginLockDate() => null
userAdminRole.getEndLockDate() => null
userAdminRole.getDayMask() => null
userAdminRole.getTimeout() => 0
userAdminRole.getOsPs() => [ftT3POrg10, ftT4POrg10]
userAdminRole.getOsUs() => [ftT1UOrg10, ftT2UOrg10]
userAdminRole.getBeginRange() => ftT14Role1
userAdminRole.getEndRange() => ftT14Role10
userAdminRole.getBeginInclusive() => true
userAdminRole.getEndInclusive() => false
Sample Data data contained within this Entity.
Ses UID [demoUser4]:
Ses IID [ccbb2929-bf01-413d-b768-529de4d428e5]
Ses ERR [0]
Ses WARN [10]
Ses MSG [checkPwPolicies for userId <demouser4> PASSWORD CHECK SUCCESS]
Ses EXP [0]
Ses GRAC [0]
Ses AUTH [true]
Ses LAST [1297408501356]
Ses SID [fc228713-1242-4061-9d8a-d4860bf8d3d8]
------------------------------------------
Usr UID [demoUser4]
Usr IID [ccbb2929-bf01-413d-b768-529de4d428e5]
Usr CN [JoeUser4]
Usr DESC [Demo Test User 4]
Usr OU [demousrs1]
Usr SN [User4]
Usr BDTE [20090101]
Usr EDTE [20990101]
Usr BLDT [none]
Usr ELDT [none]
Usr DMSK [1234567]
Usr TO [60]
Usr REST [false]
Usr PROP1 [customerNumber, 3213432]
USER RBAC ROLE[0]:
Rle role name [role1]
Rle begin time [0000]
Rle end time [0000]
Rle begin date [20110101]
Rle end date [none]
Rle begin lock [none]
Rle end lock [none]
Rle day mask [all]
Rle time out [60]
USER ADMIN ROLE[0]:
Adm admin role name [DemoAdminUsers]
Adm OsU [Dev1]
Adm OsP [App1]
Adm begin range [role1]
Adm end range [role3]
Adm begin time [0000]
Adm end time [0000]
Adm begin date [20110101]
Adm end date [none]
Adm begin lock [none]
Adm end lock [none]
Adm day mask [23456]
Adm time out [30]
adminSession, contextId, modCode, modId, sequenceId
Constructor and Description |
---|
Session()
Default constructor for Fortress Session.
|
Session(User user)
Construct a new Session instance with given User entity.
|
Session(User user,
String sessionId)
Construct a new Session instance with given User entity.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(Session inSession)
Copy values from incoming Session object.
|
List<UserAdminRole> |
getAdminRoles()
Return a list of User's Admin Roles that have been activated into User's session.
|
int |
getErrorId()
Return the error id that is associated with the password policy checks.
|
int |
getExpirationSeconds()
This attribute specifies the maximum number of seconds before a
password is due to expire that expiration warning messages will be
returned to an authenticating user.
|
int |
getGraceLogins()
Gets the attribute that specifies the number of times an expired password can
be used to authenticate before failure.
|
String |
getInternalUserId()
Return the internal userId that is associated with User.
|
long |
getLastAccess()
Returns the last access time in milliseconds.
|
String |
getMsg()
Gets the message that is associated with the user's last authentication attempt.
|
List<UserRole> |
getRoles()
Return the list of User's RBAC Roles that have been activated into User's session.
|
String |
getSessionId()
Return the unique id that is associated with User.
|
User |
getUser()
Return the User entity that is associated with this entity.
|
String |
getUserId()
Return the userId that is associated with this Session object.
|
List<Warning> |
getWarnings()
Get the warnings attached to this Session.
|
boolean |
isAuthenticated()
A 'true' value here indicates user successfully authenticated with Fortress.
|
boolean |
setAuthenticated()
Get the value that will be set to 'true' if user has successfully authenticated with Fortress for this Session.
|
void |
setAuthenticated(boolean authenticated)
Set the value to 'true' indicating that user has successfully authenticated with Fortress.
|
void |
setErrorId(int error)
Set the error id that is associated with the password policy checks.
|
void |
setExpirationSeconds(int expire)
This attribute specifies the maximum number of seconds before a
password is due to expire that expiration warning messages will be
returned to an authenticating user.
|
void |
setGraceLogins(int grace)
This attribute specifies the number of times an expired password can
be used to authenticate.
|
void |
setInternalUserId(String internalUserId)
Set the internal userId that is associated with User.
|
void |
setLastAccess()
Set the last access time in milliseconds.
|
void |
setMsg(String message)
Set the message that is associated with the user's last authentication attempt.
|
void |
setRole(UserRole role)
Add a single user-role object to the list of UserRoles for User.
|
void |
setRoles(List<UserRole> roles)
Add a list of RBAC Roles to this entity that have been activated into Session or are under consideration for activation.
|
void |
setUser(User user)
Set a User entity into the Session.
|
void |
setUserId(String userId)
Set the userId that is associated with User.
|
void |
setWarning(Warning warning)
Add a warning to the collection into Fortress Session object.
|
void |
setWarnings(List<Warning> warnings)
Set the warnings on this Session.
|
String |
toString() |
getAdminSession, getContextId, getModCode, getModId, getSequenceId, setAdminSession, setContextId, setModCode, setSequenceId
public Session()
public Session(User user)
user
- contains the User attributes that are associated with the Session.public boolean isAuthenticated()
isAuthenticated
in interface PwMessage
public void copy(Session inSession)
inSession
- contains Session values.public String getSessionId()
public User getUser()
------------------------------------------
U UID [demoUser4]
U IID [ccbb2929-bf01-413d-b768-529de4d428e5]
U CN [JoeUser4]
U DESC [Demo Test User 4]
U OU [demousrs1]
U SN [User4]
U BDTE [20090101]
U EDTE [20990101]
U BLDT [none]
U ELDT [none]
U DMSK [1234567]
U TO [60]
U REST [false]
U PROP[0]=customerNumber VAL=3213432
USER ROLE[0]:
role name <role1>
begin time <0000>
end time <0000>
begin date <none>
end date <none>
begin lock <none>
end lock <none>
day mask <all>
time out <0>
USER ADMIN ROLE[0]:
admin role name <DemoAdminUsers>
OsU <null>
OsP <null>
begin range <null>
end range <null>
begin time <0000>
end time <0000>
begin date <none>
end date <none>
begin lock <none>
end lock <none>
day mask <all>
time out <0>
public String getUserId()
public String getInternalUserId()
public List<UserRole> getRoles()
AccessMgrImpl.authorizedRoles(Session)
.public List<UserAdminRole> getAdminRoles()
DelAccessMgr.authorizedAdminRoles(Session)
.public long getLastAccess()
public String getMsg()
public int getGraceLogins()
getGraceLogins
in interface PwMessage
public int getExpirationSeconds()
If this attribute is not present, or if the value is 0 no warnings will be returned. If not 0, the value must be smaller than the value of the pwdMaxAge attribute.
getExpirationSeconds
in interface PwMessage
public boolean setAuthenticated()
public int getErrorId()
INVALID_PASSWORD_MESSAGE = -10;
GOOD = 0;
PASSWORD_HAS_EXPIRED = 100;
ACCOUNT_LOCKED = 101;
CHANGE_AFTER_RESET = 102;
NO_MODIFICATIONS = 103;
MUST_SUPPLY_OLD = 104;
INSUFFICIENT_QUALITY = 105;
PASSWORD_TOO_SHORT = 106;
PASSWORD_TOO_YOUNG = 107;
HISTORY_VIOLATION = 108;
ACCOUNT_LOCKED_CONSTRAINTS = 109;
getErrorId
in interface PwMessage
public void setUser(User user)
------------------------------------------
U UID [demoUser4]
U IID [ccbb2929-bf01-413d-b768-529de4d428e5]
U CN [JoeUser4]
U DESC [Demo Test User 4]
U OU [demousrs1]
U SN [User4]
U BDTE [20090101]
U EDTE [20990101]
U BLDT [none]
U ELDT [none]
U DMSK [1234567]
U TO [60]
U REST [false]
U PROP[0]=customerNumber VAL=3213432
USER ROLE[0]:
role name <role1>
begin time <0000>
end time <0000>
begin date <none>
end date <none>
begin lock <none>
end lock <none>
day mask <all>
time out <0>
USER ADMIN ROLE[0]:
admin role name <DemoAdminUsers>
OsU <null>
OsP <null>
begin range <null>
end range <null>
begin time <0000>
end time <0000>
begin date <none>
end date <none>
begin lock <none>
end lock <none>
day mask <all>
time out <0>
user
- Contains userId, roles and other security attributes used for access control.public void setInternalUserId(String internalUserId)
internalUserId
- maps to 'ftId' in 'ftUserAttrs' object class.public void setAuthenticated(boolean authenticated)
setAuthenticated
in interface PwMessage
authenticated
- indicates result of authentication.public void setUserId(String userId)
public void setRoles(List<UserRole> roles)
roles
- List of type UserRole that contains at minimum UserId and Role name.public void setRole(UserRole role)
role
- UserRole contains at least userId and role name (activation) and additional constraints (assignment)public void setLastAccess()
public void setMsg(String message)
public void setErrorId(int error)
INVALID_PASSWORD_MESSAGE = -10;
GOOD = 0;
PASSWORD_HAS_EXPIRED = 100;
ACCOUNT_LOCKED = 101;
CHANGE_AFTER_RESET = 102;
NO_MODIFICATIONS = 103;
MUST_SUPPLY_OLD = 104;
INSUFFICIENT_QUALITY = 105;
PASSWORD_TOO_SHORT = 106;
PASSWORD_TOO_YOUNG = 107;
HISTORY_VIOLATION = 108;
ACCOUNT_LOCKED_CONSTRAINTS = 109;
setErrorId
in interface PwMessage
error
- contains the error id that was generated on the user's last authentication.public void setGraceLogins(int grace)
setGraceLogins
in interface PwMessage
grace
- The number of logins the user has left before password fails.public void setExpirationSeconds(int expire)
If this attribute is not present, or if the value is 0 no warnings will be returned. If not 0, the value must be smaller than the value of the pwdMaxAge attribute.
setExpirationSeconds
in interface PwMessage
expire
- attribute is computed based on last time user has changed their password.public List<Warning> getWarnings()
getWarnings
in interface PwMessage
Warning
will be returned. Note: the caller of this method must ensure a not null condition before use.public void setWarnings(List<Warning> warnings)
setWarnings
in interface PwMessage
warnings
- zero or more objects of type warning may be set on a Fortress session.public void setWarning(Warning warning)
setWarning
in interface PwMessage
warning
- one object of type warning will be added to Fortress session.public String toString()
toString
in class Object
Object.toString()
Copyright © 2003-2016, The Apache Software Foundation. All Rights Reserved. Generated 20160718-1621