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.
96 lines
2.8 KiB
96 lines
2.8 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
|
||
|
*/
|
||
|
|
||
|
private static final String FANRUAN_HOST = "https://xx/";
|
||
|
|
||
|
@Identifier(value = "frlogin", name = "登录域名", description = "", status = Status.SHOW)
|
||
|
//private Conf<String> frlogin = Holders.simple(FANRUAN_HOST + "login.html");
|
||
|
private Conf<String> frlogin = Holders.simple(FANRUAN_HOST + "SSOlogin.html");
|
||
|
|
||
|
@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("https://xx");
|
||
|
|
||
|
@Identifier(value = "owclientId", name = "OauthClientId", description = "", status = Status.SHOW)
|
||
|
private Conf<String> owclientId = Holders.simple("xx");
|
||
|
|
||
|
@Identifier(value = "owclientSecret", name = "client_secret", description = "", status = Status.SHOW)
|
||
|
private Conf<String> owclientSecret = Holders.simple("xx");
|
||
|
|
||
|
|
||
|
public Conf<String> getFrlogin() {
|
||
|
return frlogin;
|
||
|
}
|
||
|
|
||
|
public void setFrlogin(Conf<String> frlogin) {
|
||
|
this.frlogin = frlogin;
|
||
|
}
|
||
|
|
||
|
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 getOwclientId() {
|
||
|
return owclientId.get();
|
||
|
}
|
||
|
|
||
|
public void setOwclientId(String clientId) {
|
||
|
this.owclientId.set(clientId);
|
||
|
}
|
||
|
|
||
|
public String getOwclientSecret() {
|
||
|
return owclientSecret.get();
|
||
|
}
|
||
|
|
||
|
public void setOwclientSecret(String owclientSecret) {
|
||
|
this.owclientSecret.set(owclientSecret);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Object clone() throws CloneNotSupportedException {
|
||
|
W2Config cloned = (W2Config) super.clone();
|
||
|
cloned.frurl = (Conf<String>) frurl.clone();
|
||
|
cloned.owclientId = (Conf<String>) owclientId.clone();
|
||
|
cloned.owclientSecret = (Conf<String>) owclientSecret.clone();
|
||
|
cloned.idf = (Conf<String>) idf.clone();
|
||
|
return cloned;
|
||
|
}
|
||
|
}
|