Package org.guvnor.tools.utils.webdav

Examples of org.guvnor.tools.utils.webdav.WebDavSessionAuthenticator


        if (model.shouldSaveAuthInfo()) {
            Platform.addAuthorizationInfo(serverUrl, "", "basic", info);     //$NON-NLS-1$ //$NON-NLS-2$
        } else {
            IWebDavClient client = WebDavClientFactory.createClient(serverUrl);
            WebDavServerCache.cacheWebDavClient(serverUrl.toString(), client);
            WebDavSessionAuthenticator authen = new WebDavSessionAuthenticator();
            authen.addAuthenticationInfo(serverUrl, "", "basic", info); //$NON-NLS-1$ //$NON-NLS-2$
            client.setSessionAuthenticator(authen);
        }
    }
View Full Code Here


        AuthPromptResults res = promptForAuthentication(server);
        if (res != null) {
            if (res.wasSaved()) {
                Platform.addAuthorizationInfo(new URL(server), "", "basic", res.getAuthInfo()); //$NON-NLS-1$ //$NON-NLS-2$
            } else {
                WebDavSessionAuthenticator authen = new WebDavSessionAuthenticator();
                authen.addAuthenticationInfo(new URL(server), "", "basic", res.getAuthInfo()); //$NON-NLS-1$ //$NON-NLS-2$
                client.setSessionAuthenticator(authen);
            }
            return true;
        } else {
            return false;
View Full Code Here

        }
        if (saveInfo) {
            Platform.flushAuthorizationInfo(serverUrl, "", "basic"); //$NON-NLS-1$ //$NON-NLS-2$
            Platform.addAuthorizationInfo(serverUrl, "", "basic", info); //$NON-NLS-1$ //$NON-NLS-2$
        } else {
            WebDavSessionAuthenticator authen = new WebDavSessionAuthenticator();
            authen.addAuthenticationInfo(new URL(server), "", "basic", info); //$NON-NLS-1$ //$NON-NLS-2$
            client.setSessionAuthenticator(authen);
        }
    }
View Full Code Here

TOP

Related Classes of org.guvnor.tools.utils.webdav.WebDavSessionAuthenticator

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.