public GuacamoleSession getGuacamoleSession(String authToken) 
            throws GuacamoleException {
        
        // Try to get the session from the map of logged in users.
        GuacamoleSession session = tokenSessionMap.get(authToken);
       
        // Authentication failed.
        if (session == null)
            throw new GuacamoleUnauthorizedException("Permission Denied.");
        
        return session;

    }
Finds the Guacamole session for a given auth token, if the auth token
represents a currently logged in user. Throws an unauthorized error
otherwise.

@param authToken The auth token to check against the map of logged in users.
@return The session that corresponds to the provided auth token.
@throws GuacamoleException If the auth token does not correspond to any
                           logged in user.
guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java