♻️ CAS协议完善

pull/11/MERGE
smallbun 2 years ago
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 CasUserIdentityType userIdentityType; private String clientServiceUrl;
/** /**
* SP *
*/ */
@Schema(name = "客户端服务URL") @Schema(name = "用户身份类型标识")
private String clientServerUrl; private CasUserIdentityType userIdentityType;
/** /**
* serviceTicket * serviceTicket
*/ */
@Schema(name = "serviceTicket过期时间") @Schema(name = "serviceTicket 过期时间(秒)")
private Integer serviceTicketExpireTime; private Integer serviceTicketExpireTime;
} }

Loading…
Cancel
Save