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

Commit

Permalink
Merge pull request #131 from DuendeSoftware/brock/reorg
Browse files Browse the repository at this point in the history
organize folders/files
  • Loading branch information
leastprivilege authored Aug 17, 2022
2 parents 493d819 + ea58981 commit 15fbba8
Show file tree
Hide file tree
Showing 59 changed files with 16 additions and 18 deletions.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/Duende.Bff/Duende.Bff.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="all"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />

<PackageReference Include="Duende.AccessTokenManagement.OpenIdConnect" Version="1.0.0-preview.4" />
</ItemGroup>

<ItemGroup>
<None Include="../../LICENSE" Pack="true" Visible="false" PackagePath=""/>
<None Include="../../icon.png" Pack="true" Visible="false" PackagePath=""/>
<None Include="../../LICENSE" Pack="true" Visible="false" PackagePath="" />
<None Include="../../icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Duende.Bff;

internal static class Extensions
internal static class HttpContextExtensions
{
public static void CheckForBffMiddleware(this HttpContext context, BffOptions options)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,3 @@ public interface IReturnUrlValidator
/// <returns></returns>
Task<bool> IsValidAsync(string returnUrl);
}

class LocalUrlReturnUrlValidator : IReturnUrlValidator
{
/// <inheritdoc/>
public Task<bool> IsValidAsync(string returnUrl)
{
return Task.FromResult(Util.IsLocalUrl(returnUrl));
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
// Copyright (c) Duende Software. All rights reserved.
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using System;
using System.Threading.Tasks;

namespace Duende.Bff;

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

internal static bool IsLocalUrl(string url)
{
if (string.IsNullOrEmpty(url))
Expand Down Expand Up @@ -44,4 +51,4 @@ static bool HasControlCharacter(ReadOnlySpan<char> readOnlySpan)
return false;
}
}
}
}
File renamed without changes.
File renamed without changes.

0 comments on commit 15fbba8

Please sign in to comment.