Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Junker committed Feb 26, 2024
1 parent 4da6d6f commit e4b7feb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions recaptcha-enterprise.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@
(assert (not (null *project-id*)))
(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"))
:headers '(("Content-Type" . "application/json"))
:content (jojo:to-json (list :|event| (list :|token| token
:|siteKey| key-id
:|expectedAction| action))))))
(jojo:parse response)))

(defun risk-analysis (response)
(getf :|riskAnalysis| response))
(getf response :|riskAnalysis|))

(defun token-properties (response)
(getf :|tokenProperties| response))
(getf response :|tokenProperties|))

(defun event (response)
(getf :|event| response))
(getf response :|event|))

(defun name (response)
(getf :|name| response))
(getf response :|name| ))

(defun validp (response)
(getf :|valid| (token-properties response)))
(getf (token-properties response) :|valid|))

(defun invalid-reason (response)
(getf :|invalidReason| (token-properties response)))
(getf (token-properties response) :|invalidReason|))

(defun score (response)
(getf :|score| (risk-analysis response)))
(getf (risk-analysis response) :|score|))

0 comments on commit e4b7feb

Please sign in to comment.