@@ -0,0 +1,1441 @@
+package io.undertow.servlet.handlers.security;%0A%0Aimport io.undertow.security.impl.SingleSignOnAuthenticationMechanism;%0Aimport io.undertow.security.impl.SingleSignOnManager;%0Aimport io.undertow.server.HttpServerExchange;%0Aimport io.undertow.server.session.Session;%0Aimport io.undertow.servlet.handlers.ServletRequestContext;%0Aimport io.undertow.servlet.spec.HttpSessionImpl;%0A%0Aimport java.security.AccessController;%0Aimport java.security.PrivilegedAction;%0A%0A/**%0A * Servlet version of the single sign on authentication mechanism.%0A *%0A * @author Stuart Douglas%0A */%0Apublic class ServletSingleSignOnAuthenticationMechainism extends SingleSignOnAuthenticationMechanism %7B%0A    public ServletSingleSignOnAuthenticationMechainism(SingleSignOnManager storage) %7B%0A        super(storage);%0A    %7D%0A%0A    @Override%0A    protected Session getSession(HttpServerExchange exchange) %7B%0A        ServletRequestContext servletRequestContext = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);%0A        final HttpSessionImpl session = servletRequestContext.getCurrentServletContext().getSession(exchange, true);%0A        if(System.getSecurityManager() == null) %7B%0A            return session.getSession();%0A        %7D else %7B%0A            return AccessController.doPrivileged(new PrivilegedAction%3CSession%3E() %7B%0A                @Override%0A                public Session run() %7B%0A                    return session.getSession();%0A                %7D%0A            %7D);%0A        %7D%0A    %7D%0A%7D%0A

Add servlet version of single single on mechanism