summaryrefslogtreecommitdiff
path: root/src/scm/webid-oidc/client.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/scm/webid-oidc/client.scm')
-rw-r--r--src/scm/webid-oidc/client.scm41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/scm/webid-oidc/client.scm b/src/scm/webid-oidc/client.scm
index ee0b72c..1948d86 100644
--- a/src/scm/webid-oidc/client.scm
+++ b/src/scm/webid-oidc/client.scm
@@ -62,10 +62,6 @@
#:export
(
request
-
- serve-application
-
- <extended-client-manifest>
)
#:declarative? #t)
@@ -169,40 +165,3 @@
(scan-arguments args (or headers new-headers) non-header-args method))
((kw value args ...)
(scan-arguments args headers `(,value ,kw ,@non-header-args) method)))))
-
-(define* (serve-application id redirect-uri . args)
- (let ((endpoint (apply make <client-id>
- #:client-id id
- #:redirect-uris (list redirect-uri)
- args)))
- (lambda (request request-body)
- (with-exception-handler
- (lambda (exn)
- (unless (web-exception? exn)
- (raise-exception exn))
- (values
- (build-response
- #:code (web-exception-code exn)
- #:reason-phrase (web-exception-reason-phrase exn)
- #:headers `((content-type application/xhtml+xml)))
- (call-with-output-string
- (cute sxml->xml
- `(*TOP*
- (*PI* xml "version=\"1.0\" encoding=\"utf-8\"")
- (html (@ (xmlns "http://www.w3.org/1999/xhtml")
- (xml:lang ,(W_ "xml-lang|en")))
- (body
- ,(call-with-input-string
- (format #f (W_ "<h1>The request failed</h1>"))
- xml->sxml)
- ,(if (user-message? exn)
- (user-message-sxml exn)
- (call-with-input-string
- (format #f (W_ "<p>No more information.</p>"))
- xml->sxml)))))
- <>))))
- (lambda ()
- (receive (response response-body response-meta)
- (handle endpoint request request-body)
- (values response response-body)))
- #:unwind? #t))))