mirror of
https://github.com/hmaxnl/DotBased.git
synced 2025-05-16 15:27:54 +02:00
20 lines
986 B
C#
20 lines
986 B
C#
using DotBased.AspNet.Authority.Models.Options.Auth;
|
|
using DotBased.Logging;
|
|
using Microsoft.AspNetCore.Authentication;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
namespace DotBased.AspNet.Authority.Services;
|
|
|
|
public class AuthorityAuthenticationService(
|
|
IAuthenticationSchemeProvider schemes,
|
|
IAuthenticationHandlerProvider handlers,
|
|
IClaimsTransformation transform,
|
|
IOptions<AuthenticationOptions> options,
|
|
IOptions<AuthorityAuthenticationOptions> authorityOptions) : AuthenticationService(schemes, handlers, transform, options)
|
|
{
|
|
private readonly ILogger _logger = LogService.RegisterLogger(typeof(AuthorityAuthenticationService));
|
|
private readonly AuthorityAuthenticationOptions _options = authorityOptions.Value;
|
|
|
|
public IReadOnlyCollection<SchemeInfo> GetSchemeInfos(SchemeType schemeType) => _options.SchemeInfoMap.Where(s => s.Type == schemeType).ToList();
|
|
public IReadOnlyCollection<SchemeInfo> GetAllSchemeInfos() => _options.SchemeInfoMap;
|
|
} |