fix: 不使用cookie

This commit is contained in:
wangyu 2021-01-11 15:51:57 +08:00
parent 9748d26660
commit 6fd11aa4e3

View File

@ -87,6 +87,7 @@ public class TokenProvider implements InitializingBean {
HttpHeaders headers = exchange.getResponse().getHeaders();
// app用户从头部返回方便获取
headers.add("Token", token);
headers.add("Token-Valid-TIME", String.valueOf(tokenValidityInMilliseconds));
// token在web端的时间较短不允许记住所以使用短期
// exchange.getResponse().addCookie(ResponseCookie.from(AUTHORIZATION_HEADER, "Bearer-" + token).
// httpOnly(true).maxAge(tokenValidityInMilliseconds).build());