using System.Security.Claims; using System.Text.Encodings.Web; using DotBased.AspNet.Authority.Managers; using DotBased.AspNet.Authority.Models.Options.Auth; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; namespace DotBased.AspNet.Authority.Handlers; /// /// Handles authentication for Authority logins. /// public class AuthorityLoginAuthenticationHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder, AuthorityManager manager) : AuthenticationHandler(options, logger, encoder) { // Validate credentials protected override async Task HandleAuthenticateAsync() { //TODO: Check headers for login credentials. /*var ticket = new AuthenticationTicket(new ClaimsPrincipal(), Scheme.Name);*/ var result = AuthenticateResult.Fail("No login found!"); return result; } }