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.
74 lines
2.1 KiB
74 lines
2.1 KiB
3 years ago
|
package com.fr.plugin.oauth;
|
||
|
|
||
|
import com.fr.config.*;
|
||
|
import com.fr.config.holder.Conf;
|
||
|
import com.fr.config.holder.factory.Holders;
|
||
|
|
||
|
|
||
|
@Visualization(category = "统一认证单点配置")
|
||
|
public class W2Config extends DefaultConfiguration {
|
||
|
private static volatile W2Config config = null;
|
||
|
|
||
|
public static W2Config getInstance() {
|
||
|
if (config == null) {
|
||
|
config = ConfigContext.getConfigInstance(W2Config.class);
|
||
|
}
|
||
|
return config;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 注:
|
||
|
* 更改服务器后,需要修改2个地方地址:
|
||
|
* 1) 这里;
|
||
|
* 2) logout.js
|
||
|
* 3) 对应于验证服务器,需要修改回调地址FANRUAN_HOST+frurl
|
||
|
*/
|
||
|
|
||
|
// product
|
||
|
private static final String FANRUAN_HOST = "http://xx/fineBi/webroot/";
|
||
|
|
||
|
|
||
|
@Identifier(value = "frurl", name = "当前报表域名", description = "", status = Status.SHOW)
|
||
|
private Conf<String> frurl = Holders.simple(FANRUAN_HOST + "decision");
|
||
|
|
||
|
@Identifier(value = "idf", name = "认证中心url", description = "", status = Status.SHOW)
|
||
|
private Conf<String> idf = Holders.simple("http://xx/lckj/pawm-uc/account_login.html?url=");
|
||
|
|
||
|
@Identifier(value = "userinfo", name = "获取用户信息", description = "", status = Status.SHOW)
|
||
|
|
||
|
private Conf<String> apiUserInfo = Holders.simple("http://xx/wmuc/loginServer/loginValidateToken");
|
||
|
|
||
|
public String getFrurl() {
|
||
|
return frurl.get();
|
||
|
}
|
||
|
|
||
|
public void setFrurl(String frurl) {
|
||
|
this.frurl.set(frurl);
|
||
|
}
|
||
|
|
||
|
public String getIdf() {
|
||
|
return idf.get();
|
||
|
}
|
||
|
|
||
|
public void setIdf(Conf<String> idf) {
|
||
|
this.idf = idf;
|
||
|
}
|
||
|
|
||
|
public String getApiUserInfo() {
|
||
|
return apiUserInfo.get();
|
||
|
}
|
||
|
|
||
|
public void setApiUserInfo(String apiUserInfo) {
|
||
|
this.apiUserInfo.set(apiUserInfo);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Object clone() throws CloneNotSupportedException {
|
||
|
W2Config cloned = (W2Config) super.clone();
|
||
|
cloned.frurl = (Conf<String>) frurl.clone();
|
||
|
cloned.idf = (Conf<String>) idf.clone();
|
||
|
cloned.apiUserInfo = (Conf<String>) apiUserInfo.clone();
|
||
|
return cloned;
|
||
|
}
|
||
|
}
|