SamlSecurityTokenHandler.AddDelegateToAttributes(ClaimsIdentity, ICollection<SamlAttribute>, SecurityTokenDescriptor) 方法

定义

将所有与 ActAs 主题相关的委托添加到特性集合中。Adds all of the delegates associated with the ActAs subject into the attribute collection.

protected:
 virtual void AddDelegateToAttributes(System::Security::Claims::ClaimsIdentity ^ subject, System::Collections::Generic::ICollection<System::IdentityModel::Tokens::SamlAttribute ^> ^ attributes, System::IdentityModel::Tokens::SecurityTokenDescriptor ^ tokenDescriptor);
protected virtual void AddDelegateToAttributes (System.Security.Claims.ClaimsIdentity subject, System.Collections.Generic.ICollection<System.IdentityModel.Tokens.SamlAttribute> attributes, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member AddDelegateToAttributes : System.Security.Claims.ClaimsIdentity * System.Collections.Generic.ICollection<System.IdentityModel.Tokens.SamlAttribute> * System.IdentityModel.Tokens.SecurityTokenDescriptor -> unit
override this.AddDelegateToAttributes : System.Security.Claims.ClaimsIdentity * System.Collections.Generic.ICollection<System.IdentityModel.Tokens.SamlAttribute> * System.IdentityModel.Tokens.SecurityTokenDescriptor -> unit
Protected Overridable Sub AddDelegateToAttributes (subject As ClaimsIdentity, attributes As ICollection(Of SamlAttribute), tokenDescriptor As SecurityTokenDescriptor)

参数

subject
ClaimsIdentity

ClaimsIdentity 对象的委托将序列化到 SamlAttributeThe delegate of this ClaimsIdentity object will be serialized into a SamlAttribute. 该委托通过 Actor 属性来指定。The delegate is specified by the Actor property.

attributes
ICollection<SamlAttribute>

将序列化 ActAs 标记的特性集合。The attribute collection to which the ActAs token will be serialized.

tokenDescriptor
SecurityTokenDescriptor

标记描述符。The token descriptor.

例外

subjectnullsubject is null.

-or- tokenDescriptornulltokenDescriptor is null.

适用于