Authentication和Authorization的区别

搞不太清楚Authentication和Authorization的区别,在网上搜了一下,lucky16的一篇文章讲的通俗,看了就懂,记录下来:

你要登机,你需要出示你的身份证和机票,身份证是为了证明你张三确实是你张三,这就是 authentication;而机票是为了证明你张三确实买了票可以上飞机,这就是 authorization。

在 computer science 领域再举个例子:
你要登陆论坛,输入用户名张三,密码1234,密码正确,证明你张三确实是张三,这就是 authentication;再一check用户张三是个版主,所以有权限加精删别人帖,这就是 authorization。

原文链接

时间: 2024-08-10 00:05:42

Authentication和Authorization的区别的相关文章

ASP.NET Core Authentication and Authorization

最近把一个Asp .net core 2.0的项目迁移到Asp .net core 3.1,项目启动的时候直接报错: InvalidOperationException: Endpoint CoreAuthorization.Controllers.HomeController.Index (CoreAuthorization) contains authorization metadata, but a middleware was not found that supports author

认证 (authentication) 和授权 (authorization) 的区别

authentication 和 authorization是两个比较容易混淆的词.其实很简单,举个例子来说: 你要登机,你需要出示你的身份证和机票,身份证是为了证明你张三确实是你张三,这就是 authentication:而机票是为了证明你张三确实买了票可以上飞机,这就是 authorization. 再举一个计算机领域的例子: 你登录一个系统,输入用户名张三,密码123,密码正确,证明你张三确实是张三,这个过程叫authentication:而你是一个一般用户,只有浏览该系统的权限,而李四是

Claims-Based Authentication and Authorization

Introduction You can download the Visual Studio solutions for this article at this location. With all the Nuget binaries, it's about 57 MB (too big to be hosted here at CodeProject.com). The out-of-the-box authentication and authorization mechanisms

shiro Apache 框架的学习之authentication 和authorization

shiro  作为Apache的开源项目.该框架下的主要模块包含如下: 1,Subject 2,SecurityManager 3,Authenticator 4,Authorizer 5,Realm 6,SessionManager 7,SessionDao 8,CacheManager 9,Cryptography 源码下载链接:http://shiro.apache.org/download.html  详见官网. 如下以版本1.4学习为主. shiro 作为java security 

How-to: Enable User Authentication and Authorization in Apache HBase

With the default Apache HBase configuration, everyone is allowed to read from and write to all tables available in the system. For many enterprise setups, this kind of policy is unacceptable. Administrators can set up firewalls that decide which mach

WebApi2官网学习记录--- Authentication与Authorization

Authentication(认证)   WebAPI中的认证既可以使用HttpModel也可以使用HTTP message handler,具体使用哪个可以参考一下依据: 一个HttpModel可以检测ASP.NET请求管道中的所有请求,一个message handler仅仅可以检测到被路由到这个WebAPI的请求 可以预先设置message handlers,让特定的route使用指定的authentication scheme Http Module只能在IIS中使用,Message ha

用户认证:基于jwt和session的区别和优缺点

背景知识: Authentication和Authorization的区别: Authentication:用户认证,指的是验证用户的身份,例如你希望以小A的身份登录,那么应用程序需要通过用户名和密码确认你真的是小A. Authorization:授权,指的是确认你的身份之后提供给你权限,例如用户小A可以修改数据,而用户小B只能阅读数据. 由于http协议是无状态的,每一次请求都无状态.当一个用户通过用户名和密码登录了之后,他的下一个请求不会携带任何状态,应用程序无法知道他的身份,那就必须重新认

Restful API 的设计规范

Restful API 的设计规范 1. URI URI规范 资源集合 vs 单个资源 避免层级过深的URI 对Composite资源的访问 2. Request HTTP方法 安全性和幂等性 复杂查询 Bookmarker Format Content Negotiation 6. Response 分页response 7. 错误处理 8. 服务型资源 9. 异步任务 10. API的演进 版本 URI失效 11. 安全 参考文档 本文总结了 RESTful API 设计相关的一些原则,只覆

关于RESTful一些注意事项,和自己整理的接口开发规范

https://blog.csdn.net/u013731455/article/details/56278168 最近在研究restful,公司开发要使用,所以自己就去网上找了好些资料,并整理了一套公司开发的接口规范.当然,我也只是刚刚入坑.还不是很全面.但是这就是一个过程.一点点,总会好起来的.以下是就是RESTful接口规范: 一.   URI URI规范 1.不用大写: 2.用中杠 - 不用下杠 _ : 3.参数列表要encode: 4.URI中的名词表示资源集合,使用复数形式. 5.在