/** Initialize the session attributes. */
 public void initializeSession() {
   ApplicationSessionInitializer asi = getApplicationSessionInitializer();
   if (asi != null) {
     asi.initializeSession();
     Map<String, Object> sessionAttributes = asi.getSessionAttributes();
     if (sessionAttributes != null) {
       setSessionAttributes(sessionAttributes);
     }
     propertyChangeSupport.firePropertyChange(SESSION_ATTRIBUTES, null, sessionAttributes);
   }
 }
 /**
  * When a correct login occurs, read all relevant userinformation into session.
  *
  * @param event the loginEvent that triggered this handler.
  */
 protected void handleLoginEvent(LoginEvent event) {
   ApplicationSessionInitializer asi = getApplicationSessionInitializer();
   if (asi != null) {
     asi.initializeUser();
     Map<String, Object> userAttributes = asi.getUserAttributes();
     if (userAttributes != null) {
       setUserAttributes(userAttributes);
     }
   }
   Authentication auth = (Authentication) event.getSource();
   propertyChangeSupport.firePropertyChange(USER, null, auth);
 }