共用方式為


SamlSecurityTokenHandler.CreateAttribute 方法

定義

建立宣告的 SamlAttribute 物件。

protected:
 virtual System::IdentityModel::Tokens::SamlAttribute ^ CreateAttribute(System::Security::Claims::Claim ^ claim, System::IdentityModel::Tokens::SecurityTokenDescriptor ^ tokenDescriptor);
protected virtual System.IdentityModel.Tokens.SamlAttribute CreateAttribute (System.Security.Claims.Claim claim, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member CreateAttribute : System.Security.Claims.Claim * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.SamlAttribute
override this.CreateAttribute : System.Security.Claims.Claim * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.SamlAttribute
Protected Overridable Function CreateAttribute (claim As Claim, tokenDescriptor As SecurityTokenDescriptor) As SamlAttribute

參數

claim
Claim

要從其中產生 SAML 屬性的 Claim

tokenDescriptor
SecurityTokenDescriptor

權杖描述元。

傳回

包含已轉換之宣告的 SamlAttribute

例外狀況

claimnull

適用於