Implement GetOrCreateApplicationAuthentication

Implements the endpoint for creating an application authorization token.
This commit is contained in:
Haacked
2013-10-09 16:28:59 -07:00
parent 9d71d406fa
commit 33ad79c0fe
19 changed files with 653 additions and 4 deletions
@@ -0,0 +1,27 @@
using System.Diagnostics.CodeAnalysis;
namespace Octokit
{
public class TwoFactorChallengeResult
{
[SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes",
Justification = "It really is immutable yo!")]
public static readonly TwoFactorChallengeResult RequestResendCode = new TwoFactorChallengeResult(null, true);
public TwoFactorChallengeResult(string authenticationCode)
: this(authenticationCode, false)
{
Ensure.ArgumentNotNull(authenticationCode, "authenticationCode");
}
TwoFactorChallengeResult(string authenticationCode, bool resendCodeRequested)
{
AuthenticationCode = authenticationCode;
ResendCodeRequested = resendCodeRequested;
}
public bool ResendCodeRequested { get; private set; }
public string AuthenticationCode { get; private set; }
}
}