public GlobalBindController(Keys bindKey, BindMethod method, HookBehaviour behaviour, List <KeyValuePair <GBC_KeyModifier, Action> > modifiers) { key = bindKey; Method = method; Behaviour = behaviour; Execute = false; ptrHookKey = IntPtr.Zero; ptrHookModKey = IntPtr.Zero; shiftDetected = false; controlDetected = false; altDetected = false; tasks = modifiers; bindFunctions = CreateBindActions(tasks); functionSuccessful = false; }
public static extern int ldap_bind_s([In] ConnectionHandle ldapHandle, string dn, SEC_WINNT_AUTH_IDENTITY_EX credentials, BindMethod method);
public static extern int ldap_bind_s([In]ConnectionHandle ldapHandle, string dn, SEC_WINNT_AUTH_IDENTITY_EX credentials, BindMethod method);
private int InternalBind(NetworkCredential tempCredential, SEC_WINNT_AUTH_IDENTITY_EX cred, BindMethod method) { int error; if (LocalAppContextSwitches.UseBasicAuthFallback) { if (tempCredential == null && (AuthType == AuthType.External || AuthType == AuthType.Kerberos)) { error = BindSasl(); } else { error = LdapPal.BindToDirectory(_ldapHandle, cred.user, cred.password); } } else { if (method == BindMethod.LDAP_AUTH_NEGOTIATE) { if (tempCredential == null) { error = BindSasl(); } else { // Explicit credentials were provided. If we call ldap_bind_s it will // return LDAP_NOT_SUPPORTED, so just skip the P/Invoke. error = (int)LdapError.NotSupported; } } else { // Basic and Anonymous are handled elsewhere. Debug.Assert(AuthType != AuthType.Anonymous && AuthType != AuthType.Basic); error = (int)LdapError.AuthUnknown; } } return(error); }
private int InternalBind(NetworkCredential tempCredential, SEC_WINNT_AUTH_IDENTITY_EX cred, BindMethod method) { int error; if (tempCredential == null && (AuthType == AuthType.External || AuthType == AuthType.Kerberos)) { error = BindSasl(); } else { error = Interop.Ldap.ldap_simple_bind(_ldapHandle, cred.user, cred.password); } return(error); }
internal static extern int ldap_bind_s(SafeHandle ld, string who, string password, BindMethod method);
internal static extern int ldap_bind_s(SafeHandle ld, string who, SEC_WINNT_AUTH_IDENTITY_EX credentials, BindMethod method);
private int InternalBind(NetworkCredential tempCredential, SEC_WINNT_AUTH_IDENTITY_EX cred, BindMethod method) => tempCredential == null && AuthType == AuthType.External ? Interop.Ldap.ldap_bind_s(_ldapHandle, null, null, method) : Interop.Ldap.ldap_bind_s(_ldapHandle, null, cred, method);