增加Cookie模式的secure、httpOnly、sameSite等配置

This commit is contained in:
click33
2021-10-05 23:51:04 +08:00
parent cf6632df79
commit 643118177a
12 changed files with 541 additions and 172 deletions

View File

@@ -133,7 +133,7 @@ public class SaTokenJwtUtil {
String tokenValue = createTokenValue(loginId);
storage.set(splicingKeyJustCreatedSave(), tokenValue); // 将token保存到本次request里
if(config.getIsReadCookie() == true){ // cookie注入
SaManager.getSaTokenContext().getResponse().addCookie(getTokenName(), tokenValue, "/", config.getCookieDomain(), (int)config.getTimeout());
SaManager.getSaTokenContext().getResponse().addCookie(getTokenName(), tokenValue, "/", config.getCookie().getDomain(), (int)config.getTimeout());
}
}