Skip to content

Commit 2ca5ea6

Browse files
authored
fix(http): allow tokens to exceed 20 chars (#207)
1 parent bbd0741 commit 2ca5ea6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitLabApiClient/Internal/Http/GitLabHttpFacade.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public GitLabHttpFacade(string hostUrl, RequestsJsonSerializer jsonSerializer, s
3434
{
3535
switch (authenticationToken.Length)
3636
{
37-
case 0:
37+
case int i when i == 0:
3838
break;
39-
case 20:
39+
case int i when i >= 20 && i < 64:
4040
_httpClient.DefaultRequestHeaders.Add(PrivateToken, authenticationToken);
4141
break;
42-
case 64:
42+
case int i when i == 64:
4343
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authenticationToken);
4444
break;
4545
default:

0 commit comments

Comments
 (0)