Produced by Araxis Merge on 1/19/2019 1:19:09 PM 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | VIRP_Build_6_Dec_2018_CG.zip\Registries VIRP Web Site\Custom\BPR\Registrants | Login.aspx.cs | Thu Jan 17 17:40:54 2019 UTC |
| 2 | VIRP_Build_6_Dec_2018_CG.zip\Registries VIRP Web Site\Custom\BPR\Registrants | Login.aspx.cs | Sat Jan 19 17:20:18 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 488 |
| Changed | 1 | 10 |
| 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 | using Syst em; | |
| 2 | using Syst em.Collect ions.Gener ic; | |
| 3 | using Syst em.Linq; | |
| 4 | using Syst em.Web; | |
| 5 | using Syst em.Web.UI; | |
| 6 | using Syst em.Web.UI. WebControl s; | |
| 7 | //using Ve teransAffa irs.Regist ries.Busin ess; | |
| 8 | //using Ve teransAffa irs.Regist ries.Busin essAHOBPR; | |
| 9 | //using Ve teransAffa irs.Regist ries.Busin essManager ; | |
| 10 | //using Ve teransAffa irs.Regist ries.Busin essManager AHOBPR; | |
| 11 | using Anti XssEnc = M icrosoft.S ecurity.Ap plication; | |
| 12 | ||
| 13 | namespace VIRP_WEB.C ustom.BPR. Registrant s | |
| 14 | { | |
| 15 | public partial c lass Login : BprBase Page | |
| 16 | { | |
| 17 | // #region Me ssages | |
| 18 | ||
| 19 | // private co nst String CreateAcc ountError = "There w as an erro r creating your acco unt. " + | |
| 20 | // "Pleas e contact the AHOBPR Clinical Portal Reg istry Mana ger/Help D esk. " + | |
| 21 | // "Email & Phone # go here." ; | |
| 22 | // private co nst String WaitingFo rAuthoriza tion = "If you have a VistA ac count, cli ck below t o validate you crede ntials. On ce your Vi stA creden tials are validated your accou nt will be approved. <br /> "; | |
| 23 | // private co nst String VistaLogi nFailureNe wAccount = "Your Vis tA Credent ials canno t be valid ated. " + | |
| 24 | // "Try a gain or se lect 'I do n't have a VistA acc ount'"; | |
| 25 | // private co nst String VistaLogi nFailureEx istingAcco unt = "If you have a VistA acc ount, clic k below to validate you creden tials. Onc e your Vis tA credent ials are v alidated y our accoun t will be approved." ; | |
| 26 | // private co nst String AccountDi sabled = " Your accou nt has bee n disabled . <br />I f you have a VistA a ccount, cl ick below to validat e you cred entials. O nce your V istA crede ntials are validated your acco unt will b e approved . <br /> "; | |
| 27 | // private co nst String VistaLogi nMessage = "Vista cr edentials are valida ted annual ly. " + | |
| 28 | // "In or der to con tinue acce ssing the AHOBPR Cli nical Port al, please verify yo ur VistA c redentials ."; | |
| 29 | // private co nst String ContactIn fo = "If y ou don’t h ave a Vist A account contact th e AHOBPR H elp Desk ( 877) 470-5 947 -Weekd ays 7a.m. – 7p.m (CT )."; | |
| 30 | // private co nst String ContactIn foPending = "If you don’t have a VistA a ccount, y our accoun t is pendi ng approva l. Contac t the AHOB PR Help De sk (877) 4 70-5947 -W eekdays 7a .m. – 7p.m (CT)."; | |
| 31 | ||
| 32 | // #endregion | |
| 33 | ||
| 34 | // #region Ev ents | |
| 35 | ||
| 36 | // protected void Page_ Load(objec t sender, EventArgs e) | |
| 37 | // { | |
| 38 | // UserSe ssion.GuiC ontrols = null; | |
| 39 | // if (!I sPostBack) | |
| 40 | // { | |
| 41 | // if (!string. IsNullOrEm pty(UserSe ssion.Logi nMessage)) | |
| 42 | // { | |
| 43 | // DisplayM essage(Use rSession.L oginMessag e); | |
| 44 | // UserSess ion.LoginM essage = s tring.Empt y; | |
| 45 | // return; | |
| 46 | // } | |
| 47 | ||
| 48 | // Di splayMessa ge(null); | |
| 49 | // Ch eckLogin() ; | |
| 50 | ||
| 51 | // st ring rStri ng = GetVi staLoginAd dress(); | |
| 52 | // vi staLoginBt n.PostBack Url = rStr ing; | |
| 53 | // } | |
| 54 | // } | |
| 55 | ||
| 56 | // protected void creat eAcctBtn_C lick(Objec t sender, EventArgs e) | |
| 57 | // { | |
| 58 | // Respon se.Redirec t("CreateA ccount.asp x"); | |
| 59 | // } | |
| 60 | ||
| 61 | // protected void devLo ginBtn_Cli ck(Object sender, Ev entArgs e) | |
| 62 | // { | |
| 63 | // String username = ((LinkBu tton)sende r).Command Argument; | |
| 64 | // HttpCo ntext.Curr ent.User = new Syste m.Security .Principal .GenericPr incipal( | |
| 65 | // ne w System.S ecurity.Pr incipal.Ge nericIdent ity(userna me), new S tring[] { }); | |
| 66 | // System .Threading .Thread.Cu rrentPrinc ipal = Htt pContext.C urrent.Use r; | |
| 67 | // Respon se.Cookies .Add(new H ttpCookie( "Debug-Use rName", us ername)); | |
| 68 | // CheckL ogin(); | |
| 69 | // } | |
| 70 | ||
| 71 | // protected void newUs erBtn_Clic k(Object s ender, Eve ntArgs e) | |
| 72 | // { | |
| 73 | // string username = HttpCont ext.Curren t.User.Get CurrentUse rNameWitho utDomain() + DateTim e.Now.Mill isecond.To String(); | |
| 74 | // HttpCo ntext.Curr ent.User = new Syste m.Security .Principal .GenericPr incipal( | |
| 75 | // ne w System.S ecurity.Pr incipal.Ge nericIdent ity(userna me), new S tring[] { }); | |
| 76 | // System .Threading .Thread.Cu rrentPrinc ipal = Htt pContext.C urrent.Use r; | |
| 77 | // Respon se.Cookies .Add(new H ttpCookie( "Debug-Use rName", us ername)); | |
| 78 | // CheckL ogin(); | |
| 79 | // } | |
| 80 | ||
| 81 | // #endregion | |
| 82 | ||
| 83 | // #region Pa ge Setup | |
| 84 | ||
| 85 | // private vo id Display Message(St ring messa ge) | |
| 86 | // { | |
| 87 | // if (!s tring.IsNu llOrEmpty( UserSessio n.LoginMes sage)) | |
| 88 | // { | |
| 89 | // me ssage = Us erSession. LoginMessa ge; | |
| 90 | // } | |
| 91 | // if (me ssage != n ull) | |
| 92 | // { | |
| 93 | // ne wUserLogin Pnl.Visibl e = false; | |
| 94 | // sw itch (mess age) | |
| 95 | // { | |
| 96 | // case "Cr eateAccoun tError": | |
| 97 | // logi nMessageLb l.Text = C reateAccou ntError; | |
| 98 | // brea k; | |
| 99 | // case "Wa itingForAu thorizatio n": | |
| 100 | // logi nMessageLb l.Text = W aitingForA uthorizati on; | |
| 101 | // logi nMessage2L bl.Text = ContactInf oPending; | |
| 102 | // newU serLoginPn l.Visible = true; | |
| 103 | // brea k; | |
| 104 | // case "Vi staLoginFa ilureExist ingAccount ": | |
| 105 | // logi nMessageLb l.Text = V istaLoginF ailureExis tingAccoun t; | |
| 106 | // brea k; | |
| 107 | // case "Vi staLoginFa ilureNewAc count": | |
| 108 | // logi nMessageLb l.Text = V istaLoginF ailureNewA ccount; | |
| 109 | // brea k; | |
| 110 | // case "Ac countDisab led": | |
| 111 | // logi nMessageLb l.Text = A ccountDisa bled; | |
| 112 | // logi nMessage2L bl.Text = ContactInf o; | |
| 113 | // newU serLoginPn l.Visible = true; | |
| 114 | // brea k; | |
| 115 | // case "Vi staLoginMe ssage": | |
| 116 | // logi nMessageLb l.Text = V istaLoginM essage; | |
| 117 | // logi nMessage2L bl.Text = ContactInf o; | |
| 118 | // newU serLoginPn l.Visible = true; | |
| 119 | // brea k; | |
| 120 | // } | |
| 121 | // Us erSession. LoginMessa ge = strin g.Empty; | |
| 122 | // } | |
| 123 | // } | |
| 124 | ||
| 125 | pu blic overr ide string TopMenuNa me() | |
| 126 | { | |
| 127 | return s tring.Empt y; | |
| 128 | } | |
| 129 | ||
| 130 | pu blic overr ide string MenuItemN ame() | |
| 131 | { | |
| 132 | return s tring.Empt y; | |
| 133 | } | |
| 134 | ||
| 135 | pu blic overr ide string AppObject Code() | |
| 136 | { | |
| 137 | return s tring.Empt y; | |
| 138 | } | |
| 139 | ||
| 140 | // #endregion | |
| 141 | ||
| 142 | // private vo id CheckLo gin() | |
| 143 | // { | |
| 144 | // //Dete rmine whet her the us er exists: | |
| 145 | // //Try pulling th e user fro m the main user tabl e: | |
| 146 | // string userId = HttpContex t.Current. User.GetCu rrentUserN ameWithout Domain(); | |
| 147 | // string Registry = Helpers. GetConfigE ntry("Regi stry"); | |
| 148 | // UserAc countManag er mainUse r = new Us erAccountM anager(use rId, Regis try); | |
| 149 | ||
| 150 | // //now determine if they're an AHOBPR user: | |
| 151 | // AHOBPR UserManage r userMana ger = new AHOBPRUser Manager(); | |
| 152 | // AHOBPR _USER ahob prUser = u serManager .GetUser(m ainUser.Us erId); | |
| 153 | // if (ma inUser.Use rId == 0 | | ahobprUs er == null ) | |
| 154 | // { | |
| 155 | // // Then this user does not have a n account in the sys tem. | |
| 156 | // // Redirect t hem to the create ac count page : | |
| 157 | // Re sponse.Red irect("Cre ateAccount .aspx"); | |
| 158 | // } | |
| 159 | ||
| 160 | // //The user does have a sta ndard logi n, set the current u ser & prin cipal: | |
| 161 | // HttpCo ntext.Curr ent.User = mainUser; | |
| 162 | // System .Threading .Thread.Cu rrentPrinc ipal = mai nUser; | |
| 163 | ||
| 164 | // switch (ahobprUs er.IsValid ()) | |
| 165 | // { | |
| 166 | // ca se AhobprE xtensions. LoginResul ts.New: | |
| 167 | // DeleteUs erCookie() ; | |
| 168 | // Response .Redirect( "CreateAcc ount.aspx" ); | |
| 169 | // break; | |
| 170 | // ca se AhobprE xtensions. LoginResul ts.Disable d: | |
| 171 | // DisplayM essage("Ac countDisab led"); | |
| 172 | // DeleteUs erCookie() ; | |
| 173 | // break; | |
| 174 | // ca se AhobprE xtensions. LoginResul ts.Disable d90Days: | |
| 175 | // //Disabl e the acco unt: | |
| 176 | // userMana ger.Enable Account(ah obprUser, false); | |
| 177 | // //Redire ct to the VISTA logi n page | |
| 178 | // DisplayM essage("Ac countDisab led"); | |
| 179 | // DeleteUs erCookie() ; | |
| 180 | // break; | |
| 181 | // ca se AhobprE xtensions. LoginResul ts.Disable dVista: | |
| 182 | // DisplayM essage("Vi staLoginMe ssage"); | |
| 183 | // DeleteUs erCookie() ; | |
| 184 | // break; | |
| 185 | // ca se AhobprE xtensions. LoginResul ts.Pending : | |
| 186 | // DisplayM essage("Wa itingForAu thorizatio n"); | |
| 187 | // DeleteUs erCookie() ; | |
| 188 | // break; | |
| 189 | // ca se AhobprE xtensions. LoginResul ts.Valid: | |
| 190 | // Successf ulLogin(); | |
| 191 | // break; | |
| 192 | // } | |
| 193 | // } | |
| 194 | ||
| 195 | // private vo id Success fulLogin() | |
| 196 | // { | |
| 197 | // //Upda te Last Lo gin value for this u ser: | |
| 198 | // AHOBPR UserManage r userMana ger = new AHOBPRUser Manager(); | |
| 199 | // AHOBPR _USER ahob prUser = u serManager .GetUser(( (VeteransA ffairs.Reg istries.Bu sinessMana ger.UserAc countManag er)HttpCon text.Curre nt.User).U serId); | |
| 200 | // userMa nager.Upda teLogin(ah obprUser); | |
| 201 | // UserSe ssion.Curr entUser = ahobprUser ; | |
| 202 | ||
| 203 | // if (Re quest.Cook ies["Curre ntUser"] = = null) | |
| 204 | // { | |
| 205 | // Ht tpCookie n ewCookie = new HttpC ookie("Cur rentUser", HttpConte xt.Current .User.GetC urrentUser NameWithou tDomain()) ; | |
| 206 | // ne wCookie.Ex pires = Da teTime.Now .AddMinute s(30); | |
| 207 | // Re sponse.Coo kies.Add(n ewCookie); | |
| 208 | ||
| 209 | // Re sponse.Red irect("log in.aspx"); | |
| 210 | // } | |
| 211 | // else | |
| 212 | // { | |
| 213 | // Ht tpCookie n ewCookie = new HttpC ookie("Cur rentUser", HttpConte xt.Current .User.GetC urrentUser NameWithou tDomain()) ; | |
| 214 | // ne wCookie.Ex pires = Da teTime.Now .AddMinute s(30); | |
| 215 | // Re sponse.Coo kies.Add(n ewCookie); | |
| 216 | ||
| 217 | // Re sponse.Red irect("Reg istrantSea rch.aspx") ; | |
| 218 | // } | |
| 219 | // } | |
| 220 | ||
| 221 | // private vo id DeleteU serCookie( ) | |
| 222 | // { | |
| 223 | // HttpCo okie newCo okie = new HttpCooki e("Current User", "x" ); | |
| 224 | // newCoo kie.Expire s = DateTi me.Now.Add Minutes(30 ); | |
| 225 | // Respon se.Cookies .Add(newCo okie); | |
| 226 | // } | |
| 227 | ||
| 228 | // private st ring GetVi staLoginAd dress() | |
| 229 | // { | |
| 230 | // String strFinalU RL = strin g.Empty; | |
| 231 | // String strUserKe y = Conver t.ToBase64 String(Sys tem.Text.A SCIIEncodi ng.ASCII.G etBytes(Ht tpContext. Current.Us er.GetCurr entUserNam eWithoutDo main())); | |
| 232 | // String [] strURLA rray = new String[] | |
| 233 | // { "D evVistaLog in.aspx" + "/" + str UserKey | |
| 234 | // , "https:/ / IP /ahobpr-pr ovider/reg istry" + " /" + strUs erKey | |
| 235 | // , "https:/ / IP /ahobpr-pr ovider/reg istry" + " /" + strUs erKey | |
| 236 | // , "https:/ / IP /ahobpr-pr ovider/reg istry" + " /" + strUs erKey | |
| 237 | // , "https:/ / IP /ahobpr-pr ovider/reg istry" + " /" + strUs erKey | |
| 238 | // , "https:/ / IP /ahobpr-pr ovider/reg istry" + " /" + strUs erKey | |
| 239 | // }; | |
| 240 | ||
| 241 | // String redirect = Helpers. GetConfigE ntry("Vist aLoginAddr ess") + "/ " + strUse rKey; | |
| 242 | ||
| 243 | // if (st rURLArray. Contains(r edirect)) | |
| 244 | // st rFinalURL = redirect ; | |
| 245 | ||
| 246 | // return strFinalU RL; | |
| 247 | // } | |
| 248 | } | |
| 249 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.