Java Code Examples for io.undertow.servlet.handlers.ServletRequestContext#getOverridenSessionId()

The following examples show how to use io.undertow.servlet.handlers.ServletRequestContext#getOverridenSessionId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ServletContextImpl.java    From quarkus-http with Apache License 2.0 6 votes vote down vote up
@Override
public String findSessionId(HttpServerExchange exchange) {
    String invalidated = exchange.getAttachment(INVALIDATED);
    ServletRequestContext src = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
    final String current;
    if(src.getOverridenSessionId() == null) {
        current = delegate.findSessionId(exchange);
    } else {
        current = src.getOverridenSessionId();
    }
    if(invalidated == null) {
        return current;
    }
    if(invalidated.equals(current)) {
        return null;
    }
    return current;
}
 
Example 2
Source File: ServletContextImpl.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
@Override
public String findSessionId(HttpServerExchange exchange) {
    String invalidated = exchange.getAttachment(INVALIDATED);
    ServletRequestContext src = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
    final String current;
    if(src.getOverridenSessionId() == null) {
        current = delegate.findSessionId(exchange);
    } else {
        current = src.getOverridenSessionId();
    }
    if(invalidated == null) {
        return current;
    }
    if(invalidated.equals(current)) {
        return null;
    }
    return current;
}