Merge branch 'master' of https://github.com/bit365/notebooks
This commit is contained in:
commit
2f3bc70b1c
@ -65,3 +65,12 @@ builder.Services.AddAuthentication().AddJwtBearer().AddCustomJwtBearer(options =
|
|||||||
options.SecurityAlgorithm = SecurityAlgorithms.HmacSha256;
|
options.SecurityAlgorithm = SecurityAlgorithms.HmacSha256;
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 在容器中运行 pgAdmin 管理工具
|
||||||
|
|
||||||
|
```shell
|
||||||
|
|
||||||
|
docier pull dpage/pgadmin4
|
||||||
|
|
||||||
|
docker run --name pgadmin -e PGADMIN_DEFAULT_EMAIL=test@test.com -e PGADMIN_DEFAULT_PASSWORD=test -e TZ=Asia/Shanghai -d -p 5050:80 dpage/pgadmin4
|
||||||
|
```
|
19
notes/helloshop/permission-definition.md
Normal file
19
notes/helloshop/permission-definition.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 设计权限定义和权限提供者
|
||||||
|
|
||||||
|
## 权限定义
|
||||||
|
|
||||||
|
每个微服务是自治的,权限定义也是每个微服务的职责,各自定义自己的权限,权限管理器会自动合并权限定义,权限定义上下文是微服务内的权限定义和全局权限定义的合集,权限提供者会根据权限定义上下文提供权限数据,权限分组是为了方便权限定义的管理,权限分组是权限定义的一部分,权限提供者自动注入到容器,提供权限查询端点。
|
||||||
|
|
||||||
|
|
||||||
|
## 架构设计
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## 权限扩展方法
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
IServiceCollection AddPermissionDefinitions(this IServiceCollection services)
|
||||||
|
|
||||||
|
EndpointRouteBuilder MapPermissionDefinitions(this IEndpointRouteBuilder endpoints, params string[] tags)
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user