From 77891a5f487a9ec4e825916340c496632836859c Mon Sep 17 00:00:00 2001 From: Vatsalya Goel Date: Mon, 9 Oct 2023 10:29:52 +0400 Subject: [PATCH] Use scheme provided by arguments --- .../dotnet-graphql/OAuth/AuthArgumentsBase.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/AuthArgumentsBase.cs b/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/AuthArgumentsBase.cs index 16ede3f693c..fe1bd979490 100644 --- a/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/AuthArgumentsBase.cs +++ b/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/AuthArgumentsBase.cs @@ -41,15 +41,15 @@ public AuthArguments( IConsoleOutput output, CancellationToken cancellationToken) { - if (Token.HasValue()) - { - string? scheme = null; + string? scheme = null; - if (!NoScheme.HasValue()) - { - scheme = Scheme.HasValue() ? Scheme.Value()!.Trim() : _defaultScheme; - } + if (!NoScheme.HasValue()) + { + scheme = Scheme.HasValue() ? Scheme.Value()!.Trim() : _defaultScheme; + } + if (Token.HasValue()) + { return new AccessToken( Token.Value()!.Trim(), scheme); @@ -69,7 +69,7 @@ public AuthArguments( scopes, cancellationToken) .ConfigureAwait(false); - return new AccessToken(token, _defaultScheme); + return new AccessToken(token, scheme); } return null; @@ -104,4 +104,4 @@ private void ValidateOAuthArguments(IActivity activity) .Build()); } } -} \ No newline at end of file +}