Browse Source
Rename `IsValidateAsync` to `IsValidAsync`
pull/26028/head
maliming
7 days ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
4 changed files with
4 additions and
4 deletions
-
modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpIdentitySessionCookieAuthenticationOptionsExtensions.cs
-
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IIdentitySessionChecker.cs
-
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/NullIdentitySessionChecker.cs
-
modules/identity/test/Volo.Abp.Identity.AspNetCore.Tests/Volo/Abp/Identity/AspNetCore/FakeIdentitySessionChecker.cs
|
|
|
@ -60,7 +60,7 @@ public static class AbpIdentitySessionCookieAuthenticationOptionsExtensions |
|
|
|
var identitySessionChecker = httpContext.RequestServices.GetRequiredService<IIdentitySessionChecker>(); |
|
|
|
using (currentTenant.Change(principal.FindTenantId())) |
|
|
|
{ |
|
|
|
return await identitySessionChecker.IsValidateAsync(sessionId); |
|
|
|
return await identitySessionChecker.IsValidAsync(sessionId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -4,5 +4,5 @@ namespace Volo.Abp.Identity; |
|
|
|
|
|
|
|
public interface IIdentitySessionChecker |
|
|
|
{ |
|
|
|
Task<bool> IsValidateAsync(string sessionId); |
|
|
|
Task<bool> IsValidAsync(string sessionId); |
|
|
|
} |
|
|
|
|
|
|
|
@ -5,7 +5,7 @@ namespace Volo.Abp.Identity; |
|
|
|
|
|
|
|
public class NullIdentitySessionChecker : IIdentitySessionChecker, ISingletonDependency |
|
|
|
{ |
|
|
|
public Task<bool> IsValidateAsync(string sessionId) |
|
|
|
public Task<bool> IsValidAsync(string sessionId) |
|
|
|
{ |
|
|
|
return Task.FromResult(true); |
|
|
|
} |
|
|
|
|
|
|
|
@ -14,7 +14,7 @@ public class FakeIdentitySessionChecker : IIdentitySessionChecker, ISingletonDep |
|
|
|
{ |
|
|
|
public HashSet<string> RevokedSessionIds { get; } = new(); |
|
|
|
|
|
|
|
public Task<bool> IsValidateAsync(string sessionId) |
|
|
|
public Task<bool> IsValidAsync(string sessionId) |
|
|
|
{ |
|
|
|
return Task.FromResult(!RevokedSessionIds.Contains(sessionId)); |
|
|
|
} |
|
|
|
|