Permalink
Browse files

Simple cleanup of the code

  • Loading branch information...
madnificent committed May 5, 2009
1 parent a625bfa commit 457710c4c5e6f9e7326b61e623acc739d5a7a0c6
Showing with 8 additions and 2 deletions.
  1. +2 −1 README.textile
  2. +1 −1 cl-recaptcha.asd
  3. +5 −0 code.lisp
View
@@ -1,3 +1,4 @@
h1. cl-recaptcha
cl-recaptcha is a simple interconnection between recaptcha.net and common-lisp. It can be used for the trivial usage of the recaptcha service.
cl-recaptcha is a simple interconnection between recaptcha.net and common-lisp. It can be used for the trivial usage of the recaptcha service.
View
@@ -3,7 +3,7 @@
(in-package :cl-recaptcha.sysdef)
(defsystem :cl-recaptcha.sysdef
(defsystem :cl-recaptcha
:name "CL Recaptcha"
:author "Aad Versteden <madnificent@gmail.com>"
:version "0"
View
@@ -6,6 +6,7 @@
:*public-captcha-key*
:challenge-js
:challenge-ns
:challenge
:challenge-ajax-src
:verify-captcha))
@@ -29,6 +30,10 @@
(format nil
"<script type=\"text/javascript\" src=\"~A\"></script>" *js-source*))
(defun challenge (&optional (public-key *public-captcha-key*))
"This is the simplest way. It combines the script and the noscript version."
(concatenate 'string (challenge-js public-key) (challenge-ns public-key)))
(defun verify-captcha ( recaptcha-challenge-field recaptcha-response-field remote-ip &key (private-key *private-captcha-key*) )
"Verifies the result the user gave. There are two values returned. The first indicates the success or failure, the second indicates the error code the captcha-server gave."
(let ((response

0 comments on commit 457710c

Please sign in to comment.