Examples of LoginInfo


Examples of nu.fw.jeti.backend.LoginInfo

    for (Iterator<Entry<String,LoginInfo>> i = profiles.entrySet().iterator(); i.hasNext();)
    {
      Entry<String,LoginInfo> entry = i.next();
      String name = (String) entry.getKey();

      LoginInfo temp = (LoginInfo) entry.getValue();
      appendOpenTag(xml, "<profile");
      appendAttribute(xml, "name", name);
      appendAttribute(xml, "server", temp.getServer());
      String password = temp.getPassword();
      if (password != null)
      {
        appendAttribute(xml, "password", encrypt(password, r));
      }
      appendAttribute(xml, "username", temp.getUsername());
      appendAttribute(xml, "resource", temp.getResource());
      appendAttribute(xml, "port", Integer.toString(temp.getPort()));
      appendAttribute(xml, "host", temp.getHost());
      appendAttribute(xml, "ssl", Boolean.toString(temp.isSSl()));
      appendAttribute(xml, "priority", Integer.toString(temp
          .getPriority()));
      appendAttribute(xml, "hideStatusWindow", Boolean.toString(temp
          .hideStatusWindow()));
      if (!temp.useProxy(LoginInfo.NO_PROXY))
      {
        xml.append('>');
        appendOpenTag(xml, "<proxy");
        appendAttribute(xml, "proxyType", Integer.toString(temp.getProxyType()));
        appendAttribute(xml, "proxyServer", temp.getProxyServer());
        appendAttribute(xml, "proxyUsername", temp.getProxyUsername());
        password = temp.getProxyPassword();
        if (password != null && !password.equals(""))
        {
          appendAttribute(xml, "proxyPassword", encrypt(password, r));
        }
        appendAttribute(xml, "proxyPort", temp.getProxyPort());
        appendCloseSymbol(xml);
        appendCloseTag(xml, "</profile>");
      } else appendCloseSymbol(xml);
    }
    appendCloseTag(xml, "</profiles>");
View Full Code Here

Examples of nu.fw.jeti.backend.LoginInfo

  public void endElement(String namespaceURI, String sName,String qName)
  {
    if(qName.equals("profile"))
    {
            profiles.put(name,
                         new LoginInfo(server, host, username, password,
                                       resource, port, ssl,priority,proxyType,
                                       hideStatusWindow, proxyServer,
                                       proxyUsername, proxyPassword,
                                       proxyPort));
        }
View Full Code Here

Examples of nu.fw.jeti.backend.LoginInfo

    cmbProfile.addItemListener(new ItemListener()
    {
      public void itemStateChanged(ItemEvent e)
      {
        String profileName = (String)e.getItem();
        LoginInfo info = profileInfo.getProfile(profileName);
        if(info != null)
        { 
          if(info.getPassword() == null) txtPassword.setEditable(true);
          else txtPassword.setEditable(false);
        }
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            updateEditButton();
          }
        });
      }
    });
    String profileName = Preferences.getString("jeti","profileName",null);
    if(profileName!=null)
    { 
      LoginInfo info = profileInfo.getProfile(profileName);
      if(info != null)
      { 
        cmbProfile.setSelectedItem(profileName);
        if(info.getPassword() == null) txtPassword.setEditable(true);
        else txtPassword.setEditable(false);
      }     
    } 
    updateEditButton();
   
View Full Code Here

