/**
 * Copyright  2001 The JA-SIG Collaborative.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the JA-SIG Collaborative
 *    (http://www.jasig.org/)."
 *
 * THIS SOFTWARE IS PROVIDED BY THE JA-SIG COLLABORATIVE "AS IS" AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE JA-SIG COLLABORATIVE OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *
 * formatted with JxBeauty (c) johann.langhofer@nextra.at
 */


package  org.jasig.portal.security.provider;

import  org.jasig.portal.security.*;
import  org.jasig.portal.services.LogService;
import  org.jasig.portal.RdbmServices;
import  org.jasig.portal.GenericPortalBean;
import  java.util.*;


/**
 * <p>This is an implementation of a SecurityContext that merely checks to see
 * if the user exists in the UP_USERS database table but otherwise presumes
 * to be pre-authenticated by the context from which it is called. The typical
 * system where this might be used is a portal whose main page is protected by
 * HTTP authentication (BASIC or otherwise).</p>
 *
 * @author Andrew Newman, newman@yale.edu
 * @version $Revision$
 */
class TrustSecurityContext extends ChainingSecurityContext
    implements ISecurityContext {
  private final int TRUSTSECURITYAUTHTYPE = 0xFF01;

  /**
   * put your documentation comment here
   */
  TrustSecurityContext () {
    super();
  }

  /**
   * put your documentation comment here
   * @return
   */
  public int getAuthType () {
    return  this.TRUSTSECURITYAUTHTYPE;
  }

  /**
   * put your documentation comment here
   * @exception PortalSecurityException
   */
  public synchronized void authenticate () throws PortalSecurityException {
    this.isauth = true;
/*    if (this.myPrincipal.UID != null) {
      try {
        String first_name, last_name;
        String acct[] = GenericPortalBean.getUserLayoutStore().getUserAccountInformation(this.myPrincipal.UID);
        if (acct[0] != null) {
          first_name = acct[1];
          last_name = acct[2];
          this.myPrincipal.FullName = first_name + " " + last_name;
          Logger.log(Logger.INFO, "User " + this.myPrincipal.UID + " is authenticated");
          this.isauth = true;
        }
        else
          Logger.log(Logger.INFO, "No such user: " + this.myPrincipal.UID);
      } catch (Exception e) {
        PortalSecurityException ep = new PortalSecurityException("SQL Database Error");
        Logger.log(Logger.ERROR, ep);
        throw  (ep);
      }
    }
    else
      Logger.log(Logger.ERROR, "Principal not initialized prior to authenticate");
    // Ok...we are now ready to authenticate all of our subcontexts. */
    super.authenticate();
    return;
  }
}




@@ -2907,18 +2907,16 @@
 = true;%0A
-/*
     if (
@@ -3280,35 +3280,39 @@
          Log
-g
+S
 er
+vice
 .log(Log
 ger.INFO, %22U
@@ -3291,35 +3291,39 @@
 gService.log(Log
-g
+S
 er
+vice
 .INFO, %22User %22 +
@@ -3430,35 +3430,39 @@
          Log
-g
+S
 er
+vice
 .log(Log
 ger.INFO, %22N
@@ -3449,19 +3449,23 @@
 .log(Log
-g
+S
 er
+vice
 .INFO, %22
@@ -3630,35 +3630,39 @@
 %0A        Log
-g
+S
 er
+vice
 .log(Log
 ger.ERROR, e
@@ -3641,35 +3641,39 @@
 gService.log(Log
-g
+S
 er
+vice
 .ERROR, ep);%0A   
@@ -3726,19 +3726,23 @@
  Log
-g
+S
 er
+vice
 .log(Log
 ger.
@@ -3741,11 +3741,15 @@
 (Log
-g
+S
 er
+vice
 .ERR
@@ -3872,19 +3872,16 @@
 ontexts.
- */
 %0A    sup

Remove user_id from UP_PERSON_DIR and make globalUID a string again to restore original intent as meaningful Gloabl UID such as so.and.so@school.edu