[CHANGE] Reworking auth schemes & services, handlers, etc.

This commit is contained in:
max
2025-04-27 17:23:14 +02:00
parent 8e72d123fd
commit 46cf20893b
15 changed files with 249 additions and 64 deletions

View File

@@ -0,0 +1,20 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
namespace DotBased.AspNet.Authority.Services;
public class AuthorityAuthenticationService(IAuthenticationSchemeProvider schemes, IAuthenticationHandlerProvider handlers, IClaimsTransformation transform) : AuthenticationService(schemes, handlers, transform)
{
public override Task SignInAsync(HttpContext context, string scheme, ClaimsPrincipal principal, AuthenticationProperties properties)
{
//TODO: Get from query parameters which auth scheme to use or fallback to configured default.
return base.SignInAsync(context, scheme, principal, properties);
}
public override Task SignOutAsync(HttpContext context, string scheme, AuthenticationProperties properties)
{
//TODO: Figure out which type of auth is used and logout with the scheme.
return base.SignOutAsync(context, scheme, properties);
}
}