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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | MHV_2017.2.0.0 Code In Flight.zip\Admin Portal Redesign\mhv_admin_hooks\mhv-liferay-ssoi-hook\src\main\java\gov\va\med\mhv\sso\api\security | HttpSessionScreenNameClientRequestFilter.java | Fri Dec 9 23:09:32 2016 UTC |
| 2 | MHV_2017.2.0.0 Code In Flight.zip\Admin Portal Redesign\mhv_admin_hooks\mhv-liferay-ssoi-hook\src\main\java\gov\va\med\mhv\sso\api\security | HttpSessionScreenNameClientRequestFilter.java | Fri Mar 24 19:27:48 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 120 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | /** | |
| 2 | * | |
| 3 | *//* | |
| 4 | package go v.va.med.m hv.sso.api .security; | |
| 5 | ||
| 6 | import jav a.io.IOExc eption; | |
| 7 | ||
| 8 | import jav ax.servlet .http.Http Session; | |
| 9 | import jav ax.ws.rs.c lient.Clie ntRequestC ontext; | |
| 10 | import jav ax.ws.rs.c lient.Clie ntRequestF ilter; | |
| 11 | ||
| 12 | import com .liferay.p ortal.kern el.log.Log ; | |
| 13 | import com .liferay.p ortal.kern el.log.Log FactoryUti l; | |
| 14 | import com .liferay.p ortal.kern el.servlet .PortalSes sionThread Local; | |
| 15 | ||
| 16 | import gov .va.med.mh v.sso.Lega cyAutoLogi n; | |
| 17 | ||
| 18 | *//** | |
| 19 | * @author DNS | |
| 20 | * | |
| 21 | *//* | |
| 22 | public cla ss HttpSes sionScreen NameClient RequestFil ter implem ents Clien tRequestFi lter { | |
| 23 | ||
| 24 | pr ivate stat ic final L og LOGGER = LogFacto ryUtil.get Log(HttpSe ssionScree nNameClien tRequestFi lter.class ); | |
| 25 | ||
| 26 | pr ivate stat ic final S tring API_ APP_KEY = "appToken" ; | |
| 27 | pr ivate stat ic final S tring API_ MHV_USERNA ME_KEY = " mhvUsernam e"; | |
| 28 | pr ivate stat ic final S tring SESS ION_USERNA ME_KEY = " LIFERAY_SH ARED_useri d"; | |
| 29 | pr ivate stat ic final S tring APP_ TOKEN = "M yHealth3Ve t123"; | |
| 30 | ||
| 31 | ||
| 32 | * (non-Java doc) | |
| 33 | * | |
| 34 | * @see java x.ws.rs.cl ient.Clien tRequestFi lter#filte r(javax.ws .rs.client . | |
| 35 | * ClientReq uestContex t) | |
| 36 | ||
| 37 | @O verride | |
| 38 | pu blic void filter(Cli entRequest Context re questConte xt) throws IOExcepti on { | |
| 39 | try { | |
| 40 | HttpSe ssion sess ion = Port alSessionT hreadLocal .getHttpSe ssion(); | |
| 41 | String mhvUserna me = (Stri ng) sessio n.getAttri bute(Legac yAutoLogin .ATTR_SCRE EN_NAME); | |
| 42 | ||
| 43 | if (mh vUsername == null) { | |
| 44 | throw ne w IOExcept ion("Unabl e to get m hvCorrelat ionId or m hvUsername from sess ion"); | |
| 45 | } | |
| 46 | ||
| 47 | if (LO GGER.isDeb ugEnabled( ) && mhvUs ername != null) { | |
| 48 | LOGGER.d ebug("Addi ng '" + AP I_APP_KEY + "' and ' " + API_MH V_USERNAME _KEY | |
| 49 | + "' to API Client Req uest for " + API_MHV _USERNAME_ KEY + " " + mhvUsern ame); | |
| 50 | } | |
| 51 | ||
| 52 | reques tContext.g etHeaders( ).add(API_ APP_KEY, A PP_TOKEN); | |
| 53 | reques tContext.g etHeaders( ).add(API_ MHV_USERNA ME_KEY, mh vUsername) ; | |
| 54 | } ca tch (Excep tion e) { | |
| 55 | throw new IOExce ption("Una ble to acc ess client http sess ion", e); | |
| 56 | } | |
| 57 | ||
| 58 | } | |
| 59 | ||
| 60 | } | |
| 61 | */ |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.