Saml2SecurityTokenHandler.CreateAttribute Method (Claim, SecurityTokenDescriptor)

.NET Framework (current version)
 

Creates a Saml2Attribute object from a claim.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

protected virtual Saml2Attribute CreateAttribute(
	Claim claim,
	SecurityTokenDescriptor tokenDescriptor
)

Parameters

claim
Type: System.Security.Claims.Claim

The Claim from which to generate the SAML Attribute.

tokenDescriptor
Type: System.IdentityModel.Tokens.SecurityTokenDescriptor

The token descriptor.

Return Value

Type: System.IdentityModel.Tokens.Saml2Attribute

A Saml2Attribute that contains the converted claim.

Exception Condition
ArgumentNullException

claim is null.

.NET Framework
Available since 4.5
Return to top
Show: