Commit f3bfffb3 authored by Anton Vodonosov's avatar Anton Vodonosov

closes #22 adjust the exampels to hunchentoot 1.1.

Ignore-this: 130ddb37ff3f4e835b5b099498fe2c34

darcs-hash:a50fb18d97f31b77e82b30bd55a59e3eba620457
parent 3f500f5e
......@@ -109,15 +109,14 @@ to FINISH-URI with different parameters."
(defun provider-ht-handle ()
(multiple-value-bind (body code)
(handle-openid-provider-request *openid-provider*
(append (post-parameters)
(get-parameters))
(append (post-parameters*)
(get-parameters*))
:allow-unencrypted-association-p (ssl-p))
(cond
((<= 300 code 399) ; Redirect, body is actually an URI
(redirect body :code code))
(t (setf (return-code) code) ; Set return code
(t (setf (return-code*) code) ; Set return code
body))))
;; Initialization
......@@ -140,3 +139,4 @@ to FINISH-URI with different parameters."
(pushnew 400 *approved-return-codes*))
; (init-provider "http://example.com/" "/cl-openid-op/")
......@@ -38,7 +38,7 @@
<dl>~:{<dt>~A</dt><dd>~A</dd>~}</dl>
<p style=\"text-align:right;\"><a href=\"~A\">return</a><p>"
(realm *relying-party*)
(alist-to-lol (get-parameters))
(alist-to-lol (get-parameters*))
(root-uri *relying-party*)))
(defun access-granted-screen (authproc)
......@@ -49,7 +49,7 @@
<dl>~:{<dt>~A</dt><dd>~A</dd>~}</dl>
<p style=\"text-align:right;\"><a href=\"~A\">return</a><p>"
(escape-for-html (prin1-to-string authproc))
(alist-to-lol (get-parameters))
(alist-to-lol (get-parameters*))
(root-uri *relying-party*)))
(defun assertion-error-screen (err)
......@@ -62,7 +62,7 @@
<p style=\"text-align:right;\"><a href=\"~A\">return</a><p>"
(code err)
err
(alist-to-lol (get-parameters))
(alist-to-lol (get-parameters*))
(root-uri *relying-party*)))
;;; Actual handler
......@@ -82,8 +82,8 @@
((get-parameter +authproc-handle-parameter+)
(handler-case
(let ((authproc (handle-indirect-response
*relying-party* (get-parameters) ; The incoming message alist consists of GET parameters.
(merge-uris (request-uri) (root-uri *relying-party*))))) ; Figuring out actual request URI may be more complicated with proxies
*relying-party* (get-parameters*) ; The incoming message alist consists of GET parameters.
(merge-uris (request-uri*) (root-uri *relying-party*))))) ; Figuring out actual request URI may be more complicated with proxies
(if authproc ; On successful id_res, AUTH-PROCESS structure is returned; on cancel response, we get NIL.
(access-granted-screen authproc)
(access-denied-screen)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment