2014-04-24 16:14:19 UTC
I am working on a java HTTP client that could support native NTLM/Negotiate using JNA (inspired by https://github.com/dblock/waffle)
I have this working when using the currently logged in user credentials, but am struck getting it to work with with a configurable username/password.
I can successfully call:
Advapi32.INSTANCE.LogonUser(username, domain, password, logonType,
and then have tried:
but this is not working. The docs for 'AcquireCredentialsHandle' say
"These can be either preexisting credentials, which are established through a system logon that is not described here"
Any pointers on how to pass credentials to AcquireCredentialsHandle? In JNA, the signature for AcquireCredentialsHandle is:
public int AcquireCredentialsHandle(
String pszPrincipal, String pszPackage,
int fCredentialUse, LUID pvLogonID,
Pointer pAuthData, Pointer pGetKeyFn,
Pointer pvGetKeyArgument, CredHandle phCredential,
Any ideas? Sorry if this is off-topic