Skip to content

Commit

Permalink
StpUtil添加setTokenValue方法
Browse files Browse the repository at this point in the history
  • Loading branch information
click33 committed Mar 18, 2021
1 parent 69ce298 commit a122a8b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sa-token-core/src/main/java/cn/dev33/satoken/stp/StpUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ public static String getTokenName() {
return stpLogic.getTokenName();
}

/**
* 在当前会话写入当前tokenValue
* @param tokenValue token值
*/
public static void setTokenValue(String tokenValue, int cookieTimeout){
stpLogic.setTokenValue(tokenValue, cookieTimeout);
}

/**
* 获取当前tokenValue
* @return 当前tokenValue
Expand Down

0 comments on commit a122a8b

Please sign in to comment.