New file |
| | |
| | | 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); |
| | | } |