新增 sa-token.sso.mode 配置项,用于约定此系统使用的 SSO 模式。

This commit is contained in:
click33
2023-05-15 01:26:26 +08:00
parent d4ff8df5b4
commit 94b1ab29a6
2 changed files with 65 additions and 3 deletions

View File

@@ -22,7 +22,12 @@ public class SaSsoConfig implements Serializable {
private static final long serialVersionUID = -6541180061782004705L;
// ----------------- Server端相关配置
// ----------------- Server端相关配置
/**
* 指定当前系统集成 SSO 时使用的模式(约定型配置项,不对代码逻辑产生任何影响)
*/
public String mode = "";
/**
* Ticket有效期 (单位: 秒)
@@ -47,6 +52,11 @@ public class SaSsoConfig implements Serializable {
// ----------------- Client端相关配置
// /**
// * 指定当前系统集成 SSO 时使用的模式(约定型配置项,不对代码逻辑产生任何影响)
// */
// public String mode = ""; // 同Server端不再重复声明
/**
* 当前 Client 名称标识,用于和 ticket 码的互相锁定
*/
@@ -103,6 +113,24 @@ public class SaSsoConfig implements Serializable {
public String serverUrl;
/**
* 获取 指定当前系统集成 SSO 时使用的模式(约定型配置项,不对代码逻辑产生任何影响)
*
* @return /
*/
public String getMode() {
return this.mode;
}
/**
* 设置 指定当前系统集成 SSO 时使用的模式(约定型配置项,不对代码逻辑产生任何影响)
*
* @param mode /
*/
public void setMode(String mode) {
this.mode = mode;
}
/**
* @return Ticket有效期 (单位: 秒)
*/
@@ -297,7 +325,8 @@ public class SaSsoConfig implements Serializable {
@Override
public String toString() {
return "SaSsoConfig ["
+ "ticketTimeout=" + ticketTimeout
+ "mode=" + mode
+ ", ticketTimeout=" + ticketTimeout
+ ", allowUrl=" + allowUrl
+ ", isSlo=" + isSlo
+ ", isHttp=" + isHttp
@@ -457,5 +486,4 @@ public class SaSsoConfig implements Serializable {
return sendHttp;
}
}