Saml2SecurityTokenHandler.CreateAttribute Method

Definition

Creates a Saml2Attribute object from a claim.

C#
protected virtual System.IdentityModel.Tokens.Saml2Attribute CreateAttribute(System.Security.Claims.Claim claim, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);

Parameters

claim
Claim

The Claim from which to generate the SAML Attribute.

tokenDescriptor
SecurityTokenDescriptor

The token descriptor.

Returns

A Saml2Attribute that contains the converted claim.

Exceptions

claim is null.

Applies to

Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1