KerberosRequestorSecurityToken Constructors
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.
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.
Exceptions
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.