log.info("ServiceName: "+serviceName+", Attrs: "+attributes+", DenySSO: "+denySso+", URL: "+simulatedURL);
String s = new String(); for (int i=0; i<attributes.length-1; i++) s = s + attributes[i] + ','; s = s + attributes[attributes.length-1]; log.info("Service name: "+serviceName+"; attributes: "+s+"; deny SSO "+denySso+"; URL "+simulatedURL);
    public String requestSession(String[] attributes, String prefix, String postfix, boolean denySso)    throws RemoteException {        log.finer("requestSession(String[], String, String, boolean)");                /* If no attributes are given, then create an empty attribute         * array. */        if (attributes == null) {            attributes = new String[]{};        }        /* Look up service authorization data. */        Principal p = ctx.getUserPrincipal();        String serviceName = null;        if (p != null)            serviceName = p.getName();                String log_prefix = "Session requested by "+serviceName+": ";        /* Check if prefix and postfix, together with a possible         * session ID, is a valid URL. */        String simulatedURL = prefix+"MORIAID"+postfix;        if (!URLValidator.isLegal(simulatedURL)) {            log.warning(log_prefix+"DENIED, Invalid URL");            stats.incStatsCounter(serviceName, "sessionDeniedURL");            throw new RemoteException("Malformed URL: "+simulatedURL);        }                    log.info("ServiceName: "+serviceName+", Attrs: "+attributes+", DenySSO: "+denySso+", URL: "+simulatedURL);        WebService ws = AuthorizationData.getInstance().getWebService(serviceName);        if (ws == null) {            log.warning(log_prefix+"DENIED, Unauthorized");            stats.incStatsCounter(serviceName, "sessionDeniedAuthN");            throw new RemoteException("Web Service not authorized for use with Moria");        } else if (!ws.allowAccessToAttributes(attributes)) {            log.warning(log_prefix+"DENIED, Authorization faliure");            stats.incStatsCounter(serviceName, "sessionDeniedAuthZ");            throw new RemoteException("Access to one or more attributes prohibited");        }        try {            Session session = sessionStore.createSession(attributes, prefix, postfix, p, ws);                  log.info(log_prefix+"ACCEPTED, SID="+session.getID());            /* Turn of SSO if required by web service. */            if (denySso)                 session.setDenySso();            stats.incStatsCounter(serviceName, "createdSessions");            stats.incStatsCounter(serviceName, "activeSessions");            return session.getRedirectURL();        } catch (SessionException e) {            log.severe("SessionException caught and re-thrown as RemoteException");            throw new RemoteException("SessionException caught", e);        } catch (ConfigurationException e) {            log.severe("ConfigurationException caught and re-thrown as RemoteException");            throw new RemoteException("ConfigurationException caught", e);        }            }