login to my.nrao account from advquery.jsp returns to advquery.jsp page : https://archive.nrao.edu/archive/advquery.jsp?ticket=ST-55242-m6TUQUQ57xvYyACNCfKG-localhost advquery.jsp --------------------------------------------------------------------------------------------------------- <% String userID = "00"; String token = "none"; String firstname = "none"; String lastname = "none"; String username = "none"; String announce = "none"; String emailAddr = "none"; String PSTresult = "none"; ArchiveUserInfo archuser = new ArchiveUserInfo(); String userresult = archuser.getUserInfo(request); if (!userresult.equals("none") && !userresult.equals("not_found") && userID.equals("00")) { HttpSession hsess = request.getSession(true); if (hsess.getValue("arch") != null) { ArchiveSession archsess; announce = ((ArchiveSession) hsess.getValue("arch")).getAnnounce(); userID = ((ArchiveSession) hsess.getValue("arch")).getUserID(); token = ((ArchiveSession) hsess.getValue("arch")).getUserToken(); username = ((ArchiveSession) hsess.getValue("arch")).getUserName(); firstname = ((ArchiveSession) hsess.getValue("arch")).getUserFirstName(); lastname = ((ArchiveSession) hsess.getValue("arch")).getUserLastName(); emailAddr = ((ArchiveSession) hsess.getValue("arch")).getUserEmailAddr(); PSTresult = ((ArchiveSession) hsess.getValue("arch")).getUserProposals(); ((ArchiveSession) hsess.getValue("arch")).setAnnounce("session exists"); } else { try { hsess.invalidate(); } catch ( Exception ee ) {}; } } %> <% long thread_id = Thread.currentThread().getId(); boolean sessionExists = false; HttpSession hsess = request.getSession(true); if (hsess.getValue("arch") != null) { sessionExists = true; ArchiveSession archsess; userID = ((ArchiveSession)hsess.getValue("arch")).getUserID(); token = ((ArchiveSession)hsess.getValue("arch")).getUserToken(); username = ((ArchiveSession)hsess.getValue("arch")).getUserName(); PSTresult = ((ArchiveSession)hsess.getValue("arch")).getUserProposals(); } %> ArchiveUserInfo.java ---------------------------------------------------------------------------------- public String getUserInfo (HttpServletRequest request) { here request is from the my.nrao login -- https://archive.nrao.edu/archive/advquery.jsp?ticket=ST-55242-m6TUQUQ57xvYyACNCfKG-localhost got the requestURL .. https://archive.nrao.edu/archive/advquery.jsp?ticket=ST-55242-m6TUQUQ57xvYyACNCfKG-localhost parsed out the ticket. acct_name = vald.validateTicket(ticket, userURL); loginAcctName = acct_name; validated ticket.. has login acct name (jmb_account) XMLstr = fetchUser.ArchiveFetchUserXML(loginAcctName); uses CAS Query URL : https://my.nrao.edu/nrao-2.0/secure/QueryFilter.htm?userByAccountNameEquals parse user first, last name, email addr, userId from XMLstr. get a list of project_codes and proposal codes.. these classes use CAS also.. https://my.nrao.edu/nrao-2.0/secure/QueryFilter.htm?getLegacyIdByUser try { PSTresult1 = fetchProjects.ArchiveFetchUserProjects(token, userID); PSTresult2 = fetchProposals.ArchiveFetchUserProposals(token, userID); } catch (Exception e) {..}