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