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