Skip to content

Commit 9eff081

Browse files
more updates
1 parent fae9f5b commit 9eff081

File tree

8 files changed

+316
-226
lines changed

8 files changed

+316
-226
lines changed

examples/src/BasicExample/BasicExample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ private BasicExample(TableClient client, string database, string path)
1515
public static async Task Run(
1616
string endpoint,
1717
string database,
18-
ICredentialsProvider credentialsProvider,
18+
ICredentialsProvider? credentialsProvider,
1919
X509Certificate? customServerCertificate,
2020
string path,
2121
ILoggerFactory loggerFactory)

examples/src/Common/AuthUtils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Ydb.Sdk.Examples;
99

1010
public static class AuthUtils
1111
{
12-
public static async Task<ICredentialsProvider> MakeCredentialsFromEnv(
12+
public static async Task<ICredentialsProvider?> MakeCredentialsFromEnv(
1313
bool fallbackAnonymous = false,
1414
ILoggerFactory? loggerFactory = null)
1515
{
@@ -26,7 +26,7 @@ public static async Task<ICredentialsProvider> MakeCredentialsFromEnv(
2626
var anonymousValue = Environment.GetEnvironmentVariable("YDB_ANONYMOUS_CREDENTIALS");
2727
if (anonymousValue != null && IsTrueValue(anonymousValue))
2828
{
29-
return new AnonymousProvider();
29+
return null;
3030
}
3131

3232
var metadataValue = Environment.GetEnvironmentVariable("YDB_METADATA_CREDENTIALS");
@@ -46,7 +46,7 @@ public static async Task<ICredentialsProvider> MakeCredentialsFromEnv(
4646

4747
if (fallbackAnonymous)
4848
{
49-
return new AnonymousProvider();
49+
return null;
5050
}
5151

5252
throw new InvalidOperationException("Failed to parse credentials from environmet, no valid options found.");

examples/src/QueryExample/QueryExample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private QueryExample(QueryClient client, string database, string path)
2020
public static async Task Run(
2121
string endpoint,
2222
string database,
23-
ICredentialsProvider credentialsProvider,
23+
ICredentialsProvider? credentialsProvider,
2424
X509Certificate? customServerCertificate,
2525
string path,
2626
ILoggerFactory loggerFactory)

src/Ydb.Sdk/src/Auth/TokenCredentialsProvider.cs

Lines changed: 0 additions & 217 deletions
This file was deleted.

0 commit comments

Comments
 (0)