Examples of Authentification


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

    public static void main(String[] args) throws IOException {
        WojToolsSettings settings = WojToolsSettings.buildInstance(args);
       
        try {
            ClientServerServicesProvider ssp = ClientServerServicesProvider.get(settings.getServer());
            Authentification auth;
            auth = ssp.getAuthentificationService().authenticate(settings.getUserName(), settings.getPassword(), "");
           
            if (auth instanceof AuthSuccessfull) {
                ModuleManagementService mms = ssp.getModuleManagementService();
                AddModuleToWOJ batch = new AddModuleToWOJ(mms);
View Full Code Here

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

        WOJCluster cluster = WOJClusterHelper.buildCluster(3);
        log("using cluster "+cluster+" to access WOJ", Project.MSG_VERBOSE);
        ClientServerServicesProvider ssp = ClientServerServicesProvider.get(cluster);
        UnifiedAuthentificationService.getInstance().setAuthentificationCluster(cluster);
        UnifiedAuthentificationService.getInstance().setLoginInfo(getUser(), getPasswd(), WojAntPlugin.getPluginVersion());
        Authentification auth;
        try {
            auth = ssp.getAuthentificationService().authenticate();
            if (auth instanceof AuthSuccessfull) {
                log("Congratulations! your woj ant plugin installation is successful");
            } else if (auth instanceof AuthFailed) {
View Full Code Here

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

        String userName = CommandUtil.getStringFromParamKey(m, Commands.AUTHENTICATE.P_USER_NAME);       
        String passwd = CommandUtil.getStringFromParamKey(m, Commands.AUTHENTICATE.P_USER_PASS);       
        String mahcineId = CommandUtil.getStringFromParamKey(m, Commands.AUTHENTICATE.P_USER_MACHINE_IDENT);       
        String version = CommandUtil.getStringFromParamKey(m, Commands.AUTHENTICATE.P_PLUGIN_VERSION);
       
        Authentification a = WOJServer.getInstance().getAuthentificationService().authenticate(userName, passwd, mahcineId, version);
       
        //Current server can not serve the request, we send a redirect to the good server
        if(a instanceof AuthNotDone) {
            throw new ServerRedirectException(((AuthNotDone)a).getAuthServer());
        } else {
View Full Code Here

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

        Map p = new HashMap();
        p.put(Commands.AUTHENTICATE.P_USER_NAME, user);
        p.put(Commands.AUTHENTICATE.P_USER_PASS, isPasswordEncoded?password:encodePassword(password));
        p.put(Commands.AUTHENTICATE.P_USER_MACHINE_IDENT, computerId);
        p.put(Commands.AUTHENTICATE.P_PLUGIN_VERSION, clientVersion);
        Authentification auth = (Authentification) callCommand(Commands.AUTHENTICATE.NAME, p, true);
        if (auth instanceof AuthSuccessfull) {
            AuthSuccessfull success = (AuthSuccessfull) auth;
            getUnifiedAuthentificationService().setUAK(success.getKey());
            if (success.getServer() != null) {
                try {
View Full Code Here

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

    public UAK getUAK() {
        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) {
View Full Code Here

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

            throw new NoUAKException();
        } else {
            if (!uak.checkUserKey(WOJServer.getInstance().getPrivateKey())) {
                // we try to authenticate again
                // TODO : check if we are master or authenticate to master if we aren't
                Authentification a = WOJServer.getInstance().getAuthentificationService().authenticate(uak.getUserName(), uak.getUserPass(), uak.getComputerId(), uak.getPluginVersion());
               
                //Current server can not serve the request, we send a redirect to the good server
                if(a instanceof AuthSuccessfull) {
                    AuthSuccessfull as = (AuthSuccessfull)a;
                    SecurityHelper.saveAuthentification(request.getSession(), a);
View Full Code Here

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

                // we check if the login info is not ok
                UAK uak = e.getUak();
               
                // we try to authenticate again
                // TODO : check if we are master or authenticate to master if we aren't
                Authentification auth = WOJServer.getInstance().getAuthentificationService().authenticate(uak.getUserName(), uak.getUserPass(), uak.getComputerId(), uak.getPluginVersion());
               
                //Current server can not serve the request, we send a redirect to the good server
                if(auth instanceof AuthSuccessfull) {
                    AuthSuccessfull as = (AuthSuccessfull)auth;
                    SecurityHelper.fillMapWithUAK(parameterMap, as.getKey());
View Full Code Here

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

        String machineIdent = (String)parameters.get(Parameters.SECURITY.USER_MACHINE_IDENT);
        if (machineIdent == null) {
            machineIdent = CommonSecurityHelper.BROWSER;
        }
       
        Authentification a = WOJServer.getInstance().getAuthentificationService().authenticate(userName, password, machineIdent, "browser");
        if(a instanceof AuthNotDone) {
            throw new ServerRedirectException(((AuthNotDone)a).getAuthServer());
        } else {
            String url = (String)parameters.get(Parameters.REDIRECT_URL_PARAMETER);
            if (url == null) {
View Full Code Here

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

        checkCanConnectServer();
       
        if(user != null && user.length()==0 && password != null && password.length()==0) {
            throw new NotSignedException(Messages.getString("services.bad.account.info")); //$NON-NLS-1$
        }
        Authentification auth = null;
        try {
            SimpleMonitor.startTask("autenticate"); //$NON-NLS-1$
            //always log into master server
            LOGGER.debug("autenticate calling server"); //$NON-NLS-1$
            auth = _serverServicesProvider.getAuthentificationService().authenticate(user, password, System.getProperty(PLUGIN_VERSION, "not set"));
View Full Code Here

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

           
            System.out.println("\n\n\nBEGINNING MODULE BUILDER "+new Date()+" - "+settings.getServer());
            System.err.println("\n\n\nBEGINNING MODULE BUILDER "+new Date()+" - "+settings.getServer());
           
            ClientServerServicesProvider ssp = ClientServerServicesProvider.get(settings.getServer());
      Authentification auth;
            auth = ssp.getAuthentificationService().authenticate(settings.getUserName(), settings.getPassword(), "");
     
      if (auth instanceof AuthSuccessfull) {
        ModuleManagementService mms = ssp.getModuleManagementService();
        FromDLModuleBuilder builder = new FromDLModuleBuilder(explorer, mms, settings.getModulesDir());
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.