GitHub: remove redundant auth logic
MODIFY
lib/src/common/github.dart
lib/src/common/github.dart
@@ -205,14 +205,6 @@ class GitHub {
headers.putIfAbsent("Accept", () => "application/vnd.github.v3+json");
- if (auth.isToken) {
- headers.putIfAbsent("Authorization", () => "token ${auth.token}");
- } else if (auth.isBasic) {
- var userAndPass =
- base64Encode(utf8.encode('${auth.username}:${auth.password}'));
- headers.putIfAbsent("Authorization", () => "basic $userAndPass");
- }
-
var response = await request("GET", path,
headers: headers, params: params, statusCode: statusCode, fail: fail);
@@ -266,14 +258,6 @@ class GitHub {
headers.putIfAbsent("Accept", () => "application/vnd.github.v3+json");
- if (auth.isToken) {
- headers.putIfAbsent("Authorization", () => "token ${auth.token}");
- } else if (auth.isBasic) {
- var userAndPass =
- base64Encode(utf8.encode('${auth.username}:${auth.password}'));
- headers.putIfAbsent("Authorization", () => "basic $userAndPass");
- }
-
var response = await request("POST", path,
headers: headers,
params: params,

GitHub: remove redundant auth logic