Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Add missing awaits (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
adammorr authored Aug 29, 2019
1 parent 75c721f commit c40de5e
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public override async Task Invoke(IOwinContext context)
{
var recaptchaMonitor = context.Get<IRecaptchaMonitor>();

recaptchaMonitor?.ChallengeCompleted(openIdConnectRequest.ToRecaptchaUserContext(), recaptchaContext.ToRecaptchaResponseContext());
if (recaptchaMonitor != null)
{
await recaptchaMonitor.ChallengeCompleted(openIdConnectRequest.ToRecaptchaUserContext(), recaptchaContext.ToRecaptchaResponseContext());
}

recaptchaTracker.IsCompleted = true;
}
Expand Down Expand Up @@ -92,7 +95,10 @@ await loginStatistics.IncrementFailedLoginsForUserAndIpAddress(openIdConnectRequ
await loginStatistics.IncrementChallengedLoginsForUserAndIpAddress(openIdConnectRequest.GetUsername(),
openIdConnectRequest.GetRemoteIpAddress(), numberOfFailedLogins, Options.NumberOfAllowedLoginFailuresPerIpAddress);

recaptchaMonitor?.ChallengeIssued(openIdConnectRequest.ToRecaptchaUserContext());
if (recaptchaMonitor != null)
{
await recaptchaMonitor.ChallengeIssued(openIdConnectRequest.ToRecaptchaUserContext());
}

var httpChallenge = context.Get<IHttpRecaptchaChallenge>();
await httpChallenge.ReturnResponse(context, Options, openIdConnectRequest);
Expand Down

0 comments on commit c40de5e

Please sign in to comment.