Update Happiness Task

This commit is contained in:
Chris Chen
2022-10-02 09:50:42 -07:00
parent b33c0d8286
commit f9a5dc5e34
43 changed files with 4904 additions and 623 deletions
@@ -3,12 +3,20 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization.Policy;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using System.Linq;
using System.Threading.Tasks;
using WebAPI.Services;
public class BasicAuthorizationMiddlewareResultHandler : IAuthorizationMiddlewareResultHandler
{
private readonly AuthorizationMiddlewareResultHandler defaultHandler = new();
private readonly IServiceScopeFactory serviceScopeFactory;
public BasicAuthorizationMiddlewareResultHandler(IServiceScopeFactory serviceScopeFactory)
{
this.serviceScopeFactory = serviceScopeFactory;
}
public async Task HandleAsync(
RequestDelegate next,
@@ -33,6 +41,15 @@
return;
}
//else
//{
// using (var scope = serviceScopeFactory.CreateScope())
// {
// var service = scope.ServiceProvider.GetService<IdentityService>();
// service.UserAccessToken =;
// }
//}
// Fall back to the default implementation.
//await defaultHandler.HandleAsync(next, context, policy, authorizeResult);
await next(context);