类 CookieSessionIdResolver
java.lang.Object
cn.taketoday.session.CookieSessionIdResolver
- 所有已实现的接口:
SessionIdResolver
A
SessionIdResolver that uses a cookie to obtain the session from.
HTTP/1.1 200 OK Set-Cookie: SESSION=f81d4fae-7dec-11d0-a765-00a0c91e6bf6; Path=/context-root; Secure; HttpOnlyThe client should now include the session in each request by specifying the same cookie in their request. For example:
GET /messages/ HTTP/1.1 Host: example.com Cookie: SESSION=f81d4fae-7dec-11d0-a765-00a0c91e6bf6When the session is invalidated, the server will send an HTTP response that expires the cookie. For example:
HTTP/1.1 200 OK Set-Cookie: SESSION=; Expires=Thur, 1 Jan 1970 00:00:00 GMT; Secure; HttpOnly
- 从以下版本开始:
- 2019-10-03 10:56
- 作者:
- Harry Yang
-
字段概要
字段从接口继承的字段 cn.taketoday.session.SessionIdResolver
WRITTEN_SESSION_ID_ATTR -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明createCookie(String id) voidexpireSession(RequestContext exchange) Instruct the client to end the current session.getSessionId(RequestContext context) Resolving session id from RequestContextvoidsetSessionId(RequestContext context, String sessionId) Send the given session id to the client.
-
字段详细资料
-
cookieName
-
config
-
-
构造器详细资料
-
CookieSessionIdResolver
public CookieSessionIdResolver() -
CookieSessionIdResolver
-
CookieSessionIdResolver
-
-
方法详细资料
-
getSessionId
从接口复制的说明:SessionIdResolverResolving session id from RequestContextsession id including
applied session id- 指定者:
getSessionId在接口中SessionIdResolver- 参数:
context- request context- 返回:
- session id
-
setSessionId
从接口复制的说明:SessionIdResolverSend the given session id to the client.- 指定者:
setSessionId在接口中SessionIdResolver- 参数:
context- the current contextsessionId- the session id
-
expireSession
从接口复制的说明:SessionIdResolverInstruct the client to end the current session.- 指定者:
expireSession在接口中SessionIdResolver- 参数:
exchange- the current exchange
-
getCookieName
-
createCookie
-