|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LoginEntityBean
This is one of the interfaces used in providing security for applications. It encapsulates an attempt to login by a client. i.e. when a LoginEntityBean is stored, a user may have a stronger authorization on subsequent commands.
In order to provide security services, including authentication, Mr Architecture suggests that each container define three entity bean types which can be manipulated by the Architecture as login attempts, user information and session information. The only requirement is that the entity beans involved implement the interfaces LoginEntityBean, UserEntityBean and SessionEntityBean, and that the user home interface be a subinterface of UserEntityBeanHome.
The authentication process for the command servlet involves the user (i) creating and storing a SessionEntityBean and (ii) creating and storing a LoginEntityBean containing a correct password hashcode according to the MD5 algorithm.
SessionEntityBean,
UserEntityBean,
UserEntityBeanHome| Method Summary | |
|---|---|
String |
getFailureReason()
When a login fails, this method returns a human readable description of what went wrong. |
String |
getIPAddress()
Recalls the IP address of the user's host or last intermediary at login time. |
Date |
getLoginAttemptDateTime()
The date and time of a login attempt can be retrieved through this method. |
long |
getLoginID()
Logins have a unique sequence number, which can be retrieved through this method. |
String |
getUsername()
Retrieves the name of the user who has attempted to login. |
void |
putPassword(byte[] aPassword)
Updates the MD5 hashcode based on the password the user attempted to use for this login. |
byte[] |
retrievePassword()
Retrieves the MD5 hashcode of the password the user attempted to use for this login. |
void |
setFailureReason(String aFailureReason)
When a login fails, this method records a human readable description of what went wrong. |
void |
setIPAddress(String aIPAddress)
Specifies the IP address of the user's host or last intermediary at login time. |
void |
setLoginAttemptDateTime(Date aTimestamp)
The date and time of a login attempt can be updated through this method. |
void |
setLoginID(long aLoginID)
Logins have a unique sequence number, which can be updated through this method. |
void |
setUsername(String aUsername)
Updates the name of the user who has attempted to login. |
| Methods inherited from interface javax.ejb.EntityBean |
|---|
ejbActivate, ejbLoad, ejbPassivate, ejbRemove, ejbStore, setEntityContext, unsetEntityContext |
| Method Detail |
|---|
long getLoginID()
void setLoginID(long aLoginID)
aLoginID - the unique sequence number
for this login.Date getLoginAttemptDateTime()
void setLoginAttemptDateTime(Date aTimestamp)
aTimestamp - the timestamp
for this login.String getUsername()
void setUsername(String aUsername)
byte[] retrievePassword()
void putPassword(byte[] aPassword)
aPassword - the MD5
hash as a byte array.String getFailureReason()
void setFailureReason(String aFailureReason)
aFailureReason - why
the login was unsuccessful,
or null if it was
successful.String getIPAddress()
void setIPAddress(String aIPAddress)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||