KerberosRequestorSecurityToken KerberosRequestorSecurityToken KerberosRequestorSecurityToken KerberosRequestorSecurityToken Constructors

定义

重载

KerberosRequestorSecurityToken(String) KerberosRequestorSecurityToken(String) KerberosRequestorSecurityToken(String) KerberosRequestorSecurityToken(String)

使用与指定的服务主体名称关联的服务来初始化 KerberosRequestorSecurityToken 类的新实例。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) KerberosRequestorSecurityToken(String, TokenImpersonationLevel, NetworkCredential, String) KerberosRequestorSecurityToken(String, TokenImpersonationLevel, NetworkCredential, String)

初始化 KerberosRequestorSecurityToken 类的新实例。Initializes a new instance of the KerberosRequestorSecurityToken class.

KerberosRequestorSecurityToken(String) KerberosRequestorSecurityToken(String) KerberosRequestorSecurityToken(String) KerberosRequestorSecurityToken(String)

使用与指定的服务主体名称关联的服务来初始化 KerberosRequestorSecurityToken 类的新实例。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)

参数

servicePrincipalName
String String String String

KerberosRequestorSecurityToken 安全令牌的服务主体名称。The service principal name for the KerberosRequestorSecurityToken security token. 设置 ServicePrincipalName 属性。Sets the ServicePrincipalName property.

异常

servicePrincipalNamenullservicePrincipalName is null.

无法为当前用户获取 Kerberos 票证。A Kerberos ticket cannot be obtained for the current user.

注解

服务主体名称必须采用下列格式之一:host/<hostname>@<domain><hostname>;其中,hostname 是承载目标 Web 服务的计算机的名称,而 domain 是主计算机所在的 Kerberos 领域的完全限定域名。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. 服务主体名称与运行该服务的帐户关联,并且此映射存储在 Kerberos 域控制器 (KDC) 中。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).

KerberosRequestorSecurityToken(String, TokenImpersonationLevel, NetworkCredential, String) KerberosRequestorSecurityToken(String, TokenImpersonationLevel, NetworkCredential, String) KerberosRequestorSecurityToken(String, TokenImpersonationLevel, NetworkCredential, String)

初始化 KerberosRequestorSecurityToken 类的新实例。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

参数

servicePrincipalName
String String String String

KerberosRequestorSecurityToken 安全令牌的服务主体名称。The service principal name for the KerberosRequestorSecurityToken security token. 设置 ServicePrincipalName 属性。Sets the ServicePrincipalName property.

tokenImpersonationLevel
TokenImpersonationLevel TokenImpersonationLevel TokenImpersonationLevel TokenImpersonationLevel

TokenImpersonationLevel 值之一,它指定客户端允许在何种级别上模拟 KerberosRequestorSecurityToken 安全令牌。One of the TokenImpersonationLevel values that specifies how the client allows the KerberosRequestorSecurityToken security token to be impersonated.

networkCredential
NetworkCredential NetworkCredential NetworkCredential NetworkCredential

一个 NetworkCredential,它指定要为其获取 KerberosRequestorSecurityToken 安全令牌的用户。A NetworkCredential that specifies the user to get a KerberosRequestorSecurityToken security token for.

id
String String String String

安全令牌的唯一标识符。A unique identifier of the security token. 设置 Id 属性的值。Sets the value of the Id property.

异常

servicePrincipalNamenullservicePrincipalName is null.

- 或 --or- idnullid is null.

networkCredential 不为 null 且不等于 DefaultNetworkCredentials,而 UserName 属性为空或 nullnetworkCredential is not null, not equal to DefaultNetworkCredentials and the UserName property is empty or null.

无法为指定用户获得 Kerberos 票证。A Kerberos ticket cannot be obtained for the specified user.

tokenImpersonationLevel 不是 ImpersonationIdentitytokenImpersonationLevel is not Impersonation or Identity.

注解

服务主体名称必须采用下列格式之一:host/<hostname>@<domain><hostname>;其中,hostname 是承载目标 Web 服务的计算机的名称,而 domain 是主计算机所在的 Kerberos 领域的完全限定域名。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. 服务主体名称与运行该服务的帐户关联,并且此映射存储在 Kerberos 域控制器 (KDC) 中。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).

null 被传递到 networkCredential 参数中时,将为当前用户获得 KerberosRequestorSecurityToken 安全令牌。When null is passed into the networkCredential parameter, a KerberosRequestorSecurityToken security token is obtained for the current user.

适用于