commit f7244849e09869a29aba243218d2bfe65cedccbc Author: Afly Date: Thu Oct 15 20:28:41 2020 +0800 KERNEL-5580 feat: 第三方token认证接口 diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..463f152 --- /dev/null +++ b/build.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..824e70d --- /dev/null +++ b/plugin.xml @@ -0,0 +1,17 @@ + + + com.fr.plugin.demo.third.auth + + yes + no + 0.1 + 10.0~ + 2020-10-10 + Afly + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..6a2c9f0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + starter + com.fr.plugin + 10.0 + + demo-third-auth + + + + ${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.demo.third.auth-0.1/classes + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + + + + \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/demo/third/auth/CustomAccessProvider.java b/src/main/java/com/fr/plugin/demo/third/auth/CustomAccessProvider.java new file mode 100644 index 0000000..8952ded --- /dev/null +++ b/src/main/java/com/fr/plugin/demo/third/auth/CustomAccessProvider.java @@ -0,0 +1,17 @@ +package com.fr.plugin.demo.third.auth; + +import com.fr.decision.fun.impl.AbstractAccessProvider; +import com.fr.plugin.transform.FunctionRecorder; + + +/** + * @author chf + * @date 2020/9/24 14:43 + */ +@FunctionRecorder +public class CustomAccessProvider extends AbstractAccessProvider { + @Override + public String access(String username, String password, String thirdToken) { + return thirdToken.startsWith(username) ? username : thirdToken; + } +} diff --git a/第三方认证获取token/fr-plugin-decision-third-auth-0.1.zip b/第三方认证获取token/fr-plugin-decision-third-auth-0.1.zip new file mode 100644 index 0000000..cae1143 Binary files /dev/null and b/第三方认证获取token/fr-plugin-decision-third-auth-0.1.zip differ