|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SessionEntityBean
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 information bean's 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.
LoginEntityBean,
UserEntityBean,
UserEntityBeanHome| Method Summary | |
|---|---|
Date |
getEndDateTime()
This field is not used by the Architecture, because there is no facility for logout. |
long |
getLoginID()
Each session has none or one associated login. |
Date |
getStartDateTime()
Returns the start timestamp for this session. |
String |
getUsername()
Retrieves the name of the user who first claimed this session. |
boolean |
login(String username,
String password)
Perform a login sequence. |
void |
setEndDateTime(Date aEndDate)
This field is not used by the Architecture, because there is no facility for logout. |
void |
setLoginID(long aLoginID)
Each session has none or one associated login. |
void |
setStartDateTime(Date aStartDate)
Updates the start timestamp for this session. |
void |
setUsername(String aUser)
Redundantly stores the name of the user who first claimed this session. |
| Methods inherited from interface javax.ejb.EntityBean |
|---|
ejbActivate, ejbLoad, ejbPassivate, ejbRemove, ejbStore, setEntityContext, unsetEntityContext |
| Method Detail |
|---|
long getLoginID()
Where a user logs in under a different name (or the same name) in the same session, it is customary for the architecture to only record the first valid login for that session.
void setLoginID(long aLoginID)
Where a user logs in under a different name (or the same name) in the same session, it is customary for the architecture to only record the first valid login for that session.
Date getEndDateTime()
void setEndDateTime(Date aEndDate)
aEndDate - the date and time of the
start of this session.Date getStartDateTime()
void setStartDateTime(Date aStartDate)
String getUsername()
void setUsername(String aUser)
boolean login(String username,
String password)
throws NotSupportedException,
RollbackException,
EJBException,
CreateException
username - the user to log in.password - the user's password.
NotSupportedException
RollbackException
EJBException
CreateException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||