Skip to content

Commit 1786901

Browse files
committed
Fix compiling errors
1 parent 448c9f8 commit 1786901

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Ocelot/Configuration/AuthenticationOptions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public AuthenticationOptions(List<string> allowedScopes, string[] authentication
3939
/// <param name="keys">New <see cref="AuthenticationProviderKeys"/> to build.</param>
4040
private void BuildAuthenticationProviderKeys(string legacyKey, string[] keys)
4141
{
42-
keys ??= new string[];
42+
keys ??= Array.Empty<string>();
4343
if (string.IsNullOrEmpty(legacyKey))
4444
{
4545
return;

src/Ocelot/Configuration/Builder/AuthenticationOptionsBuilder.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public AuthenticationOptionsBuilder WithRequiredRole(List<string> requiredRole)
2525

2626
[Obsolete("Use the " + nameof(WithAuthenticationProviderKeys) + " property!")]
2727
public AuthenticationOptionsBuilder WithAuthenticationProviderKey(string authenticationProviderKey)
28-
=> WithAuthenticationProviderKeys([authenticationProviderKey]);
28+
=> WithAuthenticationProviderKeys(authenticationProviderKey);
2929

30-
public AuthenticationOptionsBuilder WithAuthenticationProviderKeys(string[] authenticationProviderKeys)
30+
public AuthenticationOptionsBuilder WithAuthenticationProviderKeys(params string[] authenticationProviderKeys)
3131
{
3232
_authenticationProviderKeys = authenticationProviderKeys;
3333
return this;

0 commit comments

Comments
 (0)