Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit f8d7ab9

Browse files
committed
moves cache cleanup
1 parent 7d94334 commit f8d7ab9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Solid.Identity.Protocols.Saml2p/Middleware/Idp/CompleteSsoEndpointMiddleware.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ public override async Task InvokeAsync(HttpContext context)
6767
if (request == null)
6868
throw new SecurityException($"SAMLRequest not found for id: '{id}'");
6969

70-
await Cache.RemoveAsync(id);
71-
7270
Trace("Found cached SAMLRequest.", request);
7371
var partner = await Partners.GetServiceProviderAsync(request.Issuer);
7472

@@ -79,6 +77,7 @@ public override async Task InvokeAsync(HttpContext context)
7977
// throw new SecurityException($"Partner '{partnerId}' is disabled.");
8078

8179
var status = await Cache.FetchStatusAsync(id);
80+
await Cache.RemoveAsync(id);
8281
if (status != null)
8382
{
8483
Trace("Found cached Status.", request.RelayState, status);

0 commit comments

Comments
 (0)