/** * Load user with login from repository and verify the password... * * @param rep * @param login * @param passwd * @throws KettleException */ public IUser loadUserInfo( IUser userInfo, String login, String passwd ) throws KettleException { if ( userInfo == null || login == null || login.length() <= 0 ) { throw new KettleDatabaseException( BaseMessages.getString( PKG, "UserInfo.Error.IncorrectPasswortLogin" ) ); } try { loadUserInfo( userInfo, login ); } catch ( KettleException ke ) { throw new KettleAuthException( BaseMessages.getString( PKG, "UserInfo.Error.IncorrectPasswortLogin" ) ); } // Verify the password: // decrypt password if needed and compare with the one String userPass = Encr.decryptPasswordOptionallyEncrypted( passwd ); if ( userInfo.getObjectId() == null || !userInfo.getPassword().equals( userPass ) ) { throw new KettleAuthException( BaseMessages.getString( PKG, "UserInfo.Error.IncorrectPasswortLogin" ) ); } return userInfo; }