Отключить идентификатор jsession из фильтра весной - PullRequest
0 голосов
/ 26 сентября 2019

Я написал фильтр, который расширяет AbstractAuthenticationProcessingFilter.

Ниже описан переопределенный метод:

 @Override
   public Authentication attemptAuthentication(HttpServletRequest httpServletRequest,
                                            HttpServletResponse httpServletResponse)
        throws AuthenticationException, IOException, ServletException {


    if (StringUtils.isNoneBlank(cookie)) {
            return authenticationProvider.authenticate(token);
            //Here I want to return jsession id and establish a session.

    } else {
       return handleInSomeOtherWay(httpServletRequest);
         //Here I DONT want to return jsessionid
    }

}

Как мне добиться возврата идентификатора jsession на одном пути, а не на другом?Я пытался установить allowSessionCreation = false, но это не помогло.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...