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.

Exception Condition
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
Available since 3.0
Return to top
Show: