[WIP]
This commit is contained in:
@@ -1,20 +1,47 @@
|
||||
using System.Security.Claims;
|
||||
using DotBased.AspNet.Authority.Managers;
|
||||
using DotBased.AspNet.Authority.Models.Options.Auth;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace DotBased.AspNet.Authority.Services;
|
||||
|
||||
public class AuthorityAuthenticationService(IAuthenticationSchemeProvider schemes, IAuthenticationHandlerProvider handlers, IClaimsTransformation transform) : AuthenticationService(schemes, handlers, transform)
|
||||
public class AuthorityAuthenticationService(IAuthenticationSchemeProvider schemes,
|
||||
IAuthenticationHandlerProvider handlers,
|
||||
IClaimsTransformation transform,
|
||||
IOptions<AuthorityAuthenticationOptions> options,
|
||||
AuthorityManager manager) : IAuthenticationService
|
||||
{
|
||||
public override Task SignInAsync(HttpContext context, string scheme, ClaimsPrincipal principal, AuthenticationProperties properties)
|
||||
public async Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme)
|
||||
{
|
||||
//TODO: Get from query parameters which auth scheme to use or fallback to configured default.
|
||||
return base.SignInAsync(context, scheme, principal, properties);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override Task SignOutAsync(HttpContext context, string scheme, AuthenticationProperties properties)
|
||||
public async Task ChallengeAsync(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);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task ForbidAsync(HttpContext context, string scheme, AuthenticationProperties properties)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task SignInAsync(HttpContext context, string scheme, ClaimsPrincipal principal, AuthenticationProperties properties)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task SignOutAsync(HttpContext context, string scheme, AuthenticationProperties properties)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task ValidateLoginAsync()
|
||||
{
|
||||
|
||||
//TODO: Check if user is logged in from external identity provider, if user not exists in authority db create user.
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user