Skip to content

Commit

Permalink
'verify' function: check arguments type
Browse files Browse the repository at this point in the history
  • Loading branch information
Junker committed May 16, 2024
1 parent 2fe89f5 commit 886b5bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion recaptcha-enterprise.asd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(defsystem recaptcha-enterprise
:version "0.1.2"
:version "0.1.3"
:author "Dmitrii Kosenkov"
:license "MIT"
:depends-on ("dexador" "jonathan")
Expand Down
7 changes: 5 additions & 2 deletions recaptcha-enterprise.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
"your Google Cloud project ID")

(defun verify (key-id token &optional (action "LOGIN"))
(assert (not (null *api-key*)))
(assert (not (null *project-id*)))
(check-type *api-key* string)
(check-type *project-id* string)
(check-type token string)
(check-type key-id string)
(check-type action string)
(let* ((response (dex:post (format nil "https://recaptchaenterprise.googleapis.com/v1/projects/~A/assessments?key=~A"
*project-id* *api-key*)
:headers '(("Content-Type" . "application/json"))
Expand Down

0 comments on commit 886b5bf

Please sign in to comment.