using System; using LibGit2Sharp.Core; namespace LibGit2Sharp { /// /// A credential object that will provide the "default" credentials /// (logged-in user information) via NTLM or SPNEGO authentication. /// public sealed class DefaultCredentials : Credentials { /// /// Callback to acquire a credential object. /// /// The newly created credential object. /// The resource for which we are demanding a credential. /// The username that was embedded in a "user@host" /// A bitmask stating which cred types are OK to return. /// The payload provided when specifying this callback. /// 0 for success, < 0 to indicate an error, > 0 to indicate no credential was acquired. protected internal override int GitCredentialHandler(out IntPtr cred, IntPtr url, IntPtr usernameFromUrl, GitCredentialType types, IntPtr payload) { return NativeMethods.git_cred_default_new(out cred); } } }