Saml2SecurityTokenHandler.CreateAttributeStatement Method (ClaimsIdentity, SecurityTokenDescriptor)

.NET Framework (current version)
 

Creates a Saml2AttributeStatement object from a token descriptor.

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

protected virtual Saml2AttributeStatement CreateAttributeStatement(
	ClaimsIdentity subject,
	SecurityTokenDescriptor tokenDescriptor
)

Parameters

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.Saml2AttributeStatement

A Saml2AttributeStatement 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: