SamlSecurityTokenHandler.CreateAttributeStatement Method (SamlSubject, ClaimsIdentity, SecurityTokenDescriptor)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a SamlAttributeStatement object from a token descriptor.

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

protected virtual SamlAttributeStatement CreateAttributeStatement(
	SamlSubject samlSubject,
	ClaimsIdentity subject,
	SecurityTokenDescriptor tokenDescriptor
)

Parameters

samlSubject
Type: System.IdentityModel.Tokens.SamlSubject

The SamlSubject to use in the SamlAttributeStatement that is created.

subject
Type: System.Security.Claims.ClaimsIdentity

The ClaimsIdentity object that contains claims which will be converted to SAML Attributes.

tokenDescriptor
Type: System.IdentityModel.Tokens.SecurityTokenDescriptor

The token descriptor.

Return Value

Type: System.IdentityModel.Tokens.SamlAttributeStatement

A SamlAttributeStatement that contains the converted claims.

This method may return null if the token descriptor does not contain any subject or the subject does not have any claims.

.NET Framework
Available since 4.5
Return to top
Show: