Removed test code from ApiKeySchemeHandler
This commit is contained in:
@@ -46,15 +46,11 @@ public class ApiKeySchemeHandler : AuthenticationHandler<ApiKeySchemeOptions>
|
|||||||
cacheKey,
|
cacheKey,
|
||||||
async ct =>
|
async ct =>
|
||||||
{
|
{
|
||||||
var x = await ApiKeyRepository
|
return await ApiKeyRepository
|
||||||
.Query()
|
.Query()
|
||||||
.Where(x => x.Key == authHeaderValue)
|
.Where(x => x.Key == authHeaderValue)
|
||||||
.Select(x => new ApiKeySession(x.Permissions, x.ValidUntil))
|
.Select(x => new ApiKeySession(x.Permissions, x.ValidUntil))
|
||||||
.FirstOrDefaultAsync(cancellationToken: ct);
|
.FirstOrDefaultAsync(cancellationToken: ct);
|
||||||
|
|
||||||
Console.WriteLine($"API: {x?.ValidUntil}");
|
|
||||||
|
|
||||||
return x;
|
|
||||||
},
|
},
|
||||||
new HybridCacheEntryOptions()
|
new HybridCacheEntryOptions()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user