Authentication vs. Authorization 验证与授权(转)
首先我们必须要分清验证与授权之间的区别,这样才能使我们更好的理解他们在本文档(Passport Guide)中所代表的含义。顾名思义,看上去他们的区别很明显,但是对于我们来说,重要的是理解他们之间的关联关系。
P.S.:从字面上看,两者中文的区别一目了然,但是在英文中这两个单词是非常容易混淆的
au·then·ti·ca·tion [aw thènt káysh'n] noun:
The verification of credentials presented by an individual or process in order to determine identity.
验证:通常当我们要识别某个个体或者某段进程(请求)的身份时,都要对他们所提供的身份信息进行鉴定,这个鉴定过程我们称之为验证
au·thor·i·za·tion [àwthr záysh'n ] noun:
To grant an individual permission to do something or be somewhere.
授权:系统赋予某个个体在一定范围内从事某些行动的权利,这个过程我们称之为授权
Authentication is the process of recognizing who an individual is by verifying credentials. Authorization is the act of deciding what that individual has access to. When someone asks for your driver's license, for example, it is a form of authentication. Your driver's license provides a way for you to identify yourself to others in order to assist in many transactions.
验证是通过检查身份信息来确定某个个体的过程,验证是决定某个个体行为规范的行为。简单来说,验证是确定你是谁?授权则是允许你做什么。举例来说,有些时候你需要出示驾照来说明你的身份,这就是一种验证的表现形式。而在很多时候,你的驾照做为一种证明你身份的手段来使你通过验证以及获得各种授权
Your driver's license alone does not determine whether you can legally engage in any age restricted activities (voting, for example). It only verifies the relevant credentials, such as date of birth, so that permission can be given for an activity.
但是你的驾照并不能帮你通过一些类似于需要年龄限制的验证(比如投票)。这些验证需要你出示与其相关的身份证明,如您的出生日期,这样你才可以获得相应的准许(授权)
P.S.:我想,这段文字说明的即使是同一用户,选择的功能不同,那么他需要的验证信息也是不同的。比如现在大多WEB站点需要password和financePassword(二级财务密码),一个做为用户登陆身份验证,另一个pass做为用户进行财务操作时候的验证使用
It is possible to authenticate someone without any authorization, but it is difficult to imagine authorizing someone for some purpose without also requiring that they go through some form of authentication.
也许您会验证某个用户之后却并未给起任何授权,但是我们不提倡未经任何形式的验证就给予某些用户的某种形式的授权
P.S.:比较绕嘴,验证未必授权,授权必需验证^_^
Passport is focused on authentication. This is important, as it means that you remain in control of authorizing your own services. One of the benefits of Passport is that it offloads the need for you to run an authentication system, resetting passwords and other related tasks, while still leaving you control over who can use your site.
Passport只是做为一个通用化的验证平台,明确这一点很重要,每个Passport的Relying Party必须根据自己的业务需求来对通过验证的ACCOUNT进行授权。帮您建立和维护用户验证系统,用户不必再为多个网站必须牢记多个帐号/密码而烦恼,Passport为您想到做到….just so so任何一个计算机系统都应该有权限模块,把权限剥分成验证和授权,这的确是让人思路清晰的解决方法,当然Passport已经做到了,感谢MicroSoft的文档,这对我的确很有帮助。对于微软的天才儿童们,除了感叹……所有的开发人员联合起来,为干掉微软而努力吧!
关于身份验证和授权的区别
下面是我的理解:
当你出国是你必须具有两样东西。护照和签证,护照就想身份验证,他只能证明你的身份,而不能作别的,而签证就想授权,签证表明,你可以在这个国家,干什么,这就想授权一样。