diff --git a/src/GitLabApiClient/Internal/Http/GitLabHttpFacade.cs b/src/GitLabApiClient/Internal/Http/GitLabHttpFacade.cs index b9b1fc8b..0ca82fd2 100644 --- a/src/GitLabApiClient/Internal/Http/GitLabHttpFacade.cs +++ b/src/GitLabApiClient/Internal/Http/GitLabHttpFacade.cs @@ -34,12 +34,12 @@ public GitLabHttpFacade(string hostUrl, RequestsJsonSerializer jsonSerializer, s { switch (authenticationToken.Length) { - case 0: + case int i when i == 0: break; - case 20: + case int i when i >= 20 && i < 64: _httpClient.DefaultRequestHeaders.Add(PrivateToken, authenticationToken); break; - case 64: + case int i when i == 64: _httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authenticationToken); break; default: