public static IEnumerable <IAuthenticationDecorator> GetCallbackDecorators(this IDecorationLoader decorationLoader, string authenticationScheme) { if (decorationLoader == null) { throw new ArgumentNullException(nameof(decorationLoader)); } return(decorationLoader.GetCallbackDecoratorsAsync(authenticationScheme).Result); }
public AuthenticateController(IOptions <ExtendedAuthenticationOptions> authenticationOptions, IAuthenticationSchemeLoader authenticationSchemeLoader, IDecorationLoader decorationLoader, ILoggerFactory loggerFactory) { this.AuthenticationOptions = authenticationOptions ?? throw new ArgumentNullException(nameof(authenticationOptions)); this.AuthenticationSchemeLoader = authenticationSchemeLoader ?? throw new ArgumentNullException(nameof(authenticationSchemeLoader)); this.DecorationLoader = decorationLoader ?? throw new ArgumentNullException(nameof(decorationLoader)); if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } this.Logger = loggerFactory.CreateLogger(this.GetType()); }
public Facade(IAuthenticationSchemeRetriever authenticationSchemeRetriever, IAuthorizationResolver authorizationResolver, IClientStore clientStore, IDecorationLoader decorationLoader, IEventService events, IOptionsMonitor <ExceptionHandlingOptions> exceptionHandling, IFeatureManager featureManager, IHttpContextAccessor httpContextAccessor, IIdentityFacade identity, IOptionsMonitor <ExtendedIdentityServerOptions> identityServer, IIdentityServerInteractionService interaction, IStringLocalizerFactory localizerFactory, ILoggerFactory loggerFactory, IOptionsMonitor <RequestLocalizationOptions> requestLocalization, IServiceProvider serviceProvider) { this.AuthenticationSchemeRetriever = authenticationSchemeRetriever ?? throw new ArgumentNullException(nameof(authenticationSchemeRetriever)); this.AuthorizationResolver = authorizationResolver ?? throw new ArgumentNullException(nameof(authorizationResolver)); this.ClientStore = clientStore ?? throw new ArgumentNullException(nameof(clientStore)); this.DecorationLoader = decorationLoader ?? throw new ArgumentNullException(nameof(decorationLoader)); this.Events = events ?? throw new ArgumentNullException(nameof(events)); this.ExceptionHandling = exceptionHandling ?? throw new ArgumentNullException(nameof(exceptionHandling)); this.FeatureManager = featureManager ?? throw new ArgumentNullException(nameof(featureManager)); this.HttpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor)); this.Identity = identity ?? throw new ArgumentNullException(nameof(identity)); this.IdentityServer = identityServer ?? throw new ArgumentNullException(nameof(identityServer)); this.Interaction = interaction ?? throw new ArgumentNullException(nameof(interaction)); this.LocalizerFactory = localizerFactory ?? throw new ArgumentNullException(nameof(localizerFactory)); this.LoggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); this.RequestLocalization = requestLocalization ?? throw new ArgumentNullException(nameof(requestLocalization)); if (serviceProvider == null) { throw new ArgumentNullException(nameof(serviceProvider)); } if (featureManager.IsEnabled(Feature.Saml)) { this.SamlInteraction = serviceProvider.GetRequiredService <ISamlInteractionService>(); } }