Redigera

Dela via


Saml2SecurityTokenHandler.CreateAttributeStatement Method

Definition

Creates a Saml2AttributeStatement object from a token descriptor.

protected:
 virtual System::IdentityModel::Tokens::Saml2AttributeStatement ^ CreateAttributeStatement(System::Security::Claims::ClaimsIdentity ^ subject, System::IdentityModel::Tokens::SecurityTokenDescriptor ^ tokenDescriptor);
protected virtual System.IdentityModel.Tokens.Saml2AttributeStatement CreateAttributeStatement (System.Security.Claims.ClaimsIdentity subject, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member CreateAttributeStatement : System.Security.Claims.ClaimsIdentity * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.Saml2AttributeStatement
override this.CreateAttributeStatement : System.Security.Claims.ClaimsIdentity * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.Saml2AttributeStatement
Protected Overridable Function CreateAttributeStatement (subject As ClaimsIdentity, tokenDescriptor As SecurityTokenDescriptor) As Saml2AttributeStatement

Parameters

subject
ClaimsIdentity

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

tokenDescriptor
SecurityTokenDescriptor

The token descriptor.

Returns

A Saml2AttributeStatement that contains the converted claims.

Remarks

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

Applies to