Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Commit

Permalink
Added support for secret-values in weblocks-auth/github:*secret*.
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed Jan 24, 2021
1 parent c5f1c8d commit ed4cfc6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.rst
Expand Up @@ -2,6 +2,11 @@
ChangeLog
===========

0.6.0
=====

* Added support for ``secret-values`` in ``weblocks-auth/github:*secret*``.

0.5.1
=====

Expand Down
7 changes: 5 additions & 2 deletions src/github.lisp
Expand Up @@ -21,6 +21,8 @@
#:url-encode-params)
(:import-from #:weblocks/request
#:get-uri)
(:import-from #:secret-values
#:ensure-value-revealed)
(:export
#:*client-id*
#:*secret*
Expand All @@ -36,7 +38,7 @@


(defvar *secret* nil
"OAuth secret")
"OAuth secret. It might be a string or secret-values:secret-value.")


(defvar *default-scopes* (list "user:email"))
Expand All @@ -60,7 +62,8 @@
(let* ((response (dex:post "https://github.com/login/oauth/access_token"
:content (to-json (list :|code| code
:|client_id| *client-id*
:|client_secret| *secret*))
:|client_secret| (ensure-value-revealed
*secret*)))
:headers '(("Accept" . "application/json")
("Content-Type" . "application/json"))))
(data (jonathan:parse response))
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
@@ -1 +1 @@
"0.4.0"
"0.6.0"

0 comments on commit ed4cfc6

Please sign in to comment.