Saml2SecurityTokenHandler.CreateClaims(Saml2SecurityToken) Method

Definition

Creates claims from a SAML 2.0 token.

protected:
 virtual System::Security::Claims::ClaimsIdentity ^ CreateClaims(System::IdentityModel::Tokens::Saml2SecurityToken ^ samlToken);
protected virtual System.Security.Claims.ClaimsIdentity CreateClaims (System.IdentityModel.Tokens.Saml2SecurityToken samlToken);
abstract member CreateClaims : System.IdentityModel.Tokens.Saml2SecurityToken -> System.Security.Claims.ClaimsIdentity
override this.CreateClaims : System.IdentityModel.Tokens.Saml2SecurityToken -> System.Security.Claims.ClaimsIdentity
Protected Overridable Function CreateClaims (samlToken As Saml2SecurityToken) As ClaimsIdentity

Parameters

samlToken
Saml2SecurityToken

A Saml2SecurityToken that represents the security token from which to create the claims.

Returns

An ClaimsIdentity that contains the claims extracted from the token.

Exceptions

samlToken is null.

The Assertion property of samlToken is null.

The handler is not configured or an issuer name registry is not configured for the handler. (The Configuration property is null or is set to a SecurityTokenHandlerConfiguration with an IssuerNameRegistry property that is null.

The issuer name returned by the configured issuer name registry for the security token (samlToken) is null or empty.

Applies to