예제 #1
0
        public AdminServiceBehavior(
            IServiceContextAccessor context,
            AdminRepository adminRepo,
            AdminVersions versions,
            ILogger <AdminServiceBehavior> logger)
        {
            _versions = versions;
            _logger   = logger;

            _isServiceAccount = context.IsServiceAccount;
            if (_isServiceAccount)
            {
                _externalId = context.ExternalClientId ??
                              throw new InvalidOperationException($"The external client ID was not supplied.");
            }
            else
            {
                // This is a human user, so the external Id and email are required
                _externalId = context.ExternalUserId ??
                              throw new InvalidOperationException($"The external user ID was not supplied.");
                _externalEmail = context.ExternalEmail ??
                                 throw new InvalidOperationException($"The external user email was not supplied.");
            }

            _adminRepo = adminRepo;
            _isSilent  = context.IsSilent;
        }
예제 #2
0
 public AdminFactServiceBehavior(
     IServiceContextAccessor context,
     AdminRepository adminRepo,
     AdminVersions versions,
     ILogger <AdminServiceBehavior> logger) : base(context, adminRepo, versions, logger)
 {
 }
예제 #3
0
 public AdminServiceBehavior(
     AdminRepository adminRepo,
     AdminVersions versions,
     ILogger <AdminServiceBehavior> logger)
 {
     _adminRepo = adminRepo;
     _versions  = versions;
     _logger    = logger;
 }
 public AdminFactServiceBehavior(
     AdminRepository adminRepo,
     AdminVersions versions,
     ILogger <AdminServiceBehavior> logger) : base(adminRepo, versions, logger)
 {
 }