提交 8ce9a70d 编写于 作者: shengzhang_'s avatar shengzhang_ 提交者: Gitee

update sa-token-core/src/main/java/cn/dev33/satoken/session/SaSession.java.

上级 f1919769
......@@ -119,17 +119,15 @@ public class SaSession implements Serializable {
* @param tokenSign token签名
*/
public void addTokenSign(TokenSign tokenSign) {
// 判断是否存在列表
boolean tokenExits = this.getTokenSignList()
.stream()
.map(TokenSign::getValue)
.anyMatch(it -> it.equals(tokenSign.getValue()));
// 如果已经存在于列表中,则无需再次添加
if (tokenExits == false) {
// 添加并更新
tokenSignList.add(tokenSign);
update();
for (TokenSign tokenSign2 : getTokenSignList()) {
if (tokenSign2.getValue().equals(tokenSign.getValue())) {
return;
}
}
// 添加并更新
tokenSignList.add(tokenSign);
update();
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册