Examples of LoginResult


Examples of cn.com.zjtelecom.smgp.server.result.LoginResult

    }

    public LoginResult onLogin(Login login) {
      Display.DisplayLogin(login, accountconfig);
      if (accountconfig.getPassword(login.Account) == null) {
        return (new LoginResult(52, "", ServerVersion, ""));
      } else if (Key.checkAuth(login.AuthenticatorClient, login.Account,
          accountconfig.getPassword(login.Account), String
              .valueOf(login.timestamp)) == false) {
        return (new LoginResult(21, "", ServerVersion, ""));
      } else if (!accountconfig.getIpAddress(login.Account).equals(
          login.ipaddress)) {
        return (new LoginResult(20, "", ServerVersion, ""));
      }

      return (new LoginResult(0,
          accountconfig.getPassword(login.Account), ServerVersion,
          accountconfig.getSPNum(login.Account)));
    }
View Full Code Here

Examples of cn.com.zjtelecom.smgp.server.result.LoginResult

  }

  public LoginResult onLogin(Login login,
      ServerHandleConnect serverHandleConnect) {
    LoginResult loginresult = this.serverEventInterface.onLogin(login);
    if (loginresult.getStatus() == 0) {
      this.spnum2Account.put(loginresult.getSpNum(), login.Account + "$"
          + login.ipaddress);
      this.connected(login.Account, login.ipaddress, serverHandleConnect);
    }

    return loginresult;
View Full Code Here

Examples of cn.com.zjtelecom.smgp.server.result.LoginResult

            byte[] AuthenticatorClient = loginMessage
                .getAuthenticatorClient();
            Login login = new Login(loginMessage, this.ipaddress);

            LoginResult loginresult = this.serversim.onLogin(login,
                this);
            LoginRespMessage loginRespMessage = new LoginRespMessage(
                SequenceId, loginresult.getStatus(),
                AuthenticatorClient, loginresult.getShareKey(),
                loginresult.getServerVersion());
            SendBuf(loginRespMessage.getBuf());

            // �����Ѿ�����
            if (loginresult.getStatus() == 0) {

              this.account = login.Account;
              this.hasLogin = true;
              this.setLoginMode(login.LoginMode);
            } else {
View Full Code Here

Examples of com.azwul.api.model.result.LoginResult

    HttpResult checkLoggedResult = httpHelper.doGet("/basic/checkLogged",
        httpConfiguration, token);
    String resLogin = ResponseUtil.getBasicResponse(checkLoggedResult);

    String resLoginSplit[] = resLogin.split("\\s");
    LoginResult loginResult = new LoginResult();
    loginResult.setBasicResponse(resLogin);
    loginResult.setHttpResult(checkLoggedResult);

    if ("OK".equals(resLoginSplit[1])) {
      loginResult.setOk(true);
    }

    return loginResult;
  }
View Full Code Here

Examples of com.azwul.api.model.result.LoginResult

  protected SignatureResult sendRmail(AzRmailTransaction azRmailTransaction,
      Credentials credentials, SessionToken sessionToken,
      boolean keepAlive) {

    if (credentials != null) {
      LoginResult loginResult = login(credentials);
      sessionToken = loginResult.getHttpResult().getSessionToken();

    }

    Map<String, String> params = new HashMap<String, String>();
    params.put("recipientEmail", azRmailTransaction.getRecipientEmail());
View Full Code Here

Examples of com.azwul.api.model.result.LoginResult

      boolean isMailAttachement, StoreStrategy storeStrategy,
      Credentials credentials, SessionToken sessionToken,
      boolean keepAlive) {

    if (credentials != null) {
      LoginResult loginResult = login(credentials);
      if (loginResult.isOk()) {
        sessionToken = loginResult.getHttpResult().getSessionToken();
      } else {
        SignatureResult result = new SignatureResult();
        result.setHttpResult(loginResult.getHttpResult());
        result.setBasicResponse(loginResult.getBasicResponse());
        return result;
      }
    }

    Map<String, String> params = new HashMap<String, String>();
View Full Code Here

Examples of com.azwul.api.model.result.LoginResult

  protected SignatureResult doSign(AzDealTransaction azDealTransaction,
      Credentials credentials, SessionToken sessionToken,
      boolean keepAlive) {

    if (credentials != null) {
      LoginResult loginResult = login(credentials);
      sessionToken = loginResult.getHttpResult().getSessionToken();
    }

    Map<String, String> params = new HashMap<String, String>();
    int i = 0;
    String recipientEmailString = "";
View Full Code Here

Examples of com.azwul.api.model.result.LoginResult

  protected SignatureResult processSign(String dealId, String message,
      Credentials credentials, SessionToken sessionToken,
      boolean keepAlive) {

    if (credentials != null) {
      LoginResult loginResult = login(credentials);
      sessionToken = loginResult.getHttpResult().getSessionToken();
    }

    Map<String, String> params = new HashMap<String, String>();
    params.put("dealId", dealId);
    params.put("message", message);
View Full Code Here

Examples of com.data2semantics.yasgui.shared.LoginResult

 
  public LoginResult login(String appBaseUrl, boolean inDebugMode, String openIdURL) throws FetchException {
    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));
      }
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
      throw new FetchException(e.getMessage(), e);
    } catch (FileNotFoundException e) {
      e.printStackTrace();
      throw new FetchException(e.getMessage(), e);
    } catch (JSONException e) {
      e.printStackTrace();
      throw new FetchException(e.getMessage(), e);
    } catch (SQLException e) {
      e.printStackTrace();
      throw new FetchException(e.getMessage(), e);
    } catch (IOException e) {
      e.printStackTrace();
      throw new FetchException(e.getMessage(), e);
    } catch (ParseException e) {
      e.printStackTrace();
      throw new FetchException(e.getMessage(), e);
    } catch (OpenIdException e) {
      //not logged in
      loginResult.setIsLoggedIn(false);
      loginResult.setAuthenticationLink(OpenIdServlet.getAuthenticationURL(openIdURL, appBaseUrl, inDebugMode));
    }
    return loginResult;
   
  }
View Full Code Here

Examples of com.github.ebnew.ki4so.core.service.LoginResult

      return mv;
    }
    //提供了用户凭据
    else{
      //调用核心结果进行凭据认证。
      LoginResult result = ki4soService.login(credential);
      //将验证结果转换为视图输出结果。
      mv = loginResultToView.loginResultToView(mv, result, request, response);
    }
    return mv;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.