即使指定了`create-session ="无状态"`spring正在创建JSESSIONID cookie

时间:2014-11-19 10:07:04

标签: spring spring-security

即使指定create-session="stateless" spring正在创建JSESSIONID cookie并将其写入浏览器缓存。我的理解是;如果我们提到它作为无状态弹簧不会添加任何东西到会话。我在这里遗漏了什么或者我的理解错了吗?

我因此而面临的问题是

我在我的应用程序中使用基本身份验证(用于休息服务)和基于表单的身份验证。如果用户登录到firefox,并且他使用基本身份验证使用RestClient调用其余服务,则会在返回其余服务后注销第一个用户。我的目的是让第一个用户会话保持活动状态。请在下面找到我的配置

<http auto-config="false" pattern="/rest/internal/**"
    entry-point-ref="headerBasedAuthenticationEntryPoint" create-session="stateless"
    disable-url-rewriting="true">

    <custom-filter position="BASIC_AUTH_FILTER"
        ref="headerBasedAuthenticationFilter" />
</http>

我在RestCLient

中获得以下响应标头
Status Code: 200 OK
Content-Language: null
Content-Length: 1043
Content-Type: text/html;charset=utf-8
Date: Wed, 19 Nov 2014 10:26:57 GMT
Set-Cookie: JSESSIONID=77C3AC743413C9455CF6FB1EC35F021E; Path=/myApplication/; HttpOnly login=""; Path=/; Secure; HttpOnly userId=4be114d57a3c4d428e3ec9b3cea33463; Expires=Sat, 28-Jul-2046 12:13:37 GMT; Path=/; Secure; HttpOnly lang=en; Expires=Sat, 28-Jul-2046 12:13:37 GMT; Path=/

0 个答案:

没有答案