1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Created by PhpStorm.
* User: zero
* Date: 2020/5/26
* Time: 15:17
*/
namespace Meibuyu\Micro\Service\Interfaces\User;
interface AuthenticationServiceInterface
{
/**
* 获取对应用户能够看到的菜单
* @param string $appName
* @param integer $userId
* @return array
*/
public function getMenus($appName, $userId): array;
/**
* 获取对应用户的菜单权限
* @param string $appName 应用名称
* @param integer $userId 用户 ID
* @return array
*/
public function getButtons($appName, $userId, $frontendPath):array;
/**
* 获取对应路由的接口权限结果
* @param $route string 路由名字
* @param $appName string 应用名字
* @param $method string 请求方法
* @param $userId integer 用户 ID
* @return bool
*/
public function authByRouter($appName, $route, $method, $userId): bool;
}