Exemple #1
0
        public AzureSecretProvider(IWebRequestFactory webRequestFactory, IJSONContractSerializer serializer, IReadOnlyDictionary <string, string> secretIds, string tenantId, string clientId, string clientSecret, string vaultName)
            : base(secretIds)
        {
            this.WebRequestFactory = webRequestFactory ?? throw new ArgumentNullException("webRequestFactory");
            this.Serializer        = serializer ?? throw new ArgumentNullException("serializer");
            this.TenantId          = tenantId ?? throw new ArgumentNullException("tenantId");
            this.ClientId          = clientId ?? throw new ArgumentNullException("clientId");
            this.ClientSecret      = clientSecret ?? throw new ArgumentNullException("clientSecret");
            this.VaultName         = vaultName ?? throw new ArgumentNullException("vautlName");

            this.Secrets = new Dictionary <string, string>();
        }
Exemple #2
0
 public AzureSecretProviderFactory(IWebRequestFactory webRequestFactory, IJSONContractSerializer serializer)
 {
     WebRequestFactory = webRequestFactory ?? throw new ArgumentNullException("webRequestFactory");
     Serializer        = serializer ?? throw new ArgumentNullException("serializer");
 }
 public GetAuthTokenRequest(IJSONContractSerializer serializer, string tenantId, string clientId, string clientSecret)
     : base(serializer, new APIEndpoint("https://login.windows.net/" + tenantId + "/oauth2/token"))
 {
     this.ClientId     = clientId;
     this.ClientSecret = clientSecret;
 }
 protected AzureRestRequest(IJSONContractSerializer serializer, AuthToken token, IAPIEndpoint endpoint)
     : base(serializer, endpoint, token?.access_token)
 {
 }
Exemple #5
0
 public GetSecretVersionsRequest(IJSONContractSerializer serializer, AuthToken token, string vaultName, string secretName)
     : base(serializer, token, new APIEndpoint(string.Format("https://{0}.vault.azure.net/secrets/{1}/versions?api-version=7.0", vaultName, secretName)))
 {
 }
 public GetNextLinkRequest(IJSONContractSerializer serializer, AuthToken token, string nextLink)
     : base(serializer, token, new APIEndpoint(nextLink))
 {
 }
Exemple #7
0
 public GetSecretRequest(IJSONContractSerializer serializer, AuthToken token, string secretId)
     : base(serializer, token, new APIEndpoint(secretId).AddQuery("api-version", "7.0"))
 {
 }