summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-06-28 11:58:35 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-07-02 14:49:13 +0200
commit8a064915f5940e511aea21055660e363a96a4110 (patch)
tree29412fd2cbbcf5df0f12d4dc9d89cb72bdeb3b12 /doc
parent1ee82c176e98592053d9842280afe08624abf4c1 (diff)
Add a full server.
Diffstat (limited to 'doc')
-rw-r--r--doc/webid-oidc.texi23
1 files changed, 16 insertions, 7 deletions
diff --git a/doc/webid-oidc.texi b/doc/webid-oidc.texi
index c58597a..ba23010 100644
--- a/doc/webid-oidc.texi
+++ b/doc/webid-oidc.texi
@@ -441,6 +441,7 @@ the seed.
@menu
* Running webid-oidc reverse-proxy::
* The authenticator::
+* The full server::
* Resources stored on the server::
@end menu
@@ -483,8 +484,8 @@ variable.
@node The authenticator
@section The authenticator
-In @emph{(webid-oidc jws)}, the following function gives a simple API
-for a web server:
+In @emph{(webid-oidc resource-server)}, the following function gives a
+simple API for a web server:
@deffn function make-authenticator @var{jti-list} @var{[#server-uri]} @var{[#current-time]} @var{[#http-get]}
Create an authenticator, i.e. a function that takes a request and
@@ -517,6 +518,19 @@ the subject of the access token. If an error happens, it is thrown;
the function always returns a valid URI.
@end deffn
+@node The full server
+@section The full server
+
+@deffn {function from @emph{(webid-oidc resource-server)}} make-server @var{[#:server-uri]} @var{[#:owner]} @var{[#:authenticator]} @var{[#:current-time]} @var{[#:http-get]}
+Return a server handler, a function taking 2 values, a request and a
+request body, and returning 2 values, the response and response body.
+
+The optional @var{[#:authenticator]} argument defaults to the
+webid-oidc authenticator, @var{[#:current-time]} defaults to a thunk
+returning the system time and @var{[#:http-get]} to the web client
+from @emph{(web client)}.
+@end deffn
+
@node Resources stored on the server
@section Resources stored on the server
@@ -1252,11 +1266,6 @@ There was a request to delete the root storage, which is an error.
There was a request to delete a non-empty container.
@end deftp
-@deftp {exception type} &not-a-container @var{path} @var{content-type}
-There was a request to create a resource in something that is not a
-container.
-@end deftp
-
@deftp {exception type} &cannot-fetch-group @var{group-uri} @var{cause}
The access control could not fetch the group @var{group-uri} (with a
known @var{cause}). This warning is continuable every time it is