Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
rename IsValid
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Aug 16, 2022
1 parent 43716cc commit 4ef7f4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Duende.Bff/Endpoints/DefaultLoginService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public virtual async Task ProcessRequestAsync(HttpContext context)

if (!string.IsNullOrWhiteSpace(returnUrl))
{
if (!await ReturnUrlValidator.IsReturnUrlValid(returnUrl))
if (!await ReturnUrlValidator.IsValidAsync(returnUrl))
{
throw new Exception("returnUrl is not valid: " + returnUrl);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Duende.Bff/Endpoints/DefaultLogoutService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public virtual async Task ProcessRequestAsync(HttpContext context)

if (!string.IsNullOrWhiteSpace(returnUrl))
{
if (!await ReturnUrlValidator.IsReturnUrlValid(returnUrl))
if (!await ReturnUrlValidator.IsValidAsync(returnUrl))
{
throw new Exception("returnUrl is not valid: " + returnUrl);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Duende.Bff/Endpoints/IReturnUrlValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public interface IReturnUrlValidator
/// </summary>
/// <param name="returnUrl"></param>
/// <returns></returns>
Task<bool> IsReturnUrlValid(string returnUrl);
Task<bool> IsValidAsync(string returnUrl);
}

class LocalUrlReturnUrlValidator : IReturnUrlValidator
{
/// <inheritdoc/>
public Task<bool> IsReturnUrlValid(string returnUrl)
public Task<bool> IsValidAsync(string returnUrl)
{
return Task.FromResult(Util.IsLocalUrl(returnUrl));
}
Expand Down

0 comments on commit 4ef7f4f

Please sign in to comment.