392. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/13/2018 10:35:31 AM Eastern Standard 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.

392.1 Files compared

# Location File Last Modified
1 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\security UserCredentials.java Fri Dec 7 17:36:20 2018 UTC
2 v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\security UserCredentials.java Wed Dec 12 19:46:45 2018 UTC

392.2 Comparison summary

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

392.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

392.4 Active regular expressions

No regular expressions were active.

392.5 Comparison detail

  1   /**
  2    * Created  on 3:14:0 6 PM Jan 7 , 2005
  3    * Project : UI
  4    * 
  5    * @author   DN S
  6    */
  7   package go v.va.med.f w.security ;
  8  
  9   import jav ax.persist ence.Colum n;
  10   import jav ax.persist ence.Embed dable;
  11   import jav ax.persist ence.Trans ient;
  12  
  13   import org .apache.co mmons.lang .builder.T oStringBui lder;
  14  
  15   // Framewo rk classes
  16   import gov .va.med.fw .model.Abs tractEntit y;
  17   import gov .va.med.fw .model.Has hSummary;
  18   import gov .va.med.fw .util.Hash Utils;
  19  
  20   /**
  21    * A value  object co ntaining d ata repres enting use r informat ion
  22    */
  23   @Embeddabl e
  24   public cla ss UserCre dentials e xtends Abs tractEntit y {
  25  
  26           /* *
  27            *  An instan ce of seri alVersionU ID
  28            * /
  29           pr ivate stat ic final l ong serial VersionUID  = 4829641 5091420568 66L;
  30  
  31           /* *
  32            *  A user's  id that is  used for  logon purp oses (ie,  authentica ted agains t)
  33            * /
  34           pr ivate Stri ng userID  = null;
  35  
  36           /* *
  37            *  A logical  name for  this user.  It is not  used for  logon purp oses, but  more
  38            *  for optio nal logica l identifi cation. Fo r example,  a user co uld
  39            *  authentic ate with " JSMITH" (u serID) but  system re quirements  dictate t hat
  40            *  they are  audited in  the syste m as "HQ U SER (userN ame). This  also allo ws
  41            *  for post- authentica tion of se tting a lo gical name .
  42            * /
  43           pr ivate Stri ng logical ID = null;
  44  
  45           /* *
  46            *  A user's  pwd
  47            * /
  48           pr ivate Stri ng passwor d = null;
  49           /* *
  50            *  An option al securit y code for  validatio n
  51            * /
  52           pr ivate Stri ng securit yCode = nu ll;
  53  
  54           pr ivate bool ean anonym ous = fals e;
  55           pr ivate bool ean verifi ed = false ;
  56  
  57           /* *
  58            *  An empty  value obje ct contain ing user i nformation
  59            * /
  60           pu blic UserC redentials () {
  61                    supe r();
  62           }
  63  
  64           /* *
  65            *  @return R eturns the  pwd.
  66            * /
  67           @T ransient
  68           pu blic Strin g getPassw ord() {
  69                    retu rn passwor d;
  70           }
  71  
  72           /* *
  73            *  @param pw d
  74            *              The pwd  to set.
  75            * /
  76           pu blic void  setPasswor d(String p wd) {
  77                    this .password  = pwd;
  78           }
  79  
  80           /* *
  81            *  @return R eturns the  userName.
  82            * /
  83           @C olumn(name ="USER_NAM E")
  84           pu blic Strin g getUserI D() {
  85                    retu rn userID;
  86           }
  87  
  88           /* *
  89            *  @param us erName
  90            *              The user Name to se t.
  91            * /
  92           pu blic void  setUserID( String use rName) {
  93                    this .userID =  userName;
  94           }
  95  
  96           @T ransient
  97           pu blic Strin g getSecur ityCode()  {
  98                    retu rn securit yCode;
  99           }
  100  
  101           pu blic void  setSecurit yCode(Stri ng securit yCode) {
  102                    this .securityC ode = secu rityCode;
  103           }
  104  
  105           /* *
  106            *  @return R eturns the  logicalID .
  107            * /
  108           @T ransient
  109           pu blic Strin g getLogic alID() {
  110                    retu rn logical ID;
  111           }
  112  
  113           /* *
  114            *  @param lo gicalID
  115            *              The logi calID to s et.
  116            * /
  117           pu blic void  setLogical ID(String  logicalID)  {
  118                    this .logicalID  = logical ID;
  119           }
  120  
  121           /* *
  122            *  @return R eturns the  anonymous .
  123            * /
  124           @T ransient
  125           pu blic boole an isAnony mous() {
  126                    retu rn anonymo us;
  127           }
  128  
  129           /* *
  130            *  @param an onymous
  131            *              The anon ymous to s et.
  132            * /
  133           pu blic void  setAnonymo us(boolean  anonymous ) {
  134                    this .anonymous  = anonymo us;
  135           }
  136  
  137           /* *
  138            *  Builds a  string rep resentatio n of a use r informat ion
  139            *  
  140            *  @see gov. va.med.fw. model.Abst ractEntity #buildToSt ring(org.a pache.comm ons.lang.b uilder.ToS tringBuild er)
  141            * /
  142           pr otected vo id buildTo String(ToS tringBuild er builder ) {
  143                    buil der.append ("userID",  getUserID ());
  144                    buil der.append ("logicalI D", getLog icalID());
  145                    buil der.append ("pwd", ge tPassword( ));
  146                    buil der.append ("security Code", get SecurityCo de());
  147                    buil der.append ("anonymou s", isAnon ymous());
  148           }
  149  
  150           /* *
  151            *  @return R eturns the  verified.
  152            * /
  153           @T ransient
  154           pu blic boole an isVerif ied() {
  155                    retu rn verifie d;
  156           }
  157  
  158           /* *
  159            *  @param ve rified
  160            *              The veri fied to se t.
  161            * /
  162           vo id setVeri fied(boole an verifie d) {
  163                    this .verified  = verified ;
  164           }
  165           
  166           pu blic Strin g hashUser Credential s() throws  Exception  {
  167                    Hash Summary ha shSummary  = HashUtil s.hash(pas sword, get UserID().t oUpperCase (), HashUt ils.DEFAUL T_ALGORITH M);
  168                    this .password  = hashSumm ary.getHas hSummary() ;
  169                    retu rn passwor d;
  170           }
  171   }