From 0f3bc34f97c01e4c52965d6324a1a7d45437298a Mon Sep 17 00:00:00 2001 From: hello Date: Sat, 16 Mar 2024 15:07:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/helloshop/jwt-bearer-authentication.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/notes/helloshop/jwt-bearer-authentication.md b/notes/helloshop/jwt-bearer-authentication.md index bf8d382..23ec109 100644 --- a/notes/helloshop/jwt-bearer-authentication.md +++ b/notes/helloshop/jwt-bearer-authentication.md @@ -64,4 +64,13 @@ builder.Services.AddAuthentication().AddJwtBearer().AddCustomJwtBearer(options = options.IssuerSigningKey = issuerSigningKey; 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 ``` \ No newline at end of file From e16ad2d1669e47eb78d901c9bf29cf8c4ee59b5c Mon Sep 17 00:00:00 2001 From: hello Date: Sat, 16 Mar 2024 21:42:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9D=83=E9=99=90=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/helloshop/permission-definition.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 notes/helloshop/permission-definition.md diff --git a/notes/helloshop/permission-definition.md b/notes/helloshop/permission-definition.md new file mode 100644 index 0000000..e3545dd --- /dev/null +++ b/notes/helloshop/permission-definition.md @@ -0,0 +1,18 @@ +# 设计权限定义终结点 + +## 权限定义 + +每个微服务是自治的,权限定义也是在微服务内进行,各自定义自己的权限。 + +## 架构设计 + +![权限定义](https://oss.xcode.me/notes/helloshop/permission-definition.svg) + + +## 权限扩展方法 + +```csharp +IServiceCollection AddPermissionDefinitions(this IServiceCollection services) + +EndpointRouteBuilder MapPermissionDefinitions(this IEndpointRouteBuilder endpoints, params string[] tags) +``` \ No newline at end of file From 6b6ed0fa5ce57d54fbd8c50a579806e0ae78860d Mon Sep 17 00:00:00 2001 From: hello Date: Sat, 16 Mar 2024 23:32:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=92=8C=E6=9D=83=E9=99=90=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/helloshop/permission-definition.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/notes/helloshop/permission-definition.md b/notes/helloshop/permission-definition.md index e3545dd..dc87706 100644 --- a/notes/helloshop/permission-definition.md +++ b/notes/helloshop/permission-definition.md @@ -1,8 +1,9 @@ -# 设计权限定义终结点 +# 设计权限定义和权限提供者 ## 权限定义 -每个微服务是自治的,权限定义也是在微服务内进行,各自定义自己的权限。 +每个微服务是自治的,权限定义也是每个微服务的职责,各自定义自己的权限,权限管理器会自动合并权限定义,权限定义上下文是微服务内的权限定义和全局权限定义的合集,权限提供者会根据权限定义上下文提供权限数据,权限分组是为了方便权限定义的管理,权限分组是权限定义的一部分,权限提供者自动注入到容器,提供权限查询端点。 + ## 架构设计