Package org.butor.realm

Examples of org.butor.realm.RealmException


   * @throws RealmException if password reset fail.
   */
  public boolean resetPassword(String username_) throws RealmException {
 
    if (StringUtil.isEmpty(username_)) {
      throw new RealmException("Missing username arg!");
    }
   
    Properties props = _realmService.getUserProfile(username_);
    if (props == null) {
      throw new RealmException(String.format("Cannot find user (%s)!", username_));
    }

    String email = props.getProperty(RealmConstants.EMAIL);
    if (StringUtil.isEmpty(email)) {
      throw new RealmException("User's email is not defined!");
    }

    String newPassword = Long.toString(System.currentTimeMillis());
    if (!_realmService.resetPassword(username_, newPassword, null)) {
      return false;
View Full Code Here


      throw new IllegalArgumentException("Last name must be defined.");
    }
  }
  public String authenticate(String id_, String pwd_) throws RealmException {
    if (_ssoManager == null)
      throw new RealmException("SSO Manager was not set!");
   
    if (!_realmService.authenticate(id_, pwd_)) {
      return null;
    }
   
View Full Code Here

    return ssi.getSsoId();
  }
  public boolean logout(String ssoId_) throws RealmException {
    if (_ssoManager == null)
      throw new RealmException("SSO Manager was not set!");

    SSOInfo ss = _ssoManager.destroySSOSession(ssoId_);

    return ss != null;
  }
View Full Code Here

    return ss != null;
  }
  public boolean changePassword(String id_, String pwd_, String newPwd_) throws RealmException {
    if (_ssoManager == null)
      throw new RealmException("SSO Manager was not set!");

    if (_realmService.changePassword(id_, pwd_, newPwd_)) {
      return true;
    }
View Full Code Here

    return false;
  }

  public boolean checkSso(String ssoId_) throws RealmException {
    if (_ssoManager == null)
      throw new RealmException("SSO Manager was not set!");

    SSOInfo ss = _ssoManager.getSSOSession(ssoId_);
    return ss != null;
  }
View Full Code Here

    SSOInfo ss = _ssoManager.getSSOSession(ssoId_);
    return ss != null;
  }
  public SSOInfo getSsoSession(String ssoId_) throws RealmException {
    if (_ssoManager == null)
      throw new RealmException("SSO Manager was not set!");

    return _ssoManager.getSSOSession(ssoId_);
  }
View Full Code Here

TOP

Related Classes of org.butor.realm.RealmException

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.