blackboard.platform.security.authentication
Class SessionStub

java.lang.Object
  extended by blackboard.platform.security.authentication.SessionStub

public class SessionStub
extends java.lang.Object

This is a helper class intended to do a subset of the work done by com.blackboard.security.CISession. A SessionStub object is just that, a 'struct'-style stub for session data. The method of note for Building Block developers is disassociateCurrentSessionAndUser() which can be used in logout processing.


Field Summary
static int NULL_VALUE
           
 
Constructor Summary
SessionStub()
           
SessionStub(javax.servlet.http.HttpServletRequest request)
           
 
Method Summary
 void associateSessionWithUser(java.lang.String userName)
          associateSessionWithUser If the userId is associated with a valid user record in the database, then the current session should be associated with that user record, in the database.
 void disassociateCurrentSessionAndUser()
          If the userId is associated with a valid user record in the database, then the current session should be associated with that user record, in the database.
 java.lang.String getMd5SessionId()
          Returns the Blackboard assigned unique id for this user's session as an MD5 hashed string.
 int getSessionId()
          Returns the Blackboard assigned unique id for this user's session.
 java.lang.String toString()
          Returns a string representation of the object.
 void updateLastLoginTime(java.lang.String userName)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_VALUE

public static final int NULL_VALUE
See Also:
Constant Field Values
Constructor Detail

SessionStub

public SessionStub()

SessionStub

public SessionStub(javax.servlet.http.HttpServletRequest request)
            throws BbSecurityException
Throws:
BbSecurityException
Method Detail

getSessionId

public int getSessionId()
Returns the Blackboard assigned unique id for this user's session.


getMd5SessionId

public java.lang.String getMd5SessionId()
Returns the Blackboard assigned unique id for this user's session as an MD5 hashed string.


associateSessionWithUser

public void associateSessionWithUser(java.lang.String userName)
                              throws BbAuthenticationFailedException,
                                     BbSecurityException
associateSessionWithUser If the userId is associated with a valid user record in the database, then the current session should be associated with that user record, in the database. Please note that if the system is currently set to authenticate against an external authority, then the userName parameter will be treated as the user's "batch uid" ( external userid ). Also, note that if the system is set to auto-populate, then every user record's user_id will be the same as their batch_uid -- except for the administrator, whose account is expected to be created at install-time

Parameters:
String - userName
Throws:
BbAuthenticationFailedException
BbSecurityException

updateLastLoginTime

public void updateLastLoginTime(java.lang.String userName)
                         throws BbAuthenticationFailedException,
                                BbSecurityException
Deprecated. 

NOTE: This method is deprecated and is a no-op as of Blackboard release 6.2 Updates the appropriate user's record in the database; enables the application to track login times for each user.

Parameters:
String - userName
Throws:
BbAuthenticationFailedException
BbSecurityException

disassociateCurrentSessionAndUser

public void disassociateCurrentSessionAndUser()
                                       throws BbSecurityException
If the userId is associated with a valid user record in the database, then the current session should be associated with that user record, in the database.

Throws:
BbSecurityException

toString

public java.lang.String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.


Copyright © 2003 Blackboard, Inc. All Rights Reserved.