From 1df648ca8142be88690a8fecbac76ac1a405136f Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 18 Feb 2024 13:23:54 +0100 Subject: [PATCH] Update authentication method for chore script Refactor the authentication in the chore script by removing the 'token' field from the payload and including it in the header as 'Authorization'. This change enhances security practices by aligning with standard HTTP authorization protocols. --- scripts/chores.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/chores.py b/scripts/chores.py index 6217c48..38a3ddf 100644 --- a/scripts/chores.py +++ b/scripts/chores.py @@ -29,7 +29,6 @@ CHORES = ( due_date = (datetime.utcnow() + timedelta(days=EXPIRY_DAYS)).isoformat() payload = { - "token": TOKEN, "title": "Weekly Chores", "body": CHORES, "due_date": due_date, @@ -41,6 +40,7 @@ if ASSIGNEES: headers = { "Content-Type": "application/json", "Accept": "application/json", + "Authorization": "token " + TOKEN, } request = urllib.request.Request(