8000 Hide GitCredentialType from public API · GiTechLab/libgit2sharp@9d91bd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d91bd5

Browse files
committed
Hide GitCredentialType from public API
1 parent 2c4457e commit 9d91bd5

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

LibGit2Sharp/Core/GitCredentialType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace LibGit2Sharp.Core
66
/// Authentication type requested.
77
/// </summary>
88
[Flags]
9-
public enum GitCredentialType
9+
internal enum GitCredentialType
1010
{
1111
/// <summary>
1212
/// A plaintext username and password.

LibGit2Sharp/Credentials.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ public abstract class Credentials
1212
/// Callback to acquire a credential object.
1313
/// </summary>
1414
/// <param name="cred">The newly created credential object.</param>
15-
/// <param name="url">The resource for which we are demanding a credential.</param>
16-
/// <param name="usernameFromUrl">The username that was embedded in a "user@host"</param>
17-
/// <param name="types">A bitmask stating which cred types are OK to return.</param>
18-
/// <param name="payload">The payload provided when specifying this callback.</param>
1915
/// <returns>0 for success, &lt; 0 to indicate an error, &gt; 0 to indicate no credential was acquired.</returns>
20-
protected internal abstract int GitCredentialHandler(out IntPtr cred, IntPtr url, IntPtr usernameFromUrl, GitCredentialType types, IntPtr payload);
16+
protected internal abstract int GitCredentialHandler(out IntPtr cred);
2117
}
2218
}

LibGit2Sharp/DefaultCredentials.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ public sealed class DefaultCredentials : Credentials
1313
/// Callback to acquire a credential object.
1414
/// </summary>
1515
/// <param name="cred">The newly created credential object.</param>
16-
/// <param name="url">The resource for which we are demanding a credential.</param>
17-
/// <param name="usernameFromUrl">The username that was embedded in a "user@host"</param>
18-
/// <param name="types">A bitmask stating which cred types are OK to return.</param>
19-
/// <param name="payload">The payload provided when specifying this callback.</param>
2016
/// <returns>0 for success, &lt; 0 to indicate an error, &gt; 0 to indicate no credential was acquired.</returns>
21-
protected internal override int GitCredentialHandler(out IntPtr cred, IntPtr url, IntPtr usernameFromUrl, GitCredentialType types, IntPtr payload)
17+
protected internal override int GitCredentialHandler(out IntPtr cred)
2218
{
2319
return NativeMethods.git_cred_default_new(out cred);
2420
}

LibGit2Sharp/RemoteCallbacks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private int GitCredentialHandler(out IntPtr ptr, IntPtr cUrl, IntPtr usernameFro
223223

224224
var cred = CredentialsProvider(url, username, types);
225225

226-
return cred.GitCredentialHandler(out ptr, cUrl, usernameFromUrl, credTypes, payload);
226+
return cred.GitCredentialHandler(out ptr);
227227
}
228228

229229
#endregion

LibGit2Sharp/UsernamePasswordCredentials.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ public sealed class UsernamePasswordCredentials : Credentials
1212
/// Callback to acquire a credential object.
1313
/// </summary>
1414
/// <param name="cred">The newly created credential object.</param>
15-
/// <param name="url">The resource for which we are demanding a credential.</param>
16-
/// <param name="usernameFromUrl">The username that was embedded in a "user@host"</param>
17-
/// <param name="types">A bitmask stating which cred types are OK to return.</param>
18-
/// <param name="payload">The payload provided when specifying this callback.</param>
1915
/// <returns>0 for success, &lt; 0 to indicate an error, &gt; 0 to indicate no credential was acquired.</returns>
20-
protected internal override int GitCredentialHandler(out IntPtr cred, IntPtr url, IntPtr usernameFromUrl, GitCredentialType types, IntPtr payload)
16+
protected internal override int GitCredentialHandler(out IntPtr cred)
2117
{
2218
if (Username == null || Password == null)
2319
{

0 commit comments

Comments
 (0)
0