You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
4.6 KiB

3 years ago
package com.fr.plugin.xx.zyjn.conf;
import com.fr.config.*;
import com.fr.config.holder.Conf;
import com.fr.config.holder.factory.Holders;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.stable.StringUtils;
/**
* @author xx
* @date 2021/11/04
*/
@Visualization(category = "sso单点")
@EnableMetrics
public class GxkgSsoConfig extends DefaultConfiguration {
private static volatile GxkgSsoConfig config = null;
@Focus(id="com.fr.plugin.sso.sykg.extra", text = "SYKG-SSO配置", source = Original.PLUGIN)
public static GxkgSsoConfig getInstance() {
if (config == null) {
config = ConfigContext.getConfigInstance(GxkgSsoConfig.class);
}
return config;
}
@Identifier(value = "debugSwitch", name = "日志调试模式", description = "日志调试模式", status = Status.SHOW)
private Conf<Boolean> debugSwitch = Holders.simple(true);
public Boolean getdebugSwitch() { return debugSwitch.get(); }
public void setdebugSwitch(Boolean debugSwitch) { this.debugSwitch.set(debugSwitch); }
@Identifier(value = "redirect", name = "帆软服务回跳地址", description = "帆软服务回跳地址,http://ip:port/webroot/decision", status = Status.SHOW)
private Conf<String> redirect = Holders.simple(StringUtils.EMPTY);
public String getRedirect() {
return redirect.get();
}
public void setRedirect(String redirect) {
this.redirect.set(redirect);
}
@Identifier(value = "host", name = "单点Oauth2地址", description = "单点Oauth2地址,http://ip:port", status = Status.SHOW)
private Conf<String> host = Holders.simple(StringUtils.EMPTY);
public String getHost() {
return host.get();
}
public void setHost(String host) {
this.host.set(host);
}
private Conf<String> syncHost = Holders.simple(StringUtils.EMPTY);
public String getSyncHost() {
return syncHost.get();
}
public void setSyncHost(String syncHost) {
this.syncHost.set(syncHost);
}
@Identifier(value = "clientId", name = "clientId", description = "clientId", status = Status.SHOW)
private Conf<String> clientId = Holders.simple(StringUtils.EMPTY);
public String getClientId() {
return clientId.get();
}
public void setClientId(String clientId) {
this.clientId.set(clientId);
}
@Identifier(value = "clientSecret", name = "clientSecret", description = "clientSecret", status = Status.SHOW)
private Conf<String> clientSecret = Holders.simple(StringUtils.EMPTY);
public String getClientSecret() {
return clientSecret.get();
}
public void setClientSecret(String clientSecret) {
this.clientSecret.set(clientSecret);
}
@Identifier(value = "logoutUrl", name = "登出调用地址", description = "登出调用地址", status = Status.SHOW)
private Conf<String> logoutUrl = Holders.simple(StringUtils.EMPTY);
public String getLogoutUrl() {
return logoutUrl.get();
}
public void setLogoutUrl(String logoutUrl) {
this.logoutUrl.set(logoutUrl);
}
@Identifier(value = "refreshToken", name = "刷新token开关", description = "刷新token开关", status = Status.SHOW)
private Conf<Boolean> refreshToken = Holders.simple(false);
public Boolean getRefreshToken() {
return refreshToken.get();
}
public void setRefreshToken(Boolean refreshToken) {
this.refreshToken.set(refreshToken);
}
private Conf<String> cron = Holders.simple("0 0/1 * * * ? *");
public String getCron() {
return cron.get();
}
public void setCron(String cron) {
this.cron.set(cron);
}
private Conf<String> syncUser = Holders.simple(StringUtils.EMPTY);
public String getSyncUser() {
return syncUser.get();
}
public void setSyncUser(String syncUser) {
this.syncUser.set(syncUser);
}
private Conf<String> syncPass = Holders.simple(StringUtils.EMPTY);
public String getSyncPass() {
return syncPass.get();
}
public void setSyncPass(String syncPass) {
this.syncPass.set(syncPass);
}
private Conf<String> appSn = Holders.simple(StringUtils.EMPTY);
public String getAppSn() {
return appSn.get();
}
public void setAppSn(String appSn) {
this.appSn.set(appSn);
}
@Override
public Object clone() throws CloneNotSupportedException {
GxkgSsoConfig cloned = (GxkgSsoConfig) super.clone();
cloned.debugSwitch = (Conf<Boolean>) debugSwitch.clone();
return cloned;
}
}