Package org.glyptodon.guacamole.net.auth

Examples of org.glyptodon.guacamole.net.auth.Credentials


                    }

                } // end Authorization header fallback
               
                // Build credentials object
                Credentials credentials = new Credentials();
                credentials.setSession(httpSession);
                credentials.setRequest(request);
                credentials.setUsername(username);
                credentials.setPassword(password);

                SessionListenerCollection listeners = new SessionListenerCollection(httpSession);

                // If no cached context, attempt to get new context
                if (context == null) {

                    context = authProvider.getUserContext(credentials);

                    // Log successful authentication
                    if (context != null && logger.isInfoEnabled())
                        logger.info("User \"{}\" successfully authenticated from {}.",
                                context.self().getUsername(), getLoggableAddress(request));
                   
                }

                // Otherwise, update existing context
                else
                    context = authProvider.updateUserContext(context, credentials);

                // If auth failed, notify listeners
                if (context == null) {

                    if (logger.isWarnEnabled()) {

                        // Only bother logging failures involving usernames
                        if (credentials.getUsername() != null)
                            logger.info("Authentication attempt from {} for user \"{}\" failed.",
                                    getLoggableAddress(request), credentials.getUsername());
                        else
                            logger.debug("Authentication attempt from {} without username failed.",
                                    getLoggableAddress(request));
                    }
View Full Code Here


        // Remove prefix
        id = id.substring(id_type.PREFIX.length());

        // Get credentials
        final Credentials credentials = AuthenticatingFilter.getCredentials(httpSession);

        // Get context
        final UserContext context = AuthenticatingFilter.getUserContext(httpSession);

        // If no context or no credentials, not logged in
View Full Code Here

TOP

Related Classes of org.glyptodon.guacamole.net.auth.Credentials

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.