Saml2SecurityTokenHandler.CreateAuthenticationStatement Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.