コード例 #1
0
        public async Task Login_ShouldLogin()
        {
            var options = new VaultOptions
            {
                BaseUrl = new Uri("https://vault.dev.happytravel.com/v1/"),
                Role    = "role",
                Engine  = "secrets"
            };

            using var client = new VaultClient(options, new NullLoggerFactory());

            await client.Login("");

            var secret = await client.Get("edo/connection-string");
        }
コード例 #2
0
ファイル: Endpoint.cs プロジェクト: zengdl/Vault.NET
 public Task <VaultResponse <TData> > Read <TData>(string path, CancellationToken ct = default(CancellationToken))
 {
     return(_client.Get <VaultResponse <TData> >($"{_uriBasePath}/{path}", TimeSpan.Zero, ct));
 }