Implement Authorizations Delete method with 2fa code

When we delete an authorization, we often need to use basic
authentication because the client might not have the associated token
stored anymore. If 2fa is enabled, the client needs to be able to pass
that along.
This commit is contained in:
Haacked
2015-04-21 13:40:26 -07:00
parent 4ca3db562a
commit 23bb76a112
7 changed files with 123 additions and 6 deletions
+17
View File
@@ -178,5 +178,22 @@ namespace Octokit
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>A <see cref="Task"/> for the request's execution.</returns>
Task Delete(int id);
/// <summary>
/// Deletes the specified <see cref="Authorization"/>.
/// </summary>
/// <remarks>
/// This method requires authentication.
/// See the <a href="http://developer.github.com/v3/oauth/#delete-an-authorization">API
/// documentation</a> for more details.
/// </remarks>
/// <param name="id">The system-wide ID of the authorization to delete</param>
/// <param name="twoFactorAuthenticationCode">Two factor authorization code</param>
/// <exception cref="AuthorizationException">
/// Thrown when the current user does not have permission to make the request.
/// </exception>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>A <see cref="Task"/> for the request's execution.</returns>
Task Delete(int id, string twoFactorAuthenticationCode);
}
}