Пример #1
0
        public AssertionConfigurationService(
            UserAccessTokenManagementOptions userAccessTokenManagementOptions,
            ClientAccessTokenManagementOptions clientAccessTokenManagementOptions,
            IOptionsMonitor <OpenIdConnectOptions> oidcOptions,
            IAuthenticationSchemeProvider schemeProvider,
            AssertionService assertionService,
            ILogger <AssertionConfigurationService> logger)

            : base(userAccessTokenManagementOptions, clientAccessTokenManagementOptions, oidcOptions, schemeProvider, logger)
        {
            _assertionService = assertionService;
        }
        /// <summary>
        /// Adds the services required for client access token management
        /// </summary>
        /// <param name="services"></param>
        /// <param name="configureAction"></param>
        /// <returns></returns>
        public static TokenManagementBuilder AddClientAccessTokenManagement(this IServiceCollection services,
                                                                            Action <ClientAccessTokenManagementOptions> configureAction = null)
        {
            CheckConfigMarker(services);

            var clientOptions = new ClientAccessTokenManagementOptions();

            configureAction?.Invoke(clientOptions);

            services.AddSingleton(clientOptions);
            services.AddSingleton(new UserAccessTokenManagementOptions());

            return(services.AddClientAccessTokenManagementInternal());
        }