Package org.apache.openmeetings.db.entity.server

Examples of org.apache.openmeetings.db.entity.server.Sessiondata


  }

  public User loginUserByRemoteHash(String SID, String remoteHash) {
    try {

      Sessiondata sessionData = sessiondataDao
          .getSessionByHash(remoteHash);

      if (sessionData != null) {

        User u = usersDao.get(sessionData.getUser_id());

        sessiondataDao.updateUserWithoutSession(SID, u.getUser_id());

        return u;
      }
View Full Code Here


  private UserManager userManager;
 
  @Test
  public void testSendInvitationLink() {
    try {
      Sessiondata sessionData = mService.getsessiondata();
     
      User us = (User) userManager.loginUser(sessionData.getSession_id(), username, userpass, null, null, false);
     
      invitationService.sendInvitationHash(sessionData.getSession_id(), "Testname", "Testlastname", "message", "sebawagner@apache.org",
          "subject", 1L, "", false, "", 1, new Date(), "12:00", new Date(), "14:00", 1L, us.getTimeZoneId(), true);
     
    } catch (Exception err) {
      log.error("[testSendInvitationLink]", err);
    }
View Full Code Here

  }

  public User loginUserByRemoteHash(String SID, String remoteHash) {
    try {

      Sessiondata sessionData = sessiondataDao
          .getSessionByHash(remoteHash);

      if (sessionData != null) {

        User u = getUserById(sessionData.getUser_id());

        sessiondataDao.updateUserWithoutSession(SID, u.getUser_id());

        return u;
      }
View Full Code Here

    //FIXME code is duplicated from MainService, need to be unified
    SOAPLoginDao soapDao = getBean(SOAPLoginDao.class);
    SOAPLogin soapLogin = soapDao.get(secureHash);
    if (soapLogin != null && !soapLogin.getUsed()) { //add code for  || (soapLogin.getAllowSameURLMultipleTimes())
      SessiondataDao sessionDao = getBean(SessiondataDao.class);
      Sessiondata sd = sessionDao.getSessionByHash(soapLogin.getSessionHash());
      if (sd != null && sd.getSessionXml() != null) {
        RemoteSessionObject remoteUser = RemoteSessionObject.fromXml(sd.getSessionXml());
        if (remoteUser != null && !Strings.isEmpty(remoteUser.getExternalUserId())) {
          AdminUserDao userDao = getBean(AdminUserDao.class);
          User user = userDao.getExternalUser(remoteUser.getExternalUserId(), remoteUser.getExternalUserType());
          if (user == null) {
            user = userDao.getNewUserInstance(null);
View Full Code Here

      bind();
    }
  }
 
  public boolean signIn(String login, String password, String ldapConfigFileName) {
    Sessiondata sessData = getBean(SessiondataDao.class).startsession();
    SID = sessData.getSession_id();
    Object _u = Strings.isEmpty(ldapConfigFileName)
        ? getBean(IUserManager.class).loginUser(SID, login, password, null, null, false)
        : getBean(ILdapLoginManagement.class).doLdapLogin(login, password, null, null, SID, ldapConfigFileName);
   
    if (_u instanceof User) {
View Full Code Here

 
  public String getValidatedSid() {
    SessiondataDao sessionDao = getBean(SessiondataDao.class);
    Long _userId = sessionDao.checkSession(SID);
    if (_userId == null || userId != _userId) {
      Sessiondata sessionData = sessionDao.getSessionByHash(SID);
      if (sessionData == null) {
        sessionData = sessionDao.startsession();
      }
      if (!sessionDao.updateUser(sessionData.getSession_id(), userId, false, languageId)) {
        //something bad, force user to re-login
        invalidate();
      } else {
        SID = sessionData.getSession_id();
      }
    }
    return SID;
  }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.server.Sessiondata

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.