Package com.data2semantics.yasgui.shared

Examples of com.data2semantics.yasgui.shared.UserDetails


   * @throws FileNotFoundException
   * @throws ClassNotFoundException
   * @throws ParseException
   */
  public static UserDetails getRequestUserInfo(File configDir, HttpServletRequest request) throws ClassNotFoundException, FileNotFoundException, JSONException, SQLException, IOException, ParseException {
    UserDetails userDetails = new UserDetails();
    userDetails.setOpenId(HttpCookies.getCookieValue(request, openIdCookieName));
    userDetails.setUniqueId(HttpCookies.getCookieValue(request, uniqueIdCookieName));
    if (userDetails.getOpenId() != null && userDetails.getUniqueId() != null) {
      //get more info
      DbHelper db = new DbHelper(configDir, request);
      userDetails = db.getUserDetails(userDetails);
    }
   
View Full Code Here


      System.out.println("getting verified id");
      Identifier id = verification.getVerifiedId();
     
      if (id != null) {
        System.out.println("id found");
        UserDetails userDetails = new UserDetails();
        userDetails.setUniqueId(HttpCookies.getCookieValue(request, uniqueIdCookieName));
        userDetails.setOpenId(id.getIdentifier());
        AuthSuccess authSuccess = (AuthSuccess) verification.getAuthResponse();
        System.out.println("retrieved auth response");
        if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
          System.out.println("doing stuff for auth extension");
          MessageExtension ext = authSuccess.getExtension(AxMessage.OPENID_NS_AX);
View Full Code Here

    LOGGER.info("trying to log in for " + openIdURL);
    HttpServletRequest request = getThreadLocalRequest();
    LOGGER.info("we have the request. now pass it on to openid servlet");
    LoginResult loginResult = new LoginResult();
    try {
      UserDetails userDetails;
      userDetails = OpenIdServlet.getRequestUserInfo(new File(getServletContext().getRealPath("/")), request);
      if (userDetails.isLoggedIn()) {
        loginResult.setIsLoggedIn(true);
      } else {
        //not logged in
        loginResult.setIsLoggedIn(false);
        loginResult.setAuthenticationLink(OpenIdServlet.getAuthenticationURL(openIdURL, appBaseUrl, inDebugMode));
View Full Code Here

    }
    return loginResult;
   
  }
  public UserDetails getCurrentUser() throws OpenIdException {
    UserDetails details = new UserDetails();
    try {
      details = OpenIdServlet.getRequestUserInfo(new File(getServletContext().getRealPath("/")), getThreadLocalRequest());
    } catch (Exception e) {
      //do nothing. just use empty user details
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.data2semantics.yasgui.shared.UserDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.