forked from xiongyuxing/tiku-backend.net
feat(security): add distributed authorization foundation
This commit is contained in:
@@ -13,6 +13,7 @@ public sealed class SecurityDiagnosticsController(
|
||||
{
|
||||
[Authorize(Policy = TikuPolicies.AuthenticatedUser)]
|
||||
[HttpGet("authenticated")]
|
||||
[EndpointSummary("诊断已登录用户上下文")]
|
||||
public ActionResult<object> Authenticated()
|
||||
{
|
||||
return Ok(new
|
||||
@@ -24,6 +25,7 @@ public sealed class SecurityDiagnosticsController(
|
||||
|
||||
[Authorize(Policy = TikuPolicies.CurrentTenantMember)]
|
||||
[HttpGet("tenant-member")]
|
||||
[EndpointSummary("诊断当前租户成员上下文")]
|
||||
public ActionResult<object> TenantMember()
|
||||
{
|
||||
return Ok(new
|
||||
@@ -34,6 +36,7 @@ public sealed class SecurityDiagnosticsController(
|
||||
|
||||
[Authorize(Policy = TikuPolicies.TenantAdmin)]
|
||||
[HttpGet("tenant-admin")]
|
||||
[EndpointSummary("诊断当前租户管理员上下文")]
|
||||
public ActionResult<object> TenantAdmin()
|
||||
{
|
||||
return Ok(new
|
||||
|
||||
Reference in New Issue
Block a user