コード例 #1
0
 public AuthenticationLdapService(LdapOptions ldapOptions, IIdentityMvcService identityMvcService, ILogger <AuthenticationLdapService> logger)
 {
     _ldapOptions        = ldapOptions;
     _connection         = new LdapConnection();
     _identityMvcService = identityMvcService;
     _logger             = logger;
 }
コード例 #2
0
        public void InstallServices(IServiceCollection services, IConfiguration configuration)
        {
            var ldapOptions = new LdapOptions();

            configuration.Bind(nameof(LdapOptions), ldapOptions);

            services.AddSingleton(ldapOptions);

            services.AddScoped <IAuthenticationLdapMvcService, AuthenticationLdapService>();
        }