public CognitiveService(ISecretKeyProvider secretKeyProvider, string vaultName) : base(secretKeyProvider, vaultName) { _faceClient = new FaceServiceClient(GetSecretValue("FaceKey"), GetSecretValue("FaceUrl")); _visionServiceClient = new VisionServiceClient(GetSecretValue("VisionKey"), GetSecretValue("VisionUrl")); }
public ApiClient(IHttpClient httpClient, ISecretKeyProvider secretKeyProvider, IFileExtensionToMimeMapper fileExtensionToMimeMapper) { var secretKey = secretKeyProvider.GetSecretKey(); var tokenBytes = Encoding.UTF8.GetBytes(secretKey + ":"); _privateAuthToken = Convert.ToBase64String(tokenBytes); _fileExtensionToMimeMapper = fileExtensionToMimeMapper; _client = httpClient; _client.SetAuthorizationHeader(new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", _privateAuthToken)); _client.AddHeader("User-Agent", string.Format("SecurionPay-DOTNET/{0}", _version)); }
public LoggerService(ISecretKeyProvider secretKeyProvider, string vaultName) : base(secretKeyProvider, vaultName) { LoggerConfiguration loggerConfiguration = new LoggerConfiguration(); #if DEBUG loggerConfiguration.WriteTo.File("C:\\temps\\azure.txt", rollingInterval: RollingInterval.Day); #else var appInsightKey = secretKeyProvider.GetSecret(vaultName); loggerConfiguration.WriteTo.ApplicationInsightsTraces(appInsightKey); #endif Log.Logger = loggerConfiguration.Enrich.With <HttpRequestIdEnricher>().CreateLogger(); }
public CredentialGridPresenter(Control parent, ISecretKeyProvider secretKeyProvider) { _secretKeyProvider = secretKeyProvider; FilterCollection = new FilterCollection <Credential>(); CredentialGrid = new Lazy <GridView>(() => CreateCredentialGrid(FilterCollection)); SearchBox = new Lazy <TextBox>(CreateSearchBox); NewButton = new Lazy <Button>(CreateNewButton); LoadButton = new Lazy <Button>(() => CreateLoadButton(parent)); SaveButton = new Lazy <Button>(() => CreateSaveButton(parent)); }
public UserManager(IMemoryContext memoryContext, IUserAuthenticatorKeyStore authenticatorKeyStore, IUserTwoFactorTokenProvider twoFactorTokenProvider, ISecretKeyProvider secretKeyProvider, IPasswordHasher <UserData> passwordHasher, IDateTime dateTime, IConfiguration configuration) { _memoryContext = memoryContext; _authenticatorKeyStore = authenticatorKeyStore; _twoFactorTokenProvider = twoFactorTokenProvider; _secretKeyProvider = secretKeyProvider; _passwordHasher = passwordHasher; _dateTime = dateTime; _configuration = configuration; }
public StorageService(ISecretKeyProvider secretKeyProvider, string vaultName) : base(secretKeyProvider, vaultName) { string connectionString = GetSecretValue("StorageConectionString"); var account = CloudStorageAccount.Parse(connectionString); var client = account.CreateCloudBlobClient(); _container = client.GetContainerReference(GetSecretValue("StorageContainer")); _container.CreateIfNotExists(); var permissions = _container.GetPermissions(); if (permissions.PublicAccess == BlobContainerPublicAccessType.Off || permissions.PublicAccess == BlobContainerPublicAccessType.Unknown) { _container.SetPermissions(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob }); } }
public SignService(ISecretKeyProvider secretKeyProvider) { _secretKeyProvider = secretKeyProvider; }
protected BaseService(ISecretKeyProvider secretKeyProvider, string vaultName) { _vaultName = vaultName; _secretKeyProvider = secretKeyProvider; }
public DataBaseManager(ISecretKeyProvider secretKeyProvider, string vaultName) { _secretKeyProvider = secretKeyProvider; _vaultName = vaultName; }
public LoginController(IMapper mapper, ISecretKeyProvider secretKeyProvider, ILoggerService loggerService, IUserRepository userRepository) : base(mapper, loggerService) { _secretAuthKey = secretKeyProvider.GetSecret(AzureKeys.AuthTokenKey); _userRepository = userRepository; }
public TokenValidationHandler(ISecretKeyProvider secretKeyProvider) { _secretKeyProvider = secretKeyProvider; _secretAuthKey = _secretKeyProvider.GetSecret(AzureKeys.AuthTokenKey); }
public ManualTotpTokenProvider(ISecretKeyProvider secretKeyProvider, ITotpTokenBuilder totpTokenBuilder) { _secretKeyProvider = secretKeyProvider; _totpTokenBuilder = totpTokenBuilder; }
public S3Uploader(ISecretKeyProvider secretKeyProvider) { _secretKeyProvider = secretKeyProvider; }