KerberosRequestorSecurityToken Constructors

Definition

Initializes a new instance of the KerberosRequestorSecurityToken class.

Overloads

KerberosRequestorSecurityToken(String)

Initializes a new instance of the KerberosRequestorSecurityToken class using a service that is associated with the specified service principal name.

KerberosRequestorSecurityToken(String, TokenImpersonationLevel, NetworkCredential, String)

Initializes a new instance of the KerberosRequestorSecurityToken class.

KerberosRequestorSecurityToken(String)

Initializes a new instance of the KerberosRequestorSecurityToken class using a service that is associated with the specified service principal name.

public:
 KerberosRequestorSecurityToken(System::String ^ servicePrincipalName);
public KerberosRequestorSecurityToken (string servicePrincipalName);
new System.IdentityModel.Tokens.KerberosRequestorSecurityToken : string -> System.IdentityModel.Tokens.KerberosRequestorSecurityToken
Public Sub New (servicePrincipalName As String)

Parameters

servicePrincipalName
String

The service principal name for the KerberosRequestorSecurityToken security token. Sets the ServicePrincipalName property.

Exceptions

servicePrincipalName is null.

A Kerberos ticket cannot be obtained for the current user.

Remarks

The service principal name must be in one of the following formats: host/<hostname>@<domain> or <hostname>, where hostname is the name of the computer hosting the target Web service and domain is the fully-qualified domain name of the Kerberos realm in which the host computer resides. The service principal name is associated with an account that is running the service and this mapping is stored in the Kerberos Domain Controller (KDC).

Applies to

KerberosRequestorSecurityToken(String, TokenImpersonationLevel, NetworkCredential, String)

Initializes a new instance of the KerberosRequestorSecurityToken class.

public:
 KerberosRequestorSecurityToken(System::String ^ servicePrincipalName, System::Security::Principal::TokenImpersonationLevel tokenImpersonationLevel, System::Net::NetworkCredential ^ networkCredential, System::String ^ id);
public KerberosRequestorSecurityToken (string servicePrincipalName, System.Security.Principal.TokenImpersonationLevel tokenImpersonationLevel, System.Net.NetworkCredential networkCredential, string id);
new System.IdentityModel.Tokens.KerberosRequestorSecurityToken : string * System.Security.Principal.TokenImpersonationLevel * System.Net.NetworkCredential * string -> System.IdentityModel.Tokens.KerberosRequestorSecurityToken
Public Sub New (servicePrincipalName As String, tokenImpersonationLevel As TokenImpersonationLevel, networkCredential As NetworkCredential, id As String)

Parameters

servicePrincipalName
String

The service principal name for the KerberosRequestorSecurityToken security token. Sets the ServicePrincipalName property.

tokenImpersonationLevel
TokenImpersonationLevel

One of the TokenImpersonationLevel values that specifies how the client allows the KerberosRequestorSecurityToken security token to be impersonated.

networkCredential
NetworkCredential

A NetworkCredential that specifies the user to get a KerberosRequestorSecurityToken security token for.

id
String

A unique identifier of the security token. Sets the value of the Id property.

Exceptions

servicePrincipalName is null.

-or-

id is null.

networkCredential is not null, not equal to DefaultNetworkCredentials and the UserName property is empty or null.

A Kerberos ticket cannot be obtained for the specified user.

tokenImpersonationLevel is not Impersonation or Identity.

Remarks

The service principal name must be in one of the following formats: host/<hostname>@<domain> or <hostname>, where hostname is the name of the computer hosting the target Web service and domain is the fully-qualified domain name of the Kerberos realm in which the host computer resides. The service principal name is associated with an account that is running the service and this mapping is stored in the Kerberos Domain Controller (KDC).

When null is passed into the networkCredential parameter, a KerberosRequestorSecurityToken security token is obtained for the current user.

Applies to