SilverStream
Application Server 3.5

com.sssw.srv.busobj
Class AgoUserLoginEvent

java.lang.Object
 |
 +--java.util.EventObject
       |
       +--com.sssw.srv.busobj.AgoBusinessObjectEvent
             |
             +--com.sssw.srv.busobj.AgoUserLoginEvent
All Implemented Interfaces:
Serializable

public class AgoUserLoginEvent
extends AgoBusinessObjectEvent

An instance of this object is passed to each UserLogin event fired.

UserLogin events are fired when a user logs into a session. Sessions are created when browsers (or other HTTP clients) connect to the server. If everything is working correctly with cookies, the server will connect all requests from the browser to the same session.

Additionally each session can be logged into. This can happen automatically via certificates, or directly via a browser login dialog or via an api call AgiServer.loginUser(). Sessions can also be logged out from. If a session is not logged in, then it is said to have an anonymous user.

Note that the UserLogin event is not fired when sessions are created, but rather when a user tries to login to a session. The UserLogin Listener can disallow the login by having the userLogin() method return false. That is, the event method actually returns false, it has nothing to do with this class. The event object passed into the event method only provides information which can be useful in determining whether to allow the login or not.

See Also:
AgiServerListener, Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AgoUserLoginEvent()
           
 
Method Summary
 Principal getPrincipal()
          Returns the identity of the user trying to login
 HttpServletRequest getRequest()
          Returns the HttpServletRequest of the login request or null if there was no associated request.
 
Methods inherited from class com.sssw.srv.busobj.AgoBusinessObjectEvent
getAgaData, getDatabase, getDatabaseURL, getServer, getSession, getUser, runAgData, updateTransactionally, userInGroup
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgoUserLoginEvent

public AgoUserLoginEvent()
Method Detail

getPrincipal

public Principal getPrincipal()
Returns the identity of the user trying to login

getRequest

public HttpServletRequest getRequest()
Returns the HttpServletRequest of the login request or null if there was no associated request.
Usage:

Most logins (all but a loginUser() call from an AgiServer object on the server) involve an HTTP request being received by the server. In particular the login request after a browser pops up a login dialog box results in an HTTP request being sent to the with an Authentication header. This method provides access to that information (and all information in the request) to the event.


SilverStream
Application Server 3.5