Exemple #1
0
 public DefaultSecurityLogManager(
     IOptions <AbpSecurityLogOptions> securityLogOptions,
     ISecurityLogStore securityLogStore)
 {
     SecurityLogStore   = securityLogStore;
     SecurityLogOptions = securityLogOptions.Value;
 }
Exemple #2
0
 /// <summary>
 /// /初始化一个<see cref="DefaultSecurityLogManager"/>类型的实例
 /// </summary>
 /// <param name="securityLogOptions">安全日志选项配置</param>
 /// <param name="securityLogStore">安全日志存储器</param>
 /// <param name="logger">日志</param>
 /// <param name="currentUser">当前用户</param>
 /// <param name="currentClient">当前客户端</param>
 /// <param name="httpContextAccessor">Http上下文访问器</param>
 /// <param name="correlationIdProvider">跟踪标识提供程序</param>
 /// <param name="webClientInfoProvider">Web客户端信息提供程序</param>
 public AspNetCoreSecurityLogManager(IOptions <BingSecurityLogOptions> securityLogOptions
                                     , ISecurityLogStore securityLogStore
                                     , ILogger <AspNetCoreSecurityLogManager> logger
                                     , ICurrentUser currentUser
                                     , ICurrentClient currentClient
                                     , IHttpContextAccessor httpContextAccessor
                                     , ICorrelationIdProvider correlationIdProvider
                                     , IWebClientInfoProvider webClientInfoProvider)
     : base(securityLogOptions, securityLogStore)
 {
     Logger                = logger;
     CurrentUser           = currentUser;
     CurrentClient         = currentClient;
     HttpContextAccessor   = httpContextAccessor;
     CorrelationIdProvider = correlationIdProvider;
     WebClientInfoProvider = webClientInfoProvider;
 }
 protected override void AfterAddApplication(IServiceCollection services)
 {
     _auditingStore = Substitute.For <ISecurityLogStore>();
     services.AddSingleton(_auditingStore);
 }