From 9553c53d0064da9d1c5c1af303746f17efeb4f71 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 8 May 2022 00:07:16 +0200 Subject: Generate HTTP Basic auth base64 from user and token --- src/main.lisp | 11 +++++++---- wajir.asd | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main.lisp b/src/main.lisp index d71f4e8..094bb41 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -7,10 +7,13 @@ ;; Send email to ^maildir^program^ containing message with issue metadata ;; Continue to next page - (fetch-issues - "https://example.atlassian.net" - "project = \\\"FAKE\\\" AND watcher != currentUser() AND key > \\\"FAKE-100\\\" ORDER BY created DESC" - :basic-auth-token "TOKEN")) + (let ((basic-auth-token (cl-base64:string-to-base64-string + (format nil "~A:~A" "name@example.com" "atlassian-token")))) + + (fetch-issues + "https://example.atlassian.net" + "project = \\\"FAKE\\\" AND watcher != currentUser() AND key > \\\"FAKE-100\\\" ORDER BY created DESC" + :basic-auth-token basic-auth-token))) (defun fetch-issues (endpoint jql &key basic-auth-token) (jzon:parse diff --git a/wajir.asd b/wajir.asd index aaa0033..96cfd0c 100644 --- a/wajir.asd +++ b/wajir.asd @@ -12,7 +12,8 @@ (defsystem wajir :version "0.0.1" - :depends-on (:com.inuoe.jzon + :depends-on (:cl-base64 + :com.inuoe.jzon :dexador) :components ((:module "src" :serial t -- cgit v1.2.3