Produced by Araxis Merge on 4/27/2018 2:59:09 PM Central 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 | v2.0_Sprint_15_Build_5.zip\v2.0_Sprint_15_Build_5\Unredacted\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\configuration\security | OAuth2SecurityConfig.java | Tue Apr 24 14:50:46 2018 UTC |
| 2 | v2.0_Sprint_15_Build_5..zip\v2.0_Sprint_15_Build_5\Unredacted\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\configuration\security | OAuth2SecurityConfig.java | Thu Apr 26 14:13:45 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 122 |
| 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 | package go v.va.med.a rs.configu ration.sec urity; | |
| 2 | ||
| 3 | import jav ax.servlet .http.Http ServletRes ponse; | |
| 4 | import jav ax.sql.Dat aSource; | |
| 5 | ||
| 6 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
| 7 | import org .springfra mework.con text.annot ation.Bean ; | |
| 8 | import org .springfra mework.con text.annot ation.Conf iguration; | |
| 9 | import org .springfra mework.sec urity.auth entication .Authentic ationManag er; | |
| 10 | import org .springfra mework.sec urity.conf ig.annotat ion.authen tication.b uilders.Au thenticati onManagerB uilder; | |
| 11 | import org .springfra mework.sec urity.conf ig.annotat ion.web.bu ilders.Htt pSecurity; | |
| 12 | import org .springfra mework.sec urity.conf ig.annotat ion.web.co nfiguratio n.EnableWe bSecurity; | |
| 13 | import org .springfra mework.sec urity.conf ig.annotat ion.web.co nfiguratio n.WebSecur ityConfigu rerAdapter ; | |
| 14 | ||
| 15 | /** | |
| 16 | * | |
| 17 | * @author PI I
|
|
| 18 | * | |
| 19 | */ | |
| 20 | @Configura tion | |
| 21 | @EnableWeb Security | |
| 22 | public cla ss OAuth2S ecurityCon fig extend s WebSecur ityConfigu rerAdapter { | |
| 23 | ||
| 24 | @A utowired | |
| 25 | Da taSource d ataSource; | |
| 26 | ||
| 27 | /* @Autowired | |
| 28 | pu blic void globalUser Details(Au thenticati onManagerB uilder aut h) throws Exception { | |
| 29 | *//* * | |
| 30 | * M odified by Muneshwar Baiah as part Build 1 Sprint2 to store the Oauth2 client de tails | |
| 31 | *// * | |
| 32 | auth .jdbcAuthe ntication( ).dataSour ce(dataSou rce) | |
| 33 | .use rsByUserna meQuery("s elect user name, pass word, enab led from o auth_clien t_info whe re usernam e=?") | |
| 34 | .aut horitiesBy UsernameQu ery("selec t username , authorit y from oa uth_client _authoriti es where u sername=?" ); | |
| 35 | }* / | |
| 36 | ||
| 37 | @A utowired | |
| 38 | pu blic void globalUser Details(Au thenticati onManagerB uilder aut h) throws Exception { | |
| 39 | auth .inMemoryA uthenticat ion() | |
| 40 | .wit hUser("ars ").passwor d("ars").r oles("ADMI N") | |
| 41 | .and () | |
| 42 | .wit hUser("ars 2").passwo rd("ars2") .roles("US ER"); | |
| 43 | } | |
| 44 | ||
| 45 | @O verride | |
| 46 | @B ean | |
| 47 | pu blic Authe nticationM anager aut henticatio nManagerBe an() throw s Exceptio n { | |
| 48 | retu rn super.a uthenticat ionManager Bean(); | |
| 49 | } | |
| 50 | ||
| 51 | @O verride | |
| 52 | pr otected vo id configu re(HttpSec urity http ) throws E xception { | |
| 53 | http .csrf().di sable() | |
| 54 | .exc eptionHand ling() | |
| 55 | .aut henticatio nEntryPoin t((request , response , authExce ption) -> response.s endError(H ttpServlet Response.S C_UNAUTHOR IZED)) | |
| 56 | .and () | |
| 57 | .aut horizeRequ ests() | |
| 58 | .ant Matchers(" /**").auth enticated( ) | |
| 59 | .and () | |
| 60 | .htt pBasic(); | |
| 61 | } | |
| 62 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.