Claims Based Authentication and Token Based Authentication和WIF
基于声明的认证方式,其最大特性是可传递(一方面是由授信的Issuer,即claims持有方,发送到你的应用上,注意信任是单向的。例如QQ集成登录,登录成功后,QQ会向你的应用发送claims。另一方面可在Issuer之间传递,例如A公司的AD和B公司的AD之间传递),主要用于第三方认证和单点登陆(For claims-based applications,single sign-on for the web is sometimes called passive federation).
A claim is a statement that one subject makes about itself or another subject. The statement can be about a name, identity, key, group, privilege, or capability, for example. Claims are issued by a provider, and they are given one or more values and then packaged in security tokens that are issued by an issuer, commonly known as a security token service (STS).
Claim is piece of information that describes given identity on some aspect. Take claim as name-value pair. Claims are held in authentication token that may have also signature so you can be sure that token is not tampered on its way from remote machine to your system. You can think of token as envelop that contains claims about user.
Token may contain different claims:
- username or user ID in remote system,
- full name of user,
- e-mail address,
- membership in security groups,
- phone number,
- color of eyes.
System can use claims to identify and describe given user from more than one aspect. This is something you don’t achieve easily with regular username-password based authentication mechanisms.

security token传递方式:
Security tokens that are passed over the Internet typically take one of two forms:
- Security Assertion Markup Language (SAML) tokens are XML-encoded structures that are embedded inside other structures such as HTTP form posts and SOAP messages.
- Simple Web Token (SWT) tokens that are stored in the HTTP headers of a request or response.
The tokens are encrypted and can be stored on the client as cookies.
Claims Based Authentication
Claims are a set of information stored in a key – value pair form. Claims are used to store information about user like full name, phone number, email address.... and the most important thing is that you can use claims as a replacement of roles, that you can transfer the roles to be a claim for a user.
The most important benefit from claims is that you can let a third party authenticate users, and the third party will retrieve to you if this user is authenticated or not and also what claims are for this user.

Token Based Authentication
Token store a set of data in (local/session storage or cookies), these could be stored in server or client side, the token itself is represented in hash of the cookie or session.
In token based authentication, when a request comes, it should have the token with it, the server first will authenticate the attached token with the request, then it will search for the associated cookie for it and bring the information needed from that cookie.
An Introduction to Claims
https://msdn.microsoft.com/zh-cn/library/ff359101.aspx
Claims-Based Architectures
https://msdn.microsoft.com/en-us/library/ff359108.aspx
WIF(Windows Identity Foundation) 4.5 是一组用于在您的应用程序中实施基于声明的标识的 .NET Framework 类)
包含以下程序集:
mscorlib (mscorlib.dll),
System.IdentityModel(System.IdentityModel.dll),
System.IdentityModel.Services (System.IdentityModel.Services.dll),
System.ServiceModel(System.ServiceModel.dll)
注意从4.5开始,System.IdentityModel.Claims, System.IdentityModel.Policy, and System.IdentityModel.Selectors 将被抛弃
Claims Based Authentication and Token Based Authentication和WIF的更多相关文章
- remote: Incorrect username or password ( access token ) fatal: Authentication failed for
gitee推送到远程仓库时提示错误remote: Incorrect username or password ( access token )fatal: Authentication failed ...
- python测试开发django-rest-framework-60.使用token登录(authentication之TokenAuthentication)
前言 现在很多接口项目在登录的时候返回一个token,登录后的拿着这个token去访问访问登录之后的请求. 本篇使用djangorestframework框架写一个登陆的接口,登录成功后返回token ...
- HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'。
情况:WCF服务在浏览器中可以正常浏览,但是通过程序调用提示: HTTP request is unauthorized with client authentication scheme 'Anon ...
- Token Based Authentication in Web API 2
原文地址:http://www.c-sharpcorner.com/uploadfile/736ca4/token-based-authentication-in-web-api-2/ Introdu ...
- Asp.Net MVC webAPI Token based authentication
1. 需要安装的nuget <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" ta ...
- Token Based Authentication -- Implementation Demonstration
https://www.w3.org/2001/sw/Europe/events/foaf-galway/papers/fp/token_based_authentication/
- Forms Authentication and Role based Authorization: A Quicker, Simpler, and Correct Approach
https://www.codeproject.com/Articles/36836/Forms-Authentication-and-Role-based-Authorization Problem ...
- sharepoint adfs Adding Claims to an Existing Token Issuer in SharePoint 2010
转载链接 http://www.theidentityguy.com/articles/2010/10/19/adding-claims-to-an-existing-token-issuer-i ...
- LR中,URL -based script与HTML -based script区别
在Web(HTTP/HTML)录制中,有2种重要的录制模式.用户该选择那种录制模式呢?HTML-mode录制是缺省也是推荐的录制模式.它录制当前网页中的HTML动作.在录制会话过程中不会录制所有的资源 ...
随机推荐
- MFC命令消息的路由
下面,我们以Menu这个程序为例,来看看 菜单命令消息路由的具体过程:当单击某个菜单项时,最先接收到这个菜单命令消息的是框架类.框架类将把接收到的这个消息交给它的子窗口.即视类,由视类首先进行处理.视 ...
- Java-Maven-Runoob:Maven 插件
ylbtech-Java-Maven-Runoob:Maven 插件 1.返回顶部 1. Maven 插件 Maven 有以下三个标准的生命周期: clean:项目清理的处理 default(或 bu ...
- python开发初识函数:函数定义,返回值,参数
一,函数的定义 1,函数mylen叫做函数名 #函数名 #必须由字母下划线数字组成,不能是关键字,不能是数字开头 #函数名还是要有一定的意义能够简单说明函数的功能 2,def是关键字 (define) ...
- MVC中Ajax post 和Ajax Get——提交对象Model
HTTP 请求:GET vs. POST两种在客户端和服务器端进行请求-响应的常用方法是:GET 和 POST.GET - 从指定的资源请求数据POST - 向指定的资源提交要处理的数据GET 基本上 ...
- 实战MvcPager(PagerOptions自定义样式&同、异步)
ASP.NET MVC下的分页控件MvcPager用起来简直太嗨呸了,两句代码实现一个分页,而且需要改变样式的时候直接构造PagerOptions类 实战无需多说,拿来用之即可.个人觉得对性能影响不大 ...
- java实现递归(1)
1.递归算法基本思路: Java递归算法是基于Java语言实现的递归算法.递归算法是一种直接或者间接调用自身函数或者方法的算法.递归算法实质是把问题分解成规模缩小的同类问题的子问题,然后递归调用方法表 ...
- python's thirteenth day for me 迭代器 生成器
迭代器: for 循环可以循环的就是可迭代对象. 可迭代对象:str, list, tuple, dict, set, range. 迭代器:f1文件句柄. 可迭代协议: 可以被迭代要满足的要求就叫做 ...
- transfrom-runtime文档
transfrom-runtime文档 babel只会默认对句法进行转换,而那些方法,api不会转换,要转就要使用polyfill和transform,这里介绍transform,关于polyfill ...
- Deep Learning 学习笔记(3):Linear Regression 数据的预处理
为了获得良好的收敛,在进行梯度下降前,我们可以对数据进行预处理. 目标是使得数据大小在同一个数据数量级上,均值为零. 一般将数据放缩到(-1,1)区间, 我们可以对数据进行如下操作: 其中u1是数据的 ...
- php浏览器端调试输出方法
1.利用js打印到浏览器控制台 <?php function console_log($data) { if (is_array($data) || is_object($data)) ...