From ea58981bf93c695e95dd62bef485fe7e43f9ce4d Mon Sep 17 00:00:00 2001 From: Brock Allen Date: Tue, 16 Aug 2022 14:40:07 -0400 Subject: [PATCH] organize folders/files --- .../BffApplicationBuilderExtensions.cs | 0 src/Duende.Bff/{ => Configuration}/BffBuilder.cs | 0 .../BffEndpointRouteBuilderExtensions.cs | 0 src/Duende.Bff/{ => Configuration}/BffOptions.cs | 0 .../BffRemoteApiEndpointExtensions.cs | 0 .../BffRemoteApiEndpointMetadata.cs | 0 .../BffServiceCollectionExtensions.cs | 0 .../EndpointConventionBuilderExtensions.cs | 0 src/Duende.Bff/Duende.Bff.csproj | 10 +++++----- .../BffApiAttribute.cs | 0 .../BffApiSkipAntiforgeryAttribute.cs | 0 .../BffAuthorizationMiddlewareResultHandler.cs | 0 .../{ => EndpointProcessing}/BffMiddleware.cs | 0 .../BffUserAccessTokenParameters.cs | 0 .../IBffApiEndpoint.cs | 0 .../IBffApiSkipAntiforgry.cs | 0 .../DefaultBackchannelLogoutService.cs | 0 .../BackchannelLogout}/IBackchannelLogoutService.cs | 0 .../Diagnostics}/DefaultDiagnosticsService.cs | 0 .../Diagnostics}/IDiagnosticsService.cs | 0 .../{ => EndpointServices}/IBffEndpointService.cs | 0 .../Login}/DefaultLoginService.cs | 0 .../Login}/ILoginService.cs | 0 .../Logout}/DefaultLogoutService.cs | 0 .../Logout}/ILogoutService.cs | 0 .../SilentLogin}/BffOpenIdConnectEvents.cs | 0 .../DefaultSilentLoginCallbackService.cs | 0 .../SilentLogin}/DefaultSilentLoginService.cs | 0 .../SilentLogin}/ISilentLoginCallbackService.cs | 0 .../SilentLogin}/ISilentLoginService.cs | 0 .../PostConfigureOidcOptionsForSilentLogin.cs | 0 .../User}/DefaultUserService.cs | 0 .../User}/IUserService.cs | 0 .../AuthenticationPropertiesExtensions.cs | 0 .../AuthenticationTicketExtensions.cs | 0 .../HttpContextExtensions.cs} | 2 +- .../{Endpoints => General}/IReturnUrlValidator.cs | 9 --------- src/Duende.Bff/{Endpoints => General}/License.cs | 0 .../{Endpoints => General}/LicenseValidator.cs | 0 .../LocalUrlReturnUrlValidator.cs} | 13 ++++++++++--- src/Duende.Bff/{ => General}/Log.cs | 0 src/Duende.Bff/{ => General}/TokenType.cs | 0 ...tConfigureApplicationCookieRevokeRefreshToken.cs | 0 .../PostConfigureApplicationCookieTicketStore.cs | 0 .../PostConfigureApplicationValidatePrincipal.cs | 0 .../PostConfigureSlidingExpirationCheck.cs | 0 .../{ => Revocation}/ISessionRevocationService.cs | 0 .../{ => Revocation}/NopSessionRevocationService.cs | 0 .../{ => Revocation}/SessionRevocationService.cs | 0 .../{ => SessionStore}/IUserSessionStore.cs | 0 .../{ => SessionStore}/IUserSessionStoreCleanup.cs | 0 .../{ => SessionStore}/InMemoryUserSessionStore.cs | 0 .../{ => SessionStore}/SessionCleanupHost.cs | 0 .../{ => SessionStore}/UserSession.cs | 0 .../{ => SessionStore}/UserSessionUpdate.cs | 0 .../{ => SessionStore}/UserSessionsFilter.cs | 0 .../{ => TicketStore}/IServerTicketStore.cs | 0 .../{ => TicketStore}/ServerSideTicketStore.cs | 0 .../{ => TicketStore}/TicketStoreShim.cs | 0 59 files changed, 16 insertions(+), 18 deletions(-) rename src/Duende.Bff/{ => Configuration}/BffApplicationBuilderExtensions.cs (100%) rename src/Duende.Bff/{ => Configuration}/BffBuilder.cs (100%) rename src/Duende.Bff/{Endpoints => Configuration}/BffEndpointRouteBuilderExtensions.cs (100%) rename src/Duende.Bff/{ => Configuration}/BffOptions.cs (100%) rename src/Duende.Bff/{Endpoints => Configuration}/BffRemoteApiEndpointExtensions.cs (100%) rename src/Duende.Bff/{Endpoints => Configuration}/BffRemoteApiEndpointMetadata.cs (100%) rename src/Duende.Bff/{ => Configuration}/BffServiceCollectionExtensions.cs (100%) rename src/Duende.Bff/{Endpoints => Configuration}/EndpointConventionBuilderExtensions.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointProcessing}/BffApiAttribute.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointProcessing}/BffApiSkipAntiforgeryAttribute.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointProcessing}/BffAuthorizationMiddlewareResultHandler.cs (100%) rename src/Duende.Bff/{ => EndpointProcessing}/BffMiddleware.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointProcessing}/BffUserAccessTokenParameters.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointProcessing}/IBffApiEndpoint.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointProcessing}/IBffApiSkipAntiforgry.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/BackchannelLogout}/DefaultBackchannelLogoutService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/BackchannelLogout}/IBackchannelLogoutService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/Diagnostics}/DefaultDiagnosticsService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/Diagnostics}/IDiagnosticsService.cs (100%) rename src/Duende.Bff/{ => EndpointServices}/IBffEndpointService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/Login}/DefaultLoginService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/Login}/ILoginService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/Logout}/DefaultLogoutService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/Logout}/ILogoutService.cs (100%) rename src/Duende.Bff/{ => EndpointServices/SilentLogin}/BffOpenIdConnectEvents.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/SilentLogin}/DefaultSilentLoginCallbackService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/SilentLogin}/DefaultSilentLoginService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/SilentLogin}/ISilentLoginCallbackService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/SilentLogin}/ISilentLoginService.cs (100%) rename src/Duende.Bff/{ => EndpointServices/SilentLogin}/PostConfigureOidcOptionsForSilentLogin.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/User}/DefaultUserService.cs (100%) rename src/Duende.Bff/{Endpoints => EndpointServices/User}/IUserService.cs (100%) rename src/Duende.Bff/{Endpoints => Extensions}/AuthenticationPropertiesExtensions.cs (100%) rename src/Duende.Bff/{SessionManagement => Extensions}/AuthenticationTicketExtensions.cs (100%) rename src/Duende.Bff/{Extensions.cs => Extensions/HttpContextExtensions.cs} (97%) rename src/Duende.Bff/{Endpoints => General}/IReturnUrlValidator.cs (72%) rename src/Duende.Bff/{Endpoints => General}/License.cs (100%) rename src/Duende.Bff/{Endpoints => General}/LicenseValidator.cs (100%) rename src/Duende.Bff/{Endpoints/Util.cs => General/LocalUrlReturnUrlValidator.cs} (78%) rename src/Duende.Bff/{ => General}/Log.cs (100%) rename src/Duende.Bff/{ => General}/TokenType.cs (100%) rename src/Duende.Bff/SessionManagement/{ => Configuration}/PostConfigureApplicationCookieRevokeRefreshToken.cs (100%) rename src/Duende.Bff/SessionManagement/{ => Configuration}/PostConfigureApplicationCookieTicketStore.cs (100%) rename src/Duende.Bff/SessionManagement/{ => Configuration}/PostConfigureApplicationValidatePrincipal.cs (100%) rename src/Duende.Bff/SessionManagement/{ => Configuration}/PostConfigureSlidingExpirationCheck.cs (100%) rename src/Duende.Bff/SessionManagement/{ => Revocation}/ISessionRevocationService.cs (100%) rename src/Duende.Bff/SessionManagement/{ => Revocation}/NopSessionRevocationService.cs (100%) rename src/Duende.Bff/SessionManagement/{ => Revocation}/SessionRevocationService.cs (100%) rename src/Duende.Bff/SessionManagement/{ => SessionStore}/IUserSessionStore.cs (100%) rename src/Duende.Bff/SessionManagement/{ => SessionStore}/IUserSessionStoreCleanup.cs (100%) rename src/Duende.Bff/SessionManagement/{ => SessionStore}/InMemoryUserSessionStore.cs (100%) rename src/Duende.Bff/SessionManagement/{ => SessionStore}/SessionCleanupHost.cs (100%) rename src/Duende.Bff/SessionManagement/{ => SessionStore}/UserSession.cs (100%) rename src/Duende.Bff/SessionManagement/{ => SessionStore}/UserSessionUpdate.cs (100%) rename src/Duende.Bff/SessionManagement/{ => SessionStore}/UserSessionsFilter.cs (100%) rename src/Duende.Bff/SessionManagement/{ => TicketStore}/IServerTicketStore.cs (100%) rename src/Duende.Bff/SessionManagement/{ => TicketStore}/ServerSideTicketStore.cs (100%) rename src/Duende.Bff/SessionManagement/{ => TicketStore}/TicketStoreShim.cs (100%) diff --git a/src/Duende.Bff/BffApplicationBuilderExtensions.cs b/src/Duende.Bff/Configuration/BffApplicationBuilderExtensions.cs similarity index 100% rename from src/Duende.Bff/BffApplicationBuilderExtensions.cs rename to src/Duende.Bff/Configuration/BffApplicationBuilderExtensions.cs diff --git a/src/Duende.Bff/BffBuilder.cs b/src/Duende.Bff/Configuration/BffBuilder.cs similarity index 100% rename from src/Duende.Bff/BffBuilder.cs rename to src/Duende.Bff/Configuration/BffBuilder.cs diff --git a/src/Duende.Bff/Endpoints/BffEndpointRouteBuilderExtensions.cs b/src/Duende.Bff/Configuration/BffEndpointRouteBuilderExtensions.cs similarity index 100% rename from src/Duende.Bff/Endpoints/BffEndpointRouteBuilderExtensions.cs rename to src/Duende.Bff/Configuration/BffEndpointRouteBuilderExtensions.cs diff --git a/src/Duende.Bff/BffOptions.cs b/src/Duende.Bff/Configuration/BffOptions.cs similarity index 100% rename from src/Duende.Bff/BffOptions.cs rename to src/Duende.Bff/Configuration/BffOptions.cs diff --git a/src/Duende.Bff/Endpoints/BffRemoteApiEndpointExtensions.cs b/src/Duende.Bff/Configuration/BffRemoteApiEndpointExtensions.cs similarity index 100% rename from src/Duende.Bff/Endpoints/BffRemoteApiEndpointExtensions.cs rename to src/Duende.Bff/Configuration/BffRemoteApiEndpointExtensions.cs diff --git a/src/Duende.Bff/Endpoints/BffRemoteApiEndpointMetadata.cs b/src/Duende.Bff/Configuration/BffRemoteApiEndpointMetadata.cs similarity index 100% rename from src/Duende.Bff/Endpoints/BffRemoteApiEndpointMetadata.cs rename to src/Duende.Bff/Configuration/BffRemoteApiEndpointMetadata.cs diff --git a/src/Duende.Bff/BffServiceCollectionExtensions.cs b/src/Duende.Bff/Configuration/BffServiceCollectionExtensions.cs similarity index 100% rename from src/Duende.Bff/BffServiceCollectionExtensions.cs rename to src/Duende.Bff/Configuration/BffServiceCollectionExtensions.cs diff --git a/src/Duende.Bff/Endpoints/EndpointConventionBuilderExtensions.cs b/src/Duende.Bff/Configuration/EndpointConventionBuilderExtensions.cs similarity index 100% rename from src/Duende.Bff/Endpoints/EndpointConventionBuilderExtensions.cs rename to src/Duende.Bff/Configuration/EndpointConventionBuilderExtensions.cs diff --git a/src/Duende.Bff/Duende.Bff.csproj b/src/Duende.Bff/Duende.Bff.csproj index 2435dc07..58091203 100644 --- a/src/Duende.Bff/Duende.Bff.csproj +++ b/src/Duende.Bff/Duende.Bff.csproj @@ -30,17 +30,17 @@ - + - - + + - - + + diff --git a/src/Duende.Bff/Endpoints/BffApiAttribute.cs b/src/Duende.Bff/EndpointProcessing/BffApiAttribute.cs similarity index 100% rename from src/Duende.Bff/Endpoints/BffApiAttribute.cs rename to src/Duende.Bff/EndpointProcessing/BffApiAttribute.cs diff --git a/src/Duende.Bff/Endpoints/BffApiSkipAntiforgeryAttribute.cs b/src/Duende.Bff/EndpointProcessing/BffApiSkipAntiforgeryAttribute.cs similarity index 100% rename from src/Duende.Bff/Endpoints/BffApiSkipAntiforgeryAttribute.cs rename to src/Duende.Bff/EndpointProcessing/BffApiSkipAntiforgeryAttribute.cs diff --git a/src/Duende.Bff/Endpoints/BffAuthorizationMiddlewareResultHandler.cs b/src/Duende.Bff/EndpointProcessing/BffAuthorizationMiddlewareResultHandler.cs similarity index 100% rename from src/Duende.Bff/Endpoints/BffAuthorizationMiddlewareResultHandler.cs rename to src/Duende.Bff/EndpointProcessing/BffAuthorizationMiddlewareResultHandler.cs diff --git a/src/Duende.Bff/BffMiddleware.cs b/src/Duende.Bff/EndpointProcessing/BffMiddleware.cs similarity index 100% rename from src/Duende.Bff/BffMiddleware.cs rename to src/Duende.Bff/EndpointProcessing/BffMiddleware.cs diff --git a/src/Duende.Bff/Endpoints/BffUserAccessTokenParameters.cs b/src/Duende.Bff/EndpointProcessing/BffUserAccessTokenParameters.cs similarity index 100% rename from src/Duende.Bff/Endpoints/BffUserAccessTokenParameters.cs rename to src/Duende.Bff/EndpointProcessing/BffUserAccessTokenParameters.cs diff --git a/src/Duende.Bff/Endpoints/IBffApiEndpoint.cs b/src/Duende.Bff/EndpointProcessing/IBffApiEndpoint.cs similarity index 100% rename from src/Duende.Bff/Endpoints/IBffApiEndpoint.cs rename to src/Duende.Bff/EndpointProcessing/IBffApiEndpoint.cs diff --git a/src/Duende.Bff/Endpoints/IBffApiSkipAntiforgry.cs b/src/Duende.Bff/EndpointProcessing/IBffApiSkipAntiforgry.cs similarity index 100% rename from src/Duende.Bff/Endpoints/IBffApiSkipAntiforgry.cs rename to src/Duende.Bff/EndpointProcessing/IBffApiSkipAntiforgry.cs diff --git a/src/Duende.Bff/Endpoints/DefaultBackchannelLogoutService.cs b/src/Duende.Bff/EndpointServices/BackchannelLogout/DefaultBackchannelLogoutService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/DefaultBackchannelLogoutService.cs rename to src/Duende.Bff/EndpointServices/BackchannelLogout/DefaultBackchannelLogoutService.cs diff --git a/src/Duende.Bff/Endpoints/IBackchannelLogoutService.cs b/src/Duende.Bff/EndpointServices/BackchannelLogout/IBackchannelLogoutService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/IBackchannelLogoutService.cs rename to src/Duende.Bff/EndpointServices/BackchannelLogout/IBackchannelLogoutService.cs diff --git a/src/Duende.Bff/Endpoints/DefaultDiagnosticsService.cs b/src/Duende.Bff/EndpointServices/Diagnostics/DefaultDiagnosticsService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/DefaultDiagnosticsService.cs rename to src/Duende.Bff/EndpointServices/Diagnostics/DefaultDiagnosticsService.cs diff --git a/src/Duende.Bff/Endpoints/IDiagnosticsService.cs b/src/Duende.Bff/EndpointServices/Diagnostics/IDiagnosticsService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/IDiagnosticsService.cs rename to src/Duende.Bff/EndpointServices/Diagnostics/IDiagnosticsService.cs diff --git a/src/Duende.Bff/IBffEndpointService.cs b/src/Duende.Bff/EndpointServices/IBffEndpointService.cs similarity index 100% rename from src/Duende.Bff/IBffEndpointService.cs rename to src/Duende.Bff/EndpointServices/IBffEndpointService.cs diff --git a/src/Duende.Bff/Endpoints/DefaultLoginService.cs b/src/Duende.Bff/EndpointServices/Login/DefaultLoginService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/DefaultLoginService.cs rename to src/Duende.Bff/EndpointServices/Login/DefaultLoginService.cs diff --git a/src/Duende.Bff/Endpoints/ILoginService.cs b/src/Duende.Bff/EndpointServices/Login/ILoginService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/ILoginService.cs rename to src/Duende.Bff/EndpointServices/Login/ILoginService.cs diff --git a/src/Duende.Bff/Endpoints/DefaultLogoutService.cs b/src/Duende.Bff/EndpointServices/Logout/DefaultLogoutService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/DefaultLogoutService.cs rename to src/Duende.Bff/EndpointServices/Logout/DefaultLogoutService.cs diff --git a/src/Duende.Bff/Endpoints/ILogoutService.cs b/src/Duende.Bff/EndpointServices/Logout/ILogoutService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/ILogoutService.cs rename to src/Duende.Bff/EndpointServices/Logout/ILogoutService.cs diff --git a/src/Duende.Bff/BffOpenIdConnectEvents.cs b/src/Duende.Bff/EndpointServices/SilentLogin/BffOpenIdConnectEvents.cs similarity index 100% rename from src/Duende.Bff/BffOpenIdConnectEvents.cs rename to src/Duende.Bff/EndpointServices/SilentLogin/BffOpenIdConnectEvents.cs diff --git a/src/Duende.Bff/Endpoints/DefaultSilentLoginCallbackService.cs b/src/Duende.Bff/EndpointServices/SilentLogin/DefaultSilentLoginCallbackService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/DefaultSilentLoginCallbackService.cs rename to src/Duende.Bff/EndpointServices/SilentLogin/DefaultSilentLoginCallbackService.cs diff --git a/src/Duende.Bff/Endpoints/DefaultSilentLoginService.cs b/src/Duende.Bff/EndpointServices/SilentLogin/DefaultSilentLoginService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/DefaultSilentLoginService.cs rename to src/Duende.Bff/EndpointServices/SilentLogin/DefaultSilentLoginService.cs diff --git a/src/Duende.Bff/Endpoints/ISilentLoginCallbackService.cs b/src/Duende.Bff/EndpointServices/SilentLogin/ISilentLoginCallbackService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/ISilentLoginCallbackService.cs rename to src/Duende.Bff/EndpointServices/SilentLogin/ISilentLoginCallbackService.cs diff --git a/src/Duende.Bff/Endpoints/ISilentLoginService.cs b/src/Duende.Bff/EndpointServices/SilentLogin/ISilentLoginService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/ISilentLoginService.cs rename to src/Duende.Bff/EndpointServices/SilentLogin/ISilentLoginService.cs diff --git a/src/Duende.Bff/PostConfigureOidcOptionsForSilentLogin.cs b/src/Duende.Bff/EndpointServices/SilentLogin/PostConfigureOidcOptionsForSilentLogin.cs similarity index 100% rename from src/Duende.Bff/PostConfigureOidcOptionsForSilentLogin.cs rename to src/Duende.Bff/EndpointServices/SilentLogin/PostConfigureOidcOptionsForSilentLogin.cs diff --git a/src/Duende.Bff/Endpoints/DefaultUserService.cs b/src/Duende.Bff/EndpointServices/User/DefaultUserService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/DefaultUserService.cs rename to src/Duende.Bff/EndpointServices/User/DefaultUserService.cs diff --git a/src/Duende.Bff/Endpoints/IUserService.cs b/src/Duende.Bff/EndpointServices/User/IUserService.cs similarity index 100% rename from src/Duende.Bff/Endpoints/IUserService.cs rename to src/Duende.Bff/EndpointServices/User/IUserService.cs diff --git a/src/Duende.Bff/Endpoints/AuthenticationPropertiesExtensions.cs b/src/Duende.Bff/Extensions/AuthenticationPropertiesExtensions.cs similarity index 100% rename from src/Duende.Bff/Endpoints/AuthenticationPropertiesExtensions.cs rename to src/Duende.Bff/Extensions/AuthenticationPropertiesExtensions.cs diff --git a/src/Duende.Bff/SessionManagement/AuthenticationTicketExtensions.cs b/src/Duende.Bff/Extensions/AuthenticationTicketExtensions.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/AuthenticationTicketExtensions.cs rename to src/Duende.Bff/Extensions/AuthenticationTicketExtensions.cs diff --git a/src/Duende.Bff/Extensions.cs b/src/Duende.Bff/Extensions/HttpContextExtensions.cs similarity index 97% rename from src/Duende.Bff/Extensions.cs rename to src/Duende.Bff/Extensions/HttpContextExtensions.cs index 6d5d3b60..382d00ab 100644 --- a/src/Duende.Bff/Extensions.cs +++ b/src/Duende.Bff/Extensions/HttpContextExtensions.cs @@ -10,7 +10,7 @@ namespace Duende.Bff; -internal static class Extensions +internal static class HttpContextExtensions { public static void CheckForBffMiddleware(this HttpContext context, BffOptions options) { diff --git a/src/Duende.Bff/Endpoints/IReturnUrlValidator.cs b/src/Duende.Bff/General/IReturnUrlValidator.cs similarity index 72% rename from src/Duende.Bff/Endpoints/IReturnUrlValidator.cs rename to src/Duende.Bff/General/IReturnUrlValidator.cs index ebf23c7d..866f0947 100644 --- a/src/Duende.Bff/Endpoints/IReturnUrlValidator.cs +++ b/src/Duende.Bff/General/IReturnUrlValidator.cs @@ -17,12 +17,3 @@ public interface IReturnUrlValidator /// Task IsValidAsync(string returnUrl); } - -class LocalUrlReturnUrlValidator : IReturnUrlValidator -{ - /// - public Task IsValidAsync(string returnUrl) - { - return Task.FromResult(Util.IsLocalUrl(returnUrl)); - } -} diff --git a/src/Duende.Bff/Endpoints/License.cs b/src/Duende.Bff/General/License.cs similarity index 100% rename from src/Duende.Bff/Endpoints/License.cs rename to src/Duende.Bff/General/License.cs diff --git a/src/Duende.Bff/Endpoints/LicenseValidator.cs b/src/Duende.Bff/General/LicenseValidator.cs similarity index 100% rename from src/Duende.Bff/Endpoints/LicenseValidator.cs rename to src/Duende.Bff/General/LicenseValidator.cs diff --git a/src/Duende.Bff/Endpoints/Util.cs b/src/Duende.Bff/General/LocalUrlReturnUrlValidator.cs similarity index 78% rename from src/Duende.Bff/Endpoints/Util.cs rename to src/Duende.Bff/General/LocalUrlReturnUrlValidator.cs index ee88780b..65428872 100644 --- a/src/Duende.Bff/Endpoints/Util.cs +++ b/src/Duende.Bff/General/LocalUrlReturnUrlValidator.cs @@ -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 { + /// + public Task IsValidAsync(string returnUrl) + { + return Task.FromResult(IsLocalUrl(returnUrl)); + } + internal static bool IsLocalUrl(string url) { if (string.IsNullOrEmpty(url)) @@ -44,4 +51,4 @@ static bool HasControlCharacter(ReadOnlySpan readOnlySpan) return false; } } -} \ No newline at end of file +} diff --git a/src/Duende.Bff/Log.cs b/src/Duende.Bff/General/Log.cs similarity index 100% rename from src/Duende.Bff/Log.cs rename to src/Duende.Bff/General/Log.cs diff --git a/src/Duende.Bff/TokenType.cs b/src/Duende.Bff/General/TokenType.cs similarity index 100% rename from src/Duende.Bff/TokenType.cs rename to src/Duende.Bff/General/TokenType.cs diff --git a/src/Duende.Bff/SessionManagement/PostConfigureApplicationCookieRevokeRefreshToken.cs b/src/Duende.Bff/SessionManagement/Configuration/PostConfigureApplicationCookieRevokeRefreshToken.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/PostConfigureApplicationCookieRevokeRefreshToken.cs rename to src/Duende.Bff/SessionManagement/Configuration/PostConfigureApplicationCookieRevokeRefreshToken.cs diff --git a/src/Duende.Bff/SessionManagement/PostConfigureApplicationCookieTicketStore.cs b/src/Duende.Bff/SessionManagement/Configuration/PostConfigureApplicationCookieTicketStore.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/PostConfigureApplicationCookieTicketStore.cs rename to src/Duende.Bff/SessionManagement/Configuration/PostConfigureApplicationCookieTicketStore.cs diff --git a/src/Duende.Bff/SessionManagement/PostConfigureApplicationValidatePrincipal.cs b/src/Duende.Bff/SessionManagement/Configuration/PostConfigureApplicationValidatePrincipal.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/PostConfigureApplicationValidatePrincipal.cs rename to src/Duende.Bff/SessionManagement/Configuration/PostConfigureApplicationValidatePrincipal.cs diff --git a/src/Duende.Bff/SessionManagement/PostConfigureSlidingExpirationCheck.cs b/src/Duende.Bff/SessionManagement/Configuration/PostConfigureSlidingExpirationCheck.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/PostConfigureSlidingExpirationCheck.cs rename to src/Duende.Bff/SessionManagement/Configuration/PostConfigureSlidingExpirationCheck.cs diff --git a/src/Duende.Bff/SessionManagement/ISessionRevocationService.cs b/src/Duende.Bff/SessionManagement/Revocation/ISessionRevocationService.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/ISessionRevocationService.cs rename to src/Duende.Bff/SessionManagement/Revocation/ISessionRevocationService.cs diff --git a/src/Duende.Bff/SessionManagement/NopSessionRevocationService.cs b/src/Duende.Bff/SessionManagement/Revocation/NopSessionRevocationService.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/NopSessionRevocationService.cs rename to src/Duende.Bff/SessionManagement/Revocation/NopSessionRevocationService.cs diff --git a/src/Duende.Bff/SessionManagement/SessionRevocationService.cs b/src/Duende.Bff/SessionManagement/Revocation/SessionRevocationService.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/SessionRevocationService.cs rename to src/Duende.Bff/SessionManagement/Revocation/SessionRevocationService.cs diff --git a/src/Duende.Bff/SessionManagement/IUserSessionStore.cs b/src/Duende.Bff/SessionManagement/SessionStore/IUserSessionStore.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/IUserSessionStore.cs rename to src/Duende.Bff/SessionManagement/SessionStore/IUserSessionStore.cs diff --git a/src/Duende.Bff/SessionManagement/IUserSessionStoreCleanup.cs b/src/Duende.Bff/SessionManagement/SessionStore/IUserSessionStoreCleanup.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/IUserSessionStoreCleanup.cs rename to src/Duende.Bff/SessionManagement/SessionStore/IUserSessionStoreCleanup.cs diff --git a/src/Duende.Bff/SessionManagement/InMemoryUserSessionStore.cs b/src/Duende.Bff/SessionManagement/SessionStore/InMemoryUserSessionStore.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/InMemoryUserSessionStore.cs rename to src/Duende.Bff/SessionManagement/SessionStore/InMemoryUserSessionStore.cs diff --git a/src/Duende.Bff/SessionManagement/SessionCleanupHost.cs b/src/Duende.Bff/SessionManagement/SessionStore/SessionCleanupHost.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/SessionCleanupHost.cs rename to src/Duende.Bff/SessionManagement/SessionStore/SessionCleanupHost.cs diff --git a/src/Duende.Bff/SessionManagement/UserSession.cs b/src/Duende.Bff/SessionManagement/SessionStore/UserSession.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/UserSession.cs rename to src/Duende.Bff/SessionManagement/SessionStore/UserSession.cs diff --git a/src/Duende.Bff/SessionManagement/UserSessionUpdate.cs b/src/Duende.Bff/SessionManagement/SessionStore/UserSessionUpdate.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/UserSessionUpdate.cs rename to src/Duende.Bff/SessionManagement/SessionStore/UserSessionUpdate.cs diff --git a/src/Duende.Bff/SessionManagement/UserSessionsFilter.cs b/src/Duende.Bff/SessionManagement/SessionStore/UserSessionsFilter.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/UserSessionsFilter.cs rename to src/Duende.Bff/SessionManagement/SessionStore/UserSessionsFilter.cs diff --git a/src/Duende.Bff/SessionManagement/IServerTicketStore.cs b/src/Duende.Bff/SessionManagement/TicketStore/IServerTicketStore.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/IServerTicketStore.cs rename to src/Duende.Bff/SessionManagement/TicketStore/IServerTicketStore.cs diff --git a/src/Duende.Bff/SessionManagement/ServerSideTicketStore.cs b/src/Duende.Bff/SessionManagement/TicketStore/ServerSideTicketStore.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/ServerSideTicketStore.cs rename to src/Duende.Bff/SessionManagement/TicketStore/ServerSideTicketStore.cs diff --git a/src/Duende.Bff/SessionManagement/TicketStoreShim.cs b/src/Duende.Bff/SessionManagement/TicketStore/TicketStoreShim.cs similarity index 100% rename from src/Duende.Bff/SessionManagement/TicketStoreShim.cs rename to src/Duende.Bff/SessionManagement/TicketStore/TicketStoreShim.cs