Examples of AuthFailed


Examples of org.jayasoft.woj.common.model.security.AuthFailed

        try {
            auth = ssp.getAuthentificationService().authenticate();
            if (auth instanceof AuthSuccessfull) {
                log("Congratulations! your woj ant plugin installation is successful");
            } else if (auth instanceof AuthFailed) {
                AuthFailed authFailed = (AuthFailed)auth;
                log("Sorry, your authentication failed: "+authFailed.getReasonMessage());
            } else {
                log("Sorry, your authentication failed. Check your user and passwd settings. Server answer: "+auth);
            }
        } catch (ServiceException e) {
            throw new BuildException(e);
View Full Code Here

Examples of org.jayasoft.woj.common.model.security.AuthFailed

        UnifiedAuthentificationService uas = getUnifiedAuthentificationService();
        if (uas.getUAK() == null && uas.getUsername() != null) {
            try {
                Authentification auth = authenticate();
                if (auth instanceof AuthFailed) {
                    AuthFailed authFailed = (AuthFailed)auth;
                    throw new IllegalArgumentException("authentication failed with: "+uas.getUsername()+": "+authFailed.getReasonMessage());
                }
            } catch (ServiceException e) {
                throw new RuntimeException("automatic authentification failed for "+uas.getUsername(), e);
            }
        }
View Full Code Here

Examples of org.jayasoft.woj.common.model.security.AuthFailed

            _serverConfiguration = success.getExtraParameters();
            setExpirationDate(success.getLicenceExpirationDate());
            return true;
          } else if (auth instanceof AuthFailed) {
            LOGGER.debug("AuthFailed:"+auth); //$NON-NLS-1$
            AuthFailed failed = (AuthFailed) auth;
            _serverVersion = (String) failed.getExtraParameter(Authentification.SERVER_VERSION);
            resetLoginInfos();
            switch (failed.getReasonCode()) {
            case AuthFailed.BAD_AUTHENTIFICATION_INFO:
              throw new NotSignedException(Messages.getString("services.error.badlogin"), failed.getReasonCode()); //$NON-NLS-1$
            case AuthFailed.LICENCE_EXPIRED:
              throw new NotSignedException(Messages.getString("services.error.licenseexpired"), failed.getReasonCode());       //$NON-NLS-1$
            case AuthFailed.SERVER_UNDER_MAINTENANCE:
              throw new NotSignedException(Messages.getString("services.error.servernotreachable"), failed.getReasonCode());                                //$NON-NLS-1$
            case AuthFailed.ACCOUNT_BLOCKED:
              throw new NotSignedException(Messages.getString("services.error.account.suspended")+"\n"+failed.getReasonMessage(), failed.getReasonCode());                                //$NON-NLS-1$ //$NON-NLS-2$
            default:
              throw new NotSignedException(Messages.getString("services.error.unknow")+failed.getReasonMessage(), failed.getReasonCode()); //$NON-NLS-1$
            }
          }
        }
        return false;
    }
View Full Code Here

Examples of org.jayasoft.woj.common.model.security.AuthFailed

            LOGGER.error("error occured while authentifying "+userName, e);
            return newAuthFailed(AuthFailed.ERROR, "An error occured :" +e.getMessage());
        }
    }
    private Authentification newAuthFailed(int code, String message) {
      AuthFailed af = new AuthFailed(code, message);
      af.addExtraParameters(Authentification.SERVER_VERSION, WOJServer.getVersion());
    return af;
  }
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.