Introduction¶ 介绍
Authorization refers to the process that determines what a user is able to do. For example user Adam may be able to create a document library, add documents, edit documents and delete them. User Bob may only be authorized to read documents in a single library.
授权指的是确定一个用户可以做什么的过程。例如用户Adam可以新建文档库、添加文档、编辑文档以及删除。用户Bob只能被授权在某一个库中阅读文档。
Authorization is orthogonal and independent from authentication, which is the process of ascertaining who a user is. Authentication may create one or more identities for the current user.
授权是与身份验证正交并且独立的。身份验证是确认一个用户是谁的过程。身份验证可以为当前用户创建一个或多个身份。
Namespaces¶ 命名空间
Authorization components, including the AuthorizeAttribute and AllowAnonymousAttribute attributes are found in the Microsoft.AspNetCore.Authorization namespace.
授权包括AuthorizeAttribute和AllowAnonymousAttribute属性,可在Microsoft.AspNetCore.Authorization命名空间中找到。
本文详细介绍了ASP.NET Core中的授权机制,包括其与身份验证的区别,授权类型的划分,以及如何通过要求和处理器评估用户的权限。此外,还介绍了授权组件在Microsoft.AspNetCore.Authorization命名空间中的使用。
117

被折叠的 条评论
为什么被折叠?



