简体   繁体   中英

What is “valid” meaning in PrincipalContext.ValidateCredentials method?

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

What does "valid" mean here? Does it mean that whent the user is valid all are of this list are true at the same time:

  • password not expired,
  • account not locked
  • etc.

or it simply means that there is some record (even for the user account that is "disabled") for given "userName" and "password"?

The source code for the .NET Core implementation is available to view. It should be much the same as the full .NET Framework implementation.

ValidateCredentials performs an LDAP Bind to the domain. Essentially, it performs a login on a domain controller. So, yes, "valid" means that the password is not expired, the account is not locked, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM