ICredentialsByHost.GetCredential(String, Int32, String) 方法
定义
返回指定的主机、端口和身份验证协议的凭据。Returns the credential for the specified host, port, and authentication protocol.
public:
System::Net::NetworkCredential ^ GetCredential(System::String ^ host, int port, System::String ^ authenticationType);
public System.Net.NetworkCredential GetCredential (string host, int port, string authenticationType);
public System.Net.NetworkCredential? GetCredential (string host, int port, string authenticationType);
abstract member GetCredential : string * int * string -> System.Net.NetworkCredential
Public Function GetCredential (host As String, port As Integer, authenticationType As String) As NetworkCredential
参数
- host
- String
对客户端进行身份验证的主机。The host computer that is authenticating the client.
- port
- Int32
客户端将与之通信的 host 上的端口。The port on host that the client will communicate with.
- authenticationType
- String
身份验证协议。The authentication protocol.
返回
指定的主机、端口和身份验证协议的 NetworkCredential;如果指定的主机、端口和身份验证协议没有可用的凭据,则为 null。A NetworkCredential for the specified host, port, and authentication protocol, or null if there are no credentials available for the specified host, port, and authentication protocol.
注解
的值 authType 与属性相对应 IAuthenticationModule.AuthenticationType 。The value of authType corresponds to the IAuthenticationModule.AuthenticationType property.