Examples of nu.fw.jeti.backend.LoginInfo

    {   
      char[] password = txtPassword.getPassword();
      if(!txtPassword.isEditable() || (password!=null&&password.length>0))
    {
      String profileName = (String)cmbProfile.getSelectedItem();
      LoginInfo info = profileInfo.getProfile(profileName);
      if(info == null)return;
      if(info.getPassword() == null) info.setPassword(new String(password));
      new LoginStatusWindow(info,backend,1);
      Preferences.putString("jeti","profileName",profileName);
      loginWindow=null;
      dispose();
    }
View Full Code Here

Examples of nz.org.winters.appspot.acrareporter.shared.LoginInfo

  @Override
  public LoginInfo login(String requestUri) throws IllegalArgumentException
  {
    UserService userService = UserServiceFactory.getUserService();
    User user = userService.getCurrentUser();
    LoginInfo loginInfo = new LoginInfo();

    loginInfo.setLogoutUrl(userService.createLogoutURL(requestUri));
    loginInfo.setLoginUrl(userService.createLoginURL(requestUri));

   
    if (user != null)
    {
      loginInfo.setEmailAddress(user.getEmail());
      loginInfo.setNickname(user.getNickname());

      if (userService.isUserLoggedIn())
      { // && userService.isUserAdmin()
        loginInfo.setUserAdmin(userService.isUserAdmin());
        AppUser appUser = ObjectifyService.ofy().load().type(AppUser.class).filter("EMailAddress", user.getEmail()).first().now();
        loginInfo.setAppUserShared(appUser == null ? null : appUser);
        decodeAuthString(appUser);

        if (Configuration.appUserMode == Configuration.UserMode.umSingle)
        {
          if (userService.isUserAdmin())
          {
            if (appUser == null)
            {
              appUser = ObjectifyService.ofy().load().type(AppUser.class).first().now();
              if (appUser != null)
              {
                decodeAuthString(appUser);
                if (!appUser.EMailAddress.equals(user.getEmail()))
                {
                  // not the administator.
                  loginInfo.setLoggedIn(false);
                  return loginInfo;
                }
              }

              appUser = new AppUser();
              appUser.EMailAddress = user.getEmail();
              appUser.FirstName = user.getNickname();
              appUser.LastName = "UNKNOWN";
              appUser.City = "";
              appUser.Country = "";
              appUser.isSubscriptionPaid = true;
              appUser.isSuperDude = true;
              appUser.isUser = true;
              ObjectifyService.ofy().save().entity(appUser);
              loginInfo.setLoggedIn(true);
            } else
            {
              loginInfo.setLoggedIn(true);
            }

          } else
          {
            loginInfo.setLoggedIn(false);
            return loginInfo;
          }
        } else if (Configuration.appUserMode == Configuration.UserMode.umMultipleSameApps)
        {
          if (userService.isUserAdmin())
          {
            if (appUser == null)
            {
              appUser = new AppUser();
              appUser.EMailAddress = user.getEmail();
              appUser.FirstName = user.getNickname();
              appUser.LastName = "UNKNOWN";
              appUser.City = "";
              appUser.Country = "";
              appUser.isSubscriptionPaid = true;
              appUser.isSuperDude = true;
              appUser.isUser = true;
              ObjectifyService.ofy().save().entity(appUser);
            }
            loginInfo.setAppUserShared(appUser);
            loginInfo.setLoggedIn(true);
          } else
          {
            loginInfo.setLoggedIn(appUser != null);
            return loginInfo;
          }
        } else
        {
          loginInfo.setLoggedIn(true);
        }

      }
    } else
    {
      loginInfo.setLoggedIn(false);
    }
   
    if(loginInfo.isLoggedIn() && SettingStore.has(Constants.SETTING_DATABASEVERSION) && Integer.parseInt(SettingStore.get(Constants.SETTING_DATABASEVERSION, "1")) < Constants.databaseVersion)
    {
      throw new IllegalArgumentException("Data store needs an upgrade! administrator needs to run dbupgrade scriptlet");
    }

    return loginInfo;
View Full Code Here

Examples of org.jitterbit.integration.client.server.login.LoginInfo

                registerNewServer(evt);
                updateUsersAndGroups();
            }

            private void registerNewServer(LoginEvent evt) {
                LoginInfo loginInfo = evt.getInfo();
                ServerInfo server = loginInfo.getServerInfo();
                LoginCredentials credentials = loginInfo.getLoginCredentials();
                String password = credentials.storePasswordOnClient() ? credentials.getPassword() : null;
                serverStore.storeNewLogin(server, credentials.getUser(), password, credentials.isUsingHttps());
            }

            private void updateUsersAndGroups() {
View Full Code Here

Examples of org.ldv.sio.getap.app.LoginInfo

  }

  private static final class AccProfStatsMapper implements
      RowMapper<LoginInfo> {
    public LoginInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
      LoginInfo loginInfo = new LoginInfo();
      loginInfo.setLastlog(rs.getString("lastlog"));
      loginInfo.setCountlog(rs.getString("countlog"));

      return loginInfo;
    }
View Full Code Here

Examples of org.mbhcare.client.LoginInfo

    DiagnosisDescription value = diagnosis.getKetluanchung();
    value.setDescription(value.getDescription().toUpperCase());
    ketluanchung.setValue(value);   
    ketluanchung.setVisible(view.getKetLuanChungVisible());
   
    LoginInfo info = MBHCare.getLoginInfo();
    if (info != null && info.getName() != null && !info.getName().equals("")) {
      consultantName.setText(info.getName());
    }
    diagnosisType.setText(arrType[diagnosis.getDiagnostictype().intValue()]);
   
    ////titleChandoan.setText(constants.reportKetQuaSieuAm() + " " + diagnosisType.getText().toUpperCase());
    titleChandoan.setText(constants.reportKetQuaSieuAm());
View Full Code Here

Examples of org.teamcascade.java.brjc.api.domain.LoginInfo

  public LoginInfo parse(JSONObject json) throws JSONException {
    final int failedLoginCount = json.optInt("failedLoginCount");
    final int loginCount = json.getInt("loginCount");
    final DateTime lastFailedLoginTime = JsonParseUtil.parseOptionalDateTime(json, "lastFailedLoginTime");
    final DateTime previousLoginTime = JsonParseUtil.parseOptionalDateTime(json, "previousLoginTime");
    return new LoginInfo(failedLoginCount, loginCount, lastFailedLoginTime, previousLoginTime);
  }
View Full Code Here

Examples of org.techo.dgna.utils.LoginInfo

    @Override
    public LoginInfo login(final String requestUri) {
        final UserService userService = UserServiceFactory.getUserService();
        final User user = userService.getCurrentUser();
        final LoginInfo loginInfo = new LoginInfo();
        if (user != null) {
            loginInfo.setLoggedIn(true);
            loginInfo.setName(user.getEmail());
            loginInfo.setLogoutUrl(userService.createLogoutURL(requestUri));
        } else {
            loginInfo.setLoggedIn(false);
            loginInfo.setLoginUrl(userService.createLoginURL(requestUri));
        }
        return loginInfo;
    }
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.