[git-bridge] Add support for Oauth2 Personal Access Tokens (#12795)

* [git-bridge] Add support for Oauth2 Personal Access Tokens

Adds support for Personal Access Tokens by sending a Bearer
token authentication when the username is `git`.
The feature is controlled by `GIT_BRIDGE_ACCESS_TOKEN_ENABLED`

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: 5553b0b68574158ede86ceec6c618cf4c4b09c92
This commit is contained in:
Miguel Serrano
2023-05-02 11:37:55 +02:00
committed by Copybot
parent 1da76f0a8d
commit 0564532f92
6 changed files with 55 additions and 29 deletions

View File

@@ -92,6 +92,7 @@ public class ConfigTest {
" \"oauth2ClientSecret\": \"<oauth2ClientSecret>\",\n" +
" \"oauth2Server\": \"https://www.overleaf.com\"\n" +
" },\n" +
" \"userPasswordEnabled\": false,\n" +
" \"repoStore\": null,\n" +
" \"swapStore\": null,\n" +
" \"swapJob\": null,\n" +
@@ -104,4 +105,4 @@ public class ConfigTest {
);
}
}
}

View File

@@ -62,6 +62,7 @@ public class BridgeTest {
"",
"",
null,
false,
null,
null,
null,