Redigera

Dela via


Saml2SecurityTokenHandler.CreateAuthenticationStatement Method

Definition

Creates a SAML 2.0 authentication statement from the specified authentication information.

protected:
 virtual System::IdentityModel::Tokens::Saml2AuthenticationStatement ^ CreateAuthenticationStatement(System::Security::Claims::AuthenticationInformation ^ authInfo, System::IdentityModel::Tokens::SecurityTokenDescriptor ^ tokenDescriptor);
protected virtual System.IdentityModel.Tokens.Saml2AuthenticationStatement CreateAuthenticationStatement (System.Security.Claims.AuthenticationInformation authInfo, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member CreateAuthenticationStatement : System.Security.Claims.AuthenticationInformation * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.Saml2AuthenticationStatement
override this.CreateAuthenticationStatement : System.Security.Claims.AuthenticationInformation * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Tokens.Saml2AuthenticationStatement
Protected Overridable Function CreateAuthenticationStatement (authInfo As AuthenticationInformation, tokenDescriptor As SecurityTokenDescriptor) As Saml2AuthenticationStatement

Parameters

authInfo
AuthenticationInformation

An AuthenticationInformation object that contains the state to be wrapped as a Saml2AuthenticationStatement object.

tokenDescriptor
SecurityTokenDescriptor

The token descriptor.

Returns

A Saml2AuthenticationStatement to add to the assertion being created or null to ignore the AuthenticationInformation object (and not create a SAML 2.0 authentication statement).

Exceptions

tokenDescriptor is null.

-or-

The Subject property of tokenDescriptor is null.

The subject of the tokenDescriptor (the Subject property) contains claims with a claim type of either AuthenticationInstant or AuthenticationMethod but does not contain at least one claim of each type.

-or-

The authentication method specified by the subject of the tokenDescriptor cannot be resolved to an absolute URI.

Applies to