Package org.jdesktop.wonderland.common.login

Examples of org.jdesktop.wonderland.common.login.AuthenticationService


        conn.setRequestProperty("Redirect", "false");

        // if there is an authentication manager for this server, attempt
        // to secure the request
        if (getAuthURL() != null) {
            AuthenticationService as = AuthenticationManager.get(getAuthURL());
            if (as != null) {
                as.secureURLConnection(conn);
            }
        }
       
        MultiPartFormOutputStream up =
                new MultiPartFormOutputStream(conn.getOutputStream(), boundary);
View Full Code Here


            throws LoginFailureException
        {
            fireConnecting(BUNDLE.getString(
                    "Sending authentication details..."));
            try {
                AuthenticationService as =
                        AuthenticationManager.login(getAuthInfo(), username,
                                                    credentials);
                setAuthService(as);
                loginComplete(username, as.getAuthenticationToken());
            } catch (AuthenticationException ae) {
                throw new LoginFailureException(ae);
            }
        }
View Full Code Here

        try {
            // create the uploader
            ModuleUploader mu = new ModuleUploader(serverUrl);

            // get the authentication service (if any)
            AuthenticationService as = getAuthentication();
            if (as != null) {
                mu.setAuthURL(as.getAuthenticationURL());
            }

            // upload the module
            mu.upload(module);
        } catch (IOException ioe) {
View Full Code Here

    }

    protected AuthenticationService getAuthentication()
        throws AuthenticationException, IOException
    {
        AuthenticationService out = null;

        // if the username is not null, set up authentication
        if (username != null && username.length() > 0 &&
                password != null && password.length() > 0)
        {
View Full Code Here

        // tell the server not to redirect us to the login page
        uc.setRequestProperty("Redirect", "false");

        // if there is authentication, make sure to secure the connection
        try {
            AuthenticationService as = getAuthentication();
            if (as != null) {
                as.secureURLConnection(uc);
            }
        } catch (AuthenticationException ae) {
            throw new BuildException("Error requesting restart from " +
                                     restartUrl + ": " + ae.getMessage(), ae);
        }
View Full Code Here

    }

    protected AuthenticationService getAuthentication()
        throws AuthenticationException, IOException
    {
        AuthenticationService out = null;

        // if the username is not null, set up authentication
        if (username != null && username.length() > 0 &&
                password != null && password.length() > 0)
        {
View Full Code Here

            baseURL = new HttpURL(baseURL, "webdav/content");

            //System.out.println("[WebdavClientPlugin] got base URL " + baseURL);

            // get the authentication service for this session
            AuthenticationService as =
                AuthenticationManager.get(loginInfo.getCredentialManager().getAuthenticationURL());

            // activate the webdav repository for this session
            String authCookieName = as.getCookieName();
            String authCookieValue = as.getAuthenticationToken();
            AuthenticatedWebdavResource wdr =
                    new RootWebdavResource(baseURL,
                                           authCookieName,
                                           authCookieValue);
            WebdavContentCollection root =
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.login.AuthenticationService

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.