277. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/11/2019 10:54:15 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

277.1 Files compared

# Location File Last Modified
1 HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\security AuthenticationManagerImpl.java Wed May 29 15:26:20 2019 UTC
2 HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\security AuthenticationManagerImpl.java Tue Jun 11 11:41:37 2019 UTC

277.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 156
Changed 1 2
Inserted 0 0
Removed 0 0

277.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

277.4 Active regular expressions

No regular expressions were active.

277.5 Comparison detail

  1   /********* ********** ********** ********** ********** ********** *********
  2    * Copyrii ght 2004 V HA. All ri ghts reser ved
  3    ********* ********** ********** ********** ********** ********** *********/
  4   package go v.va.med.f w.security ;
  5  
  6   import jav a.util.Lis t;
  7  
  8   import org .apache.co mmons.lang 3.Validate ;
  9   import org .springfra mework.bea ns.factory .Initializ ingBean;
  10   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  11   import org .springfra mework.sec urity.auth entication .Anonymous Authentica tionProvid er;
  12   import org .springfra mework.sec urity.auth entication .Authentic ationProvi der;
  13   import org .springfra mework.sec urity.auth entication .ProviderM anager;
  14   import org .springfra mework.sec urity.core .Authentic ation;
  15   import org .springfra mework.sec urity.core .Authentic ationExcep tion;
  16   import org .springfra mework.sec urity.core .userdetai ls.UserDet ailsByName ServiceWra pper;
  17   import org .springfra mework.sec urity.web. authentica tion.preau th.PreAuth enticatedA uthenticat ionProvide r;
  18   import org .springfra mework.ste reotype.Co mponent;
  19  
  20   import gov .va.med.cc ht.persist ent.Securi tyDAO;
  21  
  22   /**
  23    * Authent icationMan ager imple mentation,  extends f rom Acegi' s implemen tation
  24    * Provide rManager.  Override d oAuthentic ation to a dd custom  behaviour  required.
  25    * 
  26    * @see <c ode>net.sf .acegisecu rity.provi ders.Provi derManager </code>
  27    * 
  28    * @author   D NS
  29    * @date M ay 2, 2005  6:04:41 P M
  30    */
  31   public cla ss Authent icationMan agerImpl e xtends Pro viderManag er {
  32           
  33           @A utowired
  34           pr ivate Secu rityDAO se curityDao;
  35           
  36           pu blic Authe nticationM anagerImpl (List<Auth entication Provider>  providers)  {
  37                    supe r(provider s);
  38           }
  39           
  40           @O verride
  41           pu blic void  afterPrope rtiesSet()  throws Ex ception {
  42                    
  43                    supe r.afterPro pertiesSet ();
  44                    
  45                    Vali date.notNu ll(securit yDao, "sec urityDao c annot be n ull");
  46                    
  47                    @Sup pressWarni ngs("rawty pes")
  48                    User DetailsByN ameService Wrapper us erDetailsS erviceWrap per = new  UserDetail sByNameSer viceWrappe r(security Dao);
  49                    
  50                    PreA uthenticat edAuthenti cationProv ider preAu thenticati onProvider  = new Pre Authentica tedAuthent icationPro vider();
  51                    preA uthenticat ionProvide r.setPreAu thenticate dUserDetai lsService( userDetail sServiceWr apper);
  52                    
  53                    Anon ymousAuthe nticationP rovider an onymousAut henticatio nProvider  = new Anon ymousAuthe nticationP rovider("c chtAnonAut hKey");
  54                    
  55                    this .getProvid ers().add( preAuthent icationPro vider);
  56                    this .getProvid ers().add( anonymousA uthenticat ionProvide r);
  57                    
  58           }
  59           
  60           /*
  61            *  Checks fo r loggedIn  flag befo re delegat ing the au thenticati on request  to
  62            *  the super  class. If  the user  is already  logged in , it retur ns the sam e
  63            *  Authentic ation Obje ct.
  64            *  
  65            *  @see
  66            *  net.sf.ac egisecurit y.Abstract Authentica tionManage r#doAuthen tication(n et
  67            *  .sf.acegi security.A uthenticat ion)
  68            * /
  69           pu blic Authe ntication  doAuthenti cation(Aut henticatio n auth) th rows Authe nticationE xception {
  70                    
  71                    if ( auth != nu ll && auth  instanceo f Authenti cationObje ct) {
  72                             Authen ticationOb ject authT oken = (Au thenticati onObject)  auth;
  73                             if (au thToken.is LoggedIn() ) {
  74                                      return a uth;
  75                             }
  76                    }
  77                    retu rn super.a uthenticat e(auth);
  78           }
  79   }