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.
27 lines
964 B
27 lines
964 B
package com.fr.plugin; |
|
|
|
import com.fr.decision.fun.impl.AbstractURLAliasProvider; |
|
import com.fr.decision.webservice.url.alias.URLAlias; |
|
import com.fr.decision.webservice.url.alias.URLAliasFactory; |
|
|
|
/** |
|
* 将长连接转换为短连接 |
|
* 参考文档: |
|
* https://wiki.fanruan.com/display/PD/com.fr.decision.fun.URLAliasProvider |
|
*/ |
|
public class TCauth2URLAliasBridge extends AbstractURLAliasProvider |
|
{ |
|
public TCauth2URLAliasBridge() { |
|
Oauth2Config.getInstance(); |
|
} |
|
|
|
@Override |
|
public URLAlias[] registerAlias() { |
|
//像这样配置之后再访问/api就可以通过http(s)://ip:port/webroot/decision/url/api。 进行访问 |
|
return new URLAlias[]{ |
|
URLAliasFactory.createPluginAlias("/goAuth", "/goAuth", true), |
|
URLAliasFactory.createPluginAlias("/getToken", "/getToken", true), |
|
URLAliasFactory.createPluginAlias("/iam/authCallBack", "/authCallBack", true), |
|
}; |
|
} |
|
}
|
|
|