I'm having trouble finding a quick way to authenticate users. LogonUser takes several seconds to return when a connection to the domain controller is slow or not available.
I'm using LOGON32_LOGON_NETWORK as the logon type, which I've read it's faster, but the function still takes several seconds to return on those occasions. I assume it's the server timeout before resorting to the cached credentials.
Since I don't want/need the domain validation:
- is there any way to reduce the timeout before using the cached credentials?
- is there any way to authenticate only locally (without checking with the domain controller at all)?
- are there other ways to authenticate the logged-on user that are faster?