Export (0) Print
Expand All

KerberosSecurityTokenProvider Constructor (String, TokenImpersonationLevel)

Initializes a new instance of the KerberosSecurityTokenProvider class using the specified service principal name and whether a client allows a recipient of the KerberosRequestorSecurityToken security token to impersonate the client's credentials.

Namespace:  System.IdentityModel.Selectors
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public KerberosSecurityTokenProvider(
	string servicePrincipalName,
	TokenImpersonationLevel tokenImpersonationLevel
)

Parameters

servicePrincipalName
Type: System.String

The service principal name to get a KerberosRequestorSecurityToken security token for.

tokenImpersonationLevel
Type: System.Security.Principal.TokenImpersonationLevel

A TokenImpersonationLevel that specifies the degree to which a recipient of the KerberosRequestorSecurityToken security token can act on behalf of the client.

ExceptionCondition
ArgumentOutOfRangeException

tokenImpersonationLevel is not Identification or Impersonation.

ArgumentNullException

servicePrincipalName is null.

The current context of the calling thread (DefaultNetworkCredentials) is used as a client identity.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft