From 0e217071cd7d7f0b31fead7992b927ff35b5ebad Mon Sep 17 00:00:00 2001
From: DESKTOP-71BH0QO\L、ming <172680469@qq.com>
Date: 星期二, 27 四月 2021 11:31:28 +0800
Subject: [PATCH] no
---
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/auth/TokenService.java | 66 +++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/auth/TokenService.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/auth/TokenService.java
new file mode 100644
index 0000000..b967100
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/auth/TokenService.java
@@ -0,0 +1,66 @@
+package com.panzhihua.common.service.auth;
+
+import com.panzhihua.common.model.vos.R;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @program: springcloud_k8s_panzhihuazhihuishequ
+ * @description: 认证授权
+ * @author: huang.hongfa weixin hhf9596 qq 959656820
+ * @create: 2020-11-24 09:18
+ **/
+@FeignClient(name = "auth")
+public interface TokenService {
+ /**
+ * 小程序用户登录
+ * @param openId 小程序唯一标识
+ * @return 登录结果
+ */
+ @PostMapping("/loginApplets")
+ R loginApplets(@RequestParam("openId") String openId);
+
+ /**
+ * 用户登出
+ * @param token 登录用户token
+ * @return 登出结果
+ */
+ @PostMapping("/logout")
+ R logout(@RequestParam("token") String token);
+
+ /**
+ * 社区后台登录
+ * @param account 账户
+ * @param password 密码
+ * @return 登录结果
+ */
+ @PostMapping("/loginCommunityBackage")
+ R loginCommunityBackage(@RequestParam("account") String account, @RequestParam("password")String password);
+
+ /**
+ * 小程序后台登录
+ * @param account 账户
+ * @param password 密码
+ * @return 登录结果
+ */
+ @PostMapping("/loginAppletsBackStage")
+ R loginAppletsBackStage(@RequestParam("account") String account, @RequestParam("password")String password);
+
+ /**
+ * 认证中心刷新token
+ * @param refreshToken 用户端保存的刷新token
+ * @return 新的token 和刷新token
+ */
+ @PostMapping("/refreshToken")
+ R refreshToken(@RequestParam("refreshToken")String refreshToken);
+
+ /**
+ * 商家后台登录
+ * @param account 账户
+ * @param password 密码
+ * @return 登录结果
+ */
+ @PostMapping("/loginShopBackStage")
+ R loginShopBackStage(@RequestParam("account") String account, @RequestParam("password")String password);
+}
--
Gitblit v1.7.1