last ...
This commit is contained in:
@@ -333,6 +333,19 @@ namespace xIdentityService.Interfaces
|
||||
string token,
|
||||
string request
|
||||
);
|
||||
|
||||
//
|
||||
Task<bool> UseApiKey(
|
||||
XDeviceDto device,
|
||||
XApiKeyUsageDto apiKeyUsage
|
||||
);
|
||||
Task<bool> UseApiKey(
|
||||
XOpenActionInnerDto dto
|
||||
);
|
||||
Task<bool> UseApiKey(
|
||||
string token,
|
||||
string request
|
||||
);
|
||||
|
||||
//
|
||||
Task<XOpenActionUserInfoDto> GetUserInfo(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using xCommons.Extensions;
|
||||
using xIdentityModels.Dtos;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using xIdentityService.Attributes;
|
||||
@@ -8,7 +9,6 @@ using xIdentityService.Interfaces;
|
||||
using xIdentityService.Extensions;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using xIdentityModels.Dtos;
|
||||
|
||||
namespace xIdentityService.Middlewares
|
||||
{
|
||||
@@ -66,6 +66,7 @@ namespace xIdentityService.Middlewares
|
||||
apiKey: apiKey
|
||||
);
|
||||
|
||||
//
|
||||
try
|
||||
{
|
||||
await next(context);
|
||||
@@ -90,9 +91,11 @@ namespace xIdentityService.Middlewares
|
||||
RequestedOn = requestedOn,
|
||||
ResponseTimeMs = sw.ElapsedMilliseconds,
|
||||
};
|
||||
await identityProvider.AddApiKeyUsage();
|
||||
// await identityProvider.AddApiKeyUsage();
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
await next(context);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user