9. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/24/2017 5:17:18 PM 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.

9.1 Files compared

# Location File Last Modified
1 MHV_2017.2.0.0 Code In Flight.zip\National Portal\mhv_common\mhv-common-api\src\main\java\gov\va\med\mhv\common\api\security MHVSecureTokenRequestFilter.java Wed Mar 2 20:37:52 2016 UTC
2 MHV_2017.2.0.0 Code In Flight.zip\National Portal\mhv_common\mhv-common-api\src\main\java\gov\va\med\mhv\common\api\security MHVSecureTokenRequestFilter.java Fri Mar 24 19:56:05 2017 UTC

9.2 Comparison summary

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

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

9.4 Active regular expressions

No regular expressions were active.

9.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.m hv.common. api.securi ty;
  5  
  6   import jav a.io.IOExc eption;
  7  
  8   import jav ax.ws.rs.c lient.Clie ntRequestC ontext;
  9   import jav ax.ws.rs.c lient.Clie ntRequestF ilter;
  10  
  11   import gov .va.med.mh v.common.a pi.cache.C acheHandle r;
  12   import gov .va.med.mh v.common.a pi.enumera tion.Error Enum;
  13   import gov .va.med.mh v.common.a pi.excepti on.MHVExce ption;
  14  
  15   /**
  16    * @author   DNS
  17    *
  18    */
  19   public cla ss MHVSecu reTokenReq uestFilter  implement s ClientRe questFilte r {
  20           
  21           pr ivate stat ic final S tring API_ TOKEN_KEY  = "Token";
  22  
  23           /*  (non-Java doc)
  24            *  @see java x.ws.rs.cl ient.Clien tRequestFi lter#filte r(javax.ws .rs.client .ClientReq uestContex t)
  25            * /
  26           @O verride
  27           pu blic void  filter(Cli entRequest Context re questConte xt) throws  IOExcepti on {
  28                    
  29                    try  {
  30                             
  31                             String  token = C acheHandle r.getInsta nce().getT oken();
  32                             
  33                             if(tok en != null ) {
  34                                      requestC ontext.get Headers(). add(API_TO KEN_KEY, t oken);
  35                             }
  36                             else {
  37                                      throw ne w MHVExcep tion(Error Enum.AUTHE NTICATION_ SESSION_UN AVAILABLE_ 902);
  38                             }
  39                    
  40                    } ca tch (Excep tion e) {
  41                             throw  new IOExce ption("Err or handing  token off  to servic e client." , e);
  42                    }
  43  
  44           }
  45  
  46   }