mirror of https://gitee.com/topiam/eiam
♻️ CAS协议完善
parent
0654158dfd
commit
006a6c63cd
|
@ -49,25 +49,7 @@ import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKN
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class CasStandardApplicationServiceImpl extends AbstractCasApplicationService {
|
public class CasStandardApplicationServiceImpl extends AbstractCasApplicationService {
|
||||||
private final Logger logger = LoggerFactory
|
private final Logger logger = LoggerFactory.getLogger(CasStandardApplicationServiceImpl.class);
|
||||||
.getLogger(CasStandardApplicationServiceImpl.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AppCasConfigRepository
|
|
||||||
*/
|
|
||||||
protected final AppCasConfigRepository appCasConfigRepository;
|
|
||||||
|
|
||||||
public CasStandardApplicationServiceImpl(AppCertRepository appCertRepository,
|
|
||||||
AppAccountRepository appAccountRepository,
|
|
||||||
AppAccessPolicyRepository appAccessPolicyRepository,
|
|
||||||
AppRepository appRepository,
|
|
||||||
AppCasConfigRepository appCasConfigRepository,
|
|
||||||
AppCasStandardConfigConverter casStandardConfigConverter) {
|
|
||||||
super(appCertRepository, appAccountRepository, appAccessPolicyRepository, appRepository,
|
|
||||||
appCasConfigRepository);
|
|
||||||
this.appCasConfigRepository = appCasConfigRepository;
|
|
||||||
this.casStandardConfigConverter = casStandardConfigConverter;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新应用配置
|
* 更新应用配置
|
||||||
|
@ -114,7 +96,7 @@ public class CasStandardApplicationServiceImpl extends AbstractCasApplicationSer
|
||||||
throw new AppNotExistException();
|
throw new AppNotExistException();
|
||||||
}
|
}
|
||||||
AppCasConfigEntity entity = cas.get();
|
AppCasConfigEntity entity = cas.get();
|
||||||
entity.setClientServiceUrl(model.getClientServerUrl());
|
entity.setClientServiceUrl(model.getClientServiceUrl());
|
||||||
entity.setUserIdentityType(model.getUserIdentityType());
|
entity.setUserIdentityType(model.getUserIdentityType());
|
||||||
entity.setServiceTicketExpireTime(model.getServiceTicketExpireTime());
|
entity.setServiceTicketExpireTime(model.getServiceTicketExpireTime());
|
||||||
appCasConfigRepository.save(entity);
|
appCasConfigRepository.save(entity);
|
||||||
|
@ -237,4 +219,21 @@ public class CasStandardApplicationServiceImpl extends AbstractCasApplicationSer
|
||||||
|
|
||||||
private final AppCasStandardConfigConverter casStandardConfigConverter;
|
private final AppCasStandardConfigConverter casStandardConfigConverter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AppCasConfigRepository
|
||||||
|
*/
|
||||||
|
protected final AppCasConfigRepository appCasConfigRepository;
|
||||||
|
|
||||||
|
public CasStandardApplicationServiceImpl(AppCertRepository appCertRepository,
|
||||||
|
AppAccountRepository appAccountRepository,
|
||||||
|
AppAccessPolicyRepository appAccessPolicyRepository,
|
||||||
|
AppRepository appRepository,
|
||||||
|
AppCasConfigRepository appCasConfigRepository,
|
||||||
|
AppCasStandardConfigConverter casStandardConfigConverter) {
|
||||||
|
super(appCertRepository, appAccountRepository, appAccessPolicyRepository, appRepository,
|
||||||
|
appCasConfigRepository);
|
||||||
|
this.appCasConfigRepository = appCasConfigRepository;
|
||||||
|
this.casStandardConfigConverter = casStandardConfigConverter;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,11 @@
|
||||||
*/
|
*/
|
||||||
package cn.topiam.employee.application.cas.pojo;
|
package cn.topiam.employee.application.cas.pojo;
|
||||||
|
|
||||||
import java.io.Serial;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 协议端点域
|
* 协议端点域
|
||||||
|
|
|
@ -20,11 +20,9 @@ package cn.topiam.employee.application.cas.pojo;
|
||||||
import cn.topiam.employee.common.enums.app.AuthorizationType;
|
import cn.topiam.employee.common.enums.app.AuthorizationType;
|
||||||
import cn.topiam.employee.common.enums.app.CasUserIdentityType;
|
import cn.topiam.employee.common.enums.app.CasUserIdentityType;
|
||||||
import cn.topiam.employee.common.enums.app.InitLoginType;
|
import cn.topiam.employee.common.enums.app.InitLoginType;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TopIAM
|
* @author TopIAM
|
||||||
|
@ -73,6 +71,7 @@ public class AppCasStandardConfigGetResult {
|
||||||
/**
|
/**
|
||||||
* serviceTicket 过期时间(秒)
|
* serviceTicket 过期时间(秒)
|
||||||
*/
|
*/
|
||||||
|
@Schema(name = "serviceTicket 过期时间(秒)")
|
||||||
private Integer serviceTicketExpireTime;
|
private Integer serviceTicketExpireTime;
|
||||||
/**
|
/**
|
||||||
* CAS 协议端点
|
* CAS 协议端点
|
||||||
|
|
|
@ -17,16 +17,14 @@
|
||||||
*/
|
*/
|
||||||
package cn.topiam.employee.application.cas.pojo;
|
package cn.topiam.employee.application.cas.pojo;
|
||||||
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import cn.topiam.employee.common.enums.app.AuthorizationType;
|
import cn.topiam.employee.common.enums.app.AuthorizationType;
|
||||||
import cn.topiam.employee.common.enums.app.CasUserIdentityType;
|
import cn.topiam.employee.common.enums.app.CasUserIdentityType;
|
||||||
import cn.topiam.employee.common.enums.app.InitLoginType;
|
import cn.topiam.employee.common.enums.app.InitLoginType;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TopIAM
|
* @author TopIAM
|
||||||
|
@ -56,20 +54,20 @@ public class AppCasStandardSaveConfigParam implements Serializable {
|
||||||
private String initLoginUrl;
|
private String initLoginUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CAS 用户身份类型
|
* 客户端服务URL
|
||||||
*/
|
*/
|
||||||
@Schema(name = "CAS 用户身份类型")
|
@Schema(name = "客户端服务URL")
|
||||||
|
private String clientServiceUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户身份类型标识
|
||||||
|
*/
|
||||||
|
@Schema(name = "用户身份类型标识")
|
||||||
private CasUserIdentityType userIdentityType;
|
private CasUserIdentityType userIdentityType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单点登录 SP 回调地址
|
* serviceTicket 过期时间(秒)
|
||||||
*/
|
*/
|
||||||
@Schema(name = "客户端服务URL")
|
@Schema(name = "serviceTicket 过期时间(秒)")
|
||||||
private String clientServerUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* serviceTicket过期时间
|
|
||||||
*/
|
|
||||||
@Schema(name = "serviceTicket过期时间")
|
|
||||||
private Integer serviceTicketExpireTime;
|
private Integer serviceTicketExpireTime;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue