fix: 不使用cookie

This commit is contained in:
wangyu 2021-01-11 15:52:19 +08:00
parent 6fd11aa4e3
commit f1fe701aff

View File

@ -87,7 +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));
headers.add("Token-Valid-Time", String.valueOf(tokenValidityInMilliseconds));
// token在web端的时间较短不允许记住所以使用短期
// exchange.getResponse().addCookie(ResponseCookie.from(AUTHORIZATION_HEADER, "Bearer-" + token).
// httpOnly(true).maxAge(tokenValidityInMilliseconds).build());