什么是"有效"在PrincipalContext.ValidateCredentials方法中有什么意义?

时间:2018-05-24 07:00:38

标签: c# asp.net .net asp.net-mvc active-directory

PrincipalContext.ValidateCredentials method creates the connection to the server and validates the specified credentials if the connection is successful.

"有效"这意味着什么是否意味着当用户有效时,此列表中的所有人都同时true

  • 密码未过期,
  • 帐号未锁定

或者它只是意味着对于给定的" userName"有一些记录(即使对于#34;禁用"的用户帐户)。和"密码"?

1 个答案:

答案 0 :(得分:0)

可以查看source code for the .NET Core implementation。它应该与完整的.NET Framework实现完全相同。

ValidateCredentials执行LDAP绑定到域。实质上,它在域控制器上执行登录。所以,是的,“有效”表示密码未过期,帐户未锁定等等。