Saml2SecurityTokenHandler.AddDelegateToAttributes(ClaimsIdentity, ICollection<Saml2Attribute>, SecurityTokenDescriptor) 方法
定义
将所有与该主题相关的委托添加到特性集合中。Adds all of the delegates associated with the subject into the attribute collection.
protected:
virtual void AddDelegateToAttributes(System::Security::Claims::ClaimsIdentity ^ subject, System::Collections::Generic::ICollection<System::IdentityModel::Tokens::Saml2Attribute ^> ^ attributes, System::IdentityModel::Tokens::SecurityTokenDescriptor ^ tokenDescriptor);
protected virtual void AddDelegateToAttributes (System.Security.Claims.ClaimsIdentity subject, System.Collections.Generic.ICollection<System.IdentityModel.Tokens.Saml2Attribute> attributes, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member AddDelegateToAttributes : System.Security.Claims.ClaimsIdentity * System.Collections.Generic.ICollection<System.IdentityModel.Tokens.Saml2Attribute> * System.IdentityModel.Tokens.SecurityTokenDescriptor -> unit
override this.AddDelegateToAttributes : System.Security.Claims.ClaimsIdentity * System.Collections.Generic.ICollection<System.IdentityModel.Tokens.Saml2Attribute> * System.IdentityModel.Tokens.SecurityTokenDescriptor -> unit
Protected Overridable Sub AddDelegateToAttributes (subject As ClaimsIdentity, attributes As ICollection(Of Saml2Attribute), tokenDescriptor As SecurityTokenDescriptor)
参数
- subject
- ClaimsIdentity
此 ClaimsIdentity 对象的委托将序列化到 Saml2Attribute。The delegate of this ClaimsIdentity object will be serialized into a Saml2Attribute.
- attributes
- ICollection<Saml2Attribute>
Saml2Attribute 类型的集合。A collection of type Saml2Attribute.
- tokenDescriptor
- SecurityTokenDescriptor
标记描述符。The token descriptor.
例外
subject 为 null。subject is null.
或-or-
tokenDescriptor 为 null。tokenDescriptor is null.