EndpointIdentity.CreateIdentity(Claim) 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 an identity with the specified claim.
public:
static System::ServiceModel::EndpointIdentity ^ CreateIdentity(System::IdentityModel::Claims::Claim ^ identity);
public static System.ServiceModel.EndpointIdentity CreateIdentity (System.IdentityModel.Claims.Claim identity);
static member CreateIdentity : System.IdentityModel.Claims.Claim -> System.ServiceModel.EndpointIdentity
Public Shared Function CreateIdentity (identity As Claim) As EndpointIdentity
Parameters
Returns
An EndpointIdentity associated with the specified identity
.
Exceptions
identity
is null
.
Examples
The following code shows how to call this method.
// Utility function to create an EndpointIdentity from a ClaimSet.
private EndpointIdentity CreateIdentityFromClaimSet(ClaimSet claims)
{
foreach (Claim claim in claims.FindClaims(null, Rights.Identity))
{
return EndpointIdentity.CreateIdentity(claim);
}
return null;
}
Remarks
A secure WCF client that connects to an endpoint with this identity verifies that the claims presented by the server contain the identity claim used to construct this identity.
This method can create an identity of type DnsEndpointIdentity, SpnEndpointIdentity, UpnEndpointIdentity, or RsaEndpointIdentity.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor