summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-06-27 23:21:54 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-07-02 14:49:13 +0200
commit1ee82c176e98592053d9842280afe08624abf4c1 (patch)
tree74b7ff66a4f97c9bbcb496594f7e2a70fcc599a3
parent5231ab8d1680a66460f7d126d7092315ab0f9e23 (diff)
Merge the client service with the webid-oidc program
-rwxr-xr-xbootstrap2
-rw-r--r--doc/webid-oidc.texi10
-rw-r--r--guix/vkraus/packages/webid-oidc.scm2
-rw-r--r--guix/vkraus/services/webid-oidc.scm3
-rw-r--r--man/Makefile.am6
-rw-r--r--po/POTFILES.in1
-rw-r--r--po/fr.po458
-rw-r--r--po/webid-oidc.pot261
-rw-r--r--src/Makefile.am2
-rw-r--r--src/scm/webid-oidc/client.scm154
-rw-r--r--src/scm/webid-oidc/program.scm153
11 files changed, 522 insertions, 530 deletions
diff --git a/bootstrap b/bootstrap
index 02e9c63..beb354f 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4,7 +4,7 @@ autoreconf -vif || exit 1
sed -i 's|SHELL = /bin/sh|SHELL = @SHELL@|g' po/Makefile.in.in || exit 1
## Prepare the man pages
-SCRIPTS_THAT_GET_EXECUTED="../src/webid-oidc ../src/webid-oidc-client-service ../src/webid-oidc-example-app"
+SCRIPTS_THAT_GET_EXECUTED="../src/webid-oidc ../src/webid-oidc-example-app"
mkdir -p .native || exit 1
cd .native || exit 1
diff --git a/doc/webid-oidc.texi b/doc/webid-oidc.texi
index 6e51bd1..c58597a 100644
--- a/doc/webid-oidc.texi
+++ b/doc/webid-oidc.texi
@@ -766,20 +766,20 @@ the @var{client-name} to your application name and @var{client-uri} to
point to where to a presentation of your application.
@end deffn
-The @code{webid-oidc-client-service} program can run a server to serve
-these resources. It is invoked with the following options:
+The @code{webid-oidc} @code{client-service} command can run a server
+to serve these resources. It is invoked with the following options:
@table @asis
@item @code{-h}, or @code{--help}
prints a summary of the options and exit.
@item @code{-v}, or @code{--version}
prints the version of the program and exits.
-@item @code{-i @var{URI}}, or @code{--client-id=@var{URI}}
+@item @code{-c @var{URI}}, or @code{--client-id=@var{URI}}
sets the global identitifier of the application, which is dereferenced
to a semantic resource.
@item @code{-r @var{URI}}, or @code{--redirect-uri=@var{URI}}
sets the redirection URI.
-@item @code{-n @var{NAME}}, or @code{--client-name=@var{NAME}}
+@item @code{-C @var{NAME}}, or @code{--client-name=@var{NAME}}
sets the name of your application, so that it is shown when the user
gets an authorization. The webid-oidc issuer program that comes with
this package does not display it, because it could be dishonest, but
@@ -795,7 +795,7 @@ let the server dump all its output to @var{FILE.log}.
let the server dump all its errors to @var{FILE.err}.
@end table
-The program is sensitive to the environment variable @emph{LANG},
+The command is sensitive to the environment variable @emph{LANG},
which influences how the program is internationalized to the server
administrator. This changes the long form of the options, and the
language in the log files.
diff --git a/guix/vkraus/packages/webid-oidc.scm b/guix/vkraus/packages/webid-oidc.scm
index eddd511..f5f95c7 100644
--- a/guix/vkraus/packages/webid-oidc.scm
+++ b/guix/vkraus/packages/webid-oidc.scm
@@ -83,7 +83,7 @@
(format #f "~a/bin/webid-oidc-~a" out program)
`("GUILE_LOAD_PATH" ":" = ,mod-paths)
`("GUILE_LOAD_COMPILED_PATH" ":" = ,go-paths)))
- '(client-service example-app hello))))))))
+ '(example-app hello))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("guile" ,guile-3.0)
diff --git a/guix/vkraus/services/webid-oidc.scm b/guix/vkraus/services/webid-oidc.scm
index d2af344..2100c30 100644
--- a/guix/vkraus/services/webid-oidc.scm
+++ b/guix/vkraus/services/webid-oidc.scm
@@ -277,7 +277,8 @@
(prepare-directory "/var/log/webid-oidc"))
(make-forkexec-constructor
(list
- (string-append #$webid-oidc "/bin/webid-oidc-client-service")
+ (string-append #$webid-oidc "/bin/webid-oidc")
+ "client-service"
"--client-id" #$client-id
"--redirect-uri" #$redirect-uri
"--client-name" #$client-name
diff --git a/man/Makefile.am b/man/Makefile.am
index af39c66..b0b08d6 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,4 @@
-dist_man8_MANS = webid-oidc.man webid-oidc-client-service.man
+dist_man8_MANS = webid-oidc.man webid-oidc-example-app.man
EXTRA_DIST = ./reset-env
@@ -6,10 +6,6 @@ webid-oidc.man: ../src/scm/webid-oidc/program.scm ../configure.ac
$(AM_V_GEN) ../pre-inst-env ./reset-env $(HELP2MAN) $(srcdir)/../src/webid-oidc > $@-t
mv $@-t $(srcdir)/$@
-webid-oidc-client-service.man: ../src/scm/webid-oidc/client.scm ../configure.ac
- $(AM_V_GEN) ../pre-inst-env ./reset-env $(HELP2MAN) $(srcdir)/../src/webid-oidc-client-service > $@-t
- mv $@-t $(srcdir)/$@
-
webid-oidc-example-app.man: ../src/scm/webid-oidc/example-app.scm ../configure.ac
$(AM_V_GEN) ../pre-inst-env ./reset-env $(HELP2MAN) $(srcdir)/../src/webid-oidc-example-app > $@-t
mv $@-t $(srcdir)/$@
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 80def86..b6f84a8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,6 +11,5 @@ src/scm/webid-oidc/identity-provider.scm
src/scm/webid-oidc/authorization-page-unsafe.scm
src/scm/webid-oidc/resource-server.scm
src/scm/webid-oidc/hello-world.scm
-src/scm/webid-oidc/client.scm
src/scm/webid-oidc/example-app.scm
src/scm/webid-oidc/program.scm
diff --git a/po/fr.po b/po/fr.po
index d736a5c..0b11818 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: webid-oidc 0.0.0\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
-"POT-Creation-Date: 2021-06-27 22:30+0200\n"
-"PO-Revision-Date: 2021-06-27 22:41+0200\n"
+"POT-Creation-Date: 2021-06-27 23:23+0200\n"
+"PO-Revision-Date: 2021-06-27 23:40+0200\n"
"Last-Translator: Vivien Kraus <vivien@planete-kraus.eu>\n"
"Language-Team: French <vivien@planete-kraus.eu>\n"
"Language: fr\n"
@@ -970,17 +970,16 @@ msgstr ""
msgid "~a: authentication failure: ~a\n"
msgstr "~a : échec d’authentificationn : ~a\n"
-#: src/scm/webid-oidc/hello-world.scm:31 src/scm/webid-oidc/client.scm:619
-#: src/scm/webid-oidc/example-app.scm:100 src/scm/webid-oidc/program.scm:52
+#: src/scm/webid-oidc/hello-world.scm:31 src/scm/webid-oidc/example-app.scm:100
+#: src/scm/webid-oidc/program.scm:79
msgid "command-line|version"
msgstr "version"
-#: src/scm/webid-oidc/hello-world.scm:33 src/scm/webid-oidc/client.scm:621
-#: src/scm/webid-oidc/example-app.scm:102
+#: src/scm/webid-oidc/hello-world.scm:33 src/scm/webid-oidc/example-app.scm:102
msgid "comand-line|help"
msgstr "aide"
-#: src/scm/webid-oidc/hello-world.scm:35 src/scm/webid-oidc/client.scm:631
+#: src/scm/webid-oidc/hello-world.scm:35
msgid "comand-line|port"
msgstr "port"
@@ -1011,152 +1010,16 @@ msgstr ""
" -p PORT, --~a=8080 :\n"
" définit le port à lier.\n"
-#: src/scm/webid-oidc/hello-world.scm:61 src/scm/webid-oidc/client.scm:700
-#: src/scm/webid-oidc/example-app.scm:143 src/scm/webid-oidc/program.scm:268
+#: src/scm/webid-oidc/hello-world.scm:61 src/scm/webid-oidc/example-app.scm:143
+#: src/scm/webid-oidc/program.scm:344
#, scheme-format
msgid "~a version ~a\n"
msgstr "~a version ~a\n"
-#: src/scm/webid-oidc/hello-world.scm:72 src/scm/webid-oidc/client.scm:738
+#: src/scm/webid-oidc/hello-world.scm:72
msgid "The port should be a number between 0 and 65535.\n"
msgstr "Le port doit être un nombre entre 0 et 65535.\n"
-#: src/scm/webid-oidc/client.scm:623
-msgid "comand-line|client-id"
-msgstr "id-client"
-
-#: src/scm/webid-oidc/client.scm:625
-msgid "comand-line|redirect-uri"
-msgstr "uri-redirection"
-
-#: src/scm/webid-oidc/client.scm:627
-msgid "comand-line|client-name"
-msgstr "nom-client"
-
-#: src/scm/webid-oidc/client.scm:629
-msgid "comand-line|client-uri"
-msgstr "uri-client"
-
-#: src/scm/webid-oidc/client.scm:633
-msgid "comand-line|log-file"
-msgstr "fichier-journal"
-
-#: src/scm/webid-oidc/client.scm:635
-msgid "comand-line|error-file"
-msgstr "fichier-erreur"
-
-#: src/scm/webid-oidc/client.scm:650
-#, scheme-format
-msgid ""
-"Usage: ~a [OPTIONS]...\n"
-"\n"
-"Serve public pages for an application.\n"
-"\n"
-"Options:\n"
-" -h, --~a:\n"
-" display this help message and exit.\n"
-" -v, --~a:\n"
-" display the version information (~a) and exit.\n"
-" -i URI, --~a=URI:\n"
-" set the webid of the client.\n"
-" -r FILE, --~a=URI:\n"
-" set the redirection URI where to get the authorization code.\n"
-" -n NAME, --~a=NAME:\n"
-" set the name of the application.\n"
-" -u URI, --~a=URI:\n"
-" set the address of the application (informative).\n"
-" -p PORT, --~a=PORT:\n"
-" set the port to bind (instead of 8080).\n"
-" -l FILE.log, --~a=FILE.log:\n"
-" dump the standard output to that file.\n"
-" -e FILE.err, --~a=FILE.err:\n"
-" dump the standard error to that file.\n"
-"\n"
-"Environment variables:\n"
-"\n"
-" LANG: set the locale of the sysadmin-facing interface, for log files\n"
-"and command-line interface. It is currently ~a.\n"
-"\n"
-"Example used in webid-oidc-demo.planete-kraus.eu (except it’s managed\n"
-"by shepherd in reality):\n"
-"\n"
-" export LANG=C\n"
-" webid-oidc-client-service \\\n"
-" --client-id 'https://webid-oidc-demo.planete-kraus.eu/example-"
-"application#id' \\\n"
-" --redirect-uri 'https://webid-oidc-demo.planete-kraus.eu/authorized' "
-"\\\n"
-" --client-name 'Example Solid Application' \\\n"
-" --client-uri 'https://webid-oidc.planete-kraus.eu/Running-a-client."
-"html#Running-a-client' \\\n"
-" --port $PORT\n"
-"\n"
-"If you find a bug, send a report to ~a.\n"
-msgstr ""
-"Utilisation : ~a [OPTIONS]...\n"
-"\n"
-"Sert les pages publiques d’une application.\n"
-"\n"
-"Options :\n"
-" -h, --~a :\n"
-" affiche ce message d’aide et quitte.\n"
-" -v, --~a :\n"
-" affiche le numéro de version (~a) et quitte.\n"
-" -i URI, --~a=URI :\n"
-" définit le webid du client.\n"
-" -r URI, --~a=URI :\n"
-" définit l’URI de redirection où obtenir le code d’autorisation.\n"
-" -n NOM, --~a=NOM :\n"
-" définit le nom de l’application.\n"
-" -u URI, --~a=URI :\n"
-" définit l’adresse de l’application (à titre informatif).\n"
-" -p PORT, --~a=PORT :\n"
-" définit le port à lier (au lieu de 8080).\n"
-" -l FICHIER.log, --~a=FICHIER.log :\n"
-" déverser la sortie standard vers ce fichier.\n"
-" -e FICHIER.err, --~a=FICHIER.err :\n"
-" déverser la sortie d’erreur vers ce fichier.\n"
-"\n"
-"Variables d’environnement :\n"
-"\n"
-" LANG : définit la locale de l’interface de l’administrateur système,\n"
-"pour les fichiers de journaux et l’interface en ligne de\n"
-"commande. Elle vaut actuellement ~a.\n"
-"\n"
-"Exemple utilisé pour webid-oidc-demo.planete-kraus.eu (sauf que le\n"
-"service est géré par shepherd en réalité, et les URI sont en\n"
-"anglais) :\n"
-"\n"
-" export LANG=fr_FR.UTF-8\n"
-" webid-oidc-client-service \\\n"
-" --id-client 'https://webid-oidc-demo.planete-kraus.eu/application-"
-"exemple#id' \\\n"
-" --uri-redirection 'https://webid-oidc-demo.planete-kraus.eu/autorisé' "
-"\\\n"
-" --nom-client 'Exemple d’application Solid' \\\n"
-" --uri-client 'https://webid-oidc.planete-kraus.eu/Running-a-client."
-"html#Running-a-client' \\\n"
-" --port $PORT\n"
-"\n"
-"Si vous trouvez une erreur dans le programme, envoyez-en un rapport à ~a.\n"
-
-#: src/scm/webid-oidc/client.scm:723
-msgid "You need to set the client ID as an URI.\n"
-msgstr "Vous devez définir l’identifiant du client comme URI.\n"
-
-#: src/scm/webid-oidc/client.scm:727
-msgid "You need to set the redirect URI.\n"
-msgstr "Vous devez définir l'URI de redirection.\n"
-
-#: src/scm/webid-oidc/client.scm:731
-msgid "The client URI should be an URI.\n"
-msgstr "L’URI du client doit être un URI.\n"
-
-#: src/scm/webid-oidc/client.scm:749 src/scm/webid-oidc/program.scm:401
-#, scheme-format
-msgid "~a: Internal server error: ~a\n"
-msgstr "~a : Erreur interne du serveur : ~a\n"
-
#: src/scm/webid-oidc/example-app.scm:35
#, scheme-format
msgid "~a.\t~a, certified by ~a;\n"
@@ -1304,59 +1167,89 @@ msgstr ""
msgid "There was an error: ~a\n"
msgstr "Il y a eu une erreur : ~a\n"
-#: src/scm/webid-oidc/program.scm:54
+#: src/scm/webid-oidc/program.scm:51
+#, scheme-format
+msgid "~a: Internal server error: ~a\n"
+msgstr "~a : Erreur interne du serveur : ~a\n"
+
+#: src/scm/webid-oidc/program.scm:62
+#, scheme-format
+msgid ""
+"The client locale ~s can’t be approximated by system locale ~s (because ~a), "
+"using C.\n"
+msgstr ""
+"La locale du client ~s ne peut pas être approchée par la locale système ~s "
+"(parce que ~a), on utilise C.\n"
+
+#: src/scm/webid-oidc/program.scm:81
msgid "command-line|help"
msgstr "aide"
-#: src/scm/webid-oidc/program.scm:56
+#: src/scm/webid-oidc/program.scm:83
msgid "command-line|server|port"
msgstr "port"
-#: src/scm/webid-oidc/program.scm:58
+#: src/scm/webid-oidc/program.scm:85
msgid "command-line|server|server-name"
msgstr "nom-du-serveur"
-#: src/scm/webid-oidc/program.scm:60
+#: src/scm/webid-oidc/program.scm:87
msgid "command-line|server|reverse-proxy|backend-uri"
msgstr "uri-arrière-plan"
-#: src/scm/webid-oidc/program.scm:62
+#: src/scm/webid-oidc/program.scm:89
msgid "command-line|server|reverse-proxy|header"
msgstr "en-tête"
-#: src/scm/webid-oidc/program.scm:64
+#: src/scm/webid-oidc/program.scm:91
msgid "command-line|server|issuer|key-file"
msgstr "fichier-clé"
-#: src/scm/webid-oidc/program.scm:66
+#: src/scm/webid-oidc/program.scm:93
msgid "command-line|server|issuer|subject"
msgstr "sujet"
-#: src/scm/webid-oidc/program.scm:68
+#: src/scm/webid-oidc/program.scm:95
msgid "command-line|server|issuer|password"
msgstr "mot-de-passe"
-#: src/scm/webid-oidc/program.scm:70
+#: src/scm/webid-oidc/program.scm:97
msgid "command-line|server|issuer|jwks-uri"
msgstr "uri-jwks"
-#: src/scm/webid-oidc/program.scm:72
+#: src/scm/webid-oidc/program.scm:99
msgid "command-line|server|issuer|authorization-endpoint-uri"
msgstr "uri-terminal-autorisation"
-#: src/scm/webid-oidc/program.scm:74
+#: src/scm/webid-oidc/program.scm:101
msgid "command-line|server|issuer|token-endpoint-uri"
msgstr "uri-terminal-jeton"
-#: src/scm/webid-oidc/program.scm:76
+#: src/scm/webid-oidc/program.scm:103
+msgid "command-line|server|client-id"
+msgstr "id-client"
+
+#: src/scm/webid-oidc/program.scm:105
+msgid "command-line|server|redirect-uri"
+msgstr "uri-redirection"
+
+#: src/scm/webid-oidc/program.scm:107
+msgid "command-line|server|client-name"
+msgstr "nom-client"
+
+#: src/scm/webid-oidc/program.scm:109
+msgid "command-line|server|client-uri"
+msgstr "uri-client"
+
+#: src/scm/webid-oidc/program.scm:111
msgid "command-line|log-file"
msgstr "fichier-journal"
-#: src/scm/webid-oidc/program.scm:78
+#: src/scm/webid-oidc/program.scm:113
msgid "command-line|error-file"
msgstr "fichier-erreur"
-#: src/scm/webid-oidc/program.scm:98
+#: src/scm/webid-oidc/program.scm:137
#, scheme-format
msgid ""
"Usage: ~a COMMAND [OPTIONS]...\n"
@@ -1368,6 +1261,8 @@ msgid ""
" run an authenticating reverse proxy.\n"
" ~a:\n"
" run an identity provider.\n"
+" ~a:\n"
+" serve the pages for a public application.\n"
"\n"
"General options:\n"
" -h, --~a:\n"
@@ -1408,6 +1303,19 @@ msgid ""
" -t URI, --~a=URI:\n"
" set the token endpoint of the issuer.\n"
"\n"
+"Options for the client service:\n"
+" -c URI, --~a=URI:\n"
+" set the web identifier of the client application, which is\n"
+" dereferenced to a semantic resource.\n"
+" -r URI, --~a=URI:\n"
+" set the redirection URI to get the authorization code back. The\n"
+" page is presented with the code to paste in the application.\n"
+" -C NAME, --~a=NAME:\n"
+" set the user-visible application name (may be misleading...).\n"
+" -u URI, --~a=URI:\n"
+" set an URI where someone would find more information about the\n"
+" application (again, may be misleading).\n"
+"\n"
"Environment variables:\n"
"\n"
" LANG: set the locale of the user interface (for the server commands,\n"
@@ -1461,6 +1369,19 @@ msgid ""
" --~a 'https://webid-oidc-demo.planete-kraus.eu/token' \\\n"
" --~a $PORT\n"
"\n"
+"Running the public pages for an application\n"
+"\n"
+"webid-oidc-demo.planete-kraus.eu is configured this way:\n"
+"\n"
+" ~a ~a \\\n"
+" --~a 'https://webid-oidc-demo.planete-kraus.eu/example-application#id' "
+"\\\n"
+" --~a 'https://webid-oidc-demo.planete-kraus.eu/authorized' \\\n"
+" --~a 'Example Solid Application' \\\n"
+" --~a 'https://webid-oidc.planete-kraus.eu/Running-a-client."
+"html#Running-a-client' \\\n"
+" --~a $PORT\n"
+"\n"
"If you find a bug, then please send a report to ~a.\n"
msgstr ""
"Utilisation : ~a COMMANDE [OPTIONS]...\n"
@@ -1472,6 +1393,8 @@ msgstr ""
" exécute le proxy inverse authentifiant.\n"
" ~a :\n"
" exécute le fournisseur d’identité.\n"
+" ~a :\n"
+" sert les pages d’une application publique.\n"
"\n"
"Options générales :\n"
" -h, --~a :\n"
@@ -1512,6 +1435,21 @@ msgstr ""
" -t URI, --~a=URI :\n"
" définit le terminal de jeton du fournisseur d’identité.\n"
"\n"
+"Options pour le service du client :\n"
+" -c URI, --~a=URI :\n"
+" définit l’identifiant web de l’application, qui est déréférencé\n"
+" pour obtenir une ressource sémantique.\n"
+" -r URI, --~a=URI :\n"
+" définit l’URI de redirection pour récupérer le code\n"
+" d’autorisation. La page est présentée avec le code à coller dans\n"
+" l’application.\n"
+" -C NOM, --~a=NOM :\n"
+" définit le nom de l’application visible par l’utilisateur (peut\n"
+" être trompeur…).\n"
+" -u URI, --~a=URI :\n"
+" définit l’URI où l’on peut trouver plus d’informations à propos\n"
+" de l’application (peut également être trompeur).\n"
+"\n"
"Variables d’environnement :\n"
"\n"
" LANG : définit la locale de l’interface utilisateur (pour les\n"
@@ -1563,57 +1501,74 @@ msgstr ""
" --~a 'https://webid-oidc-demo.planete-kraus.eu' \\\n"
" --~a '/var/lib/webid-oidc/issuer/key.jwk' \\\n"
" --~a 'https://webid-oidc-demo.planete-kraus.eu/profile/card#me' \\\n"
-" --~a \"$PASSWORD\" \\\n"
+" --~a \"$MOTDEPASSE\" \\\n"
" --~a 'https://webid-oidc-demo.planete-kraus.eu/keys' \\\n"
" --~a 'https://webid-oidc-demo.planete-kraus.eu/authorize' \\\n"
" --~a 'https://webid-oidc-demo.planete-kraus.eu/token' \\\n"
" --~a $PORT\n"
"\n"
+"Exécution d’un serveur pour les pages publiques de l’application\n"
+"\n"
+"webid-oidc-demo.planete-kraus.eu est configuré comme suit :\n"
+"\n"
+" export LANG=fr_FR.UTF-8\n"
+" ~a ~a \\\n"
+" --~a 'https://webid-oidc-demo.planete-kraus.eu/example-application#id' \\\n"
+" --~a 'https://webid-oidc-demo.planete-kraus.eu/authorized' \\\n"
+" --~a \"Example Solid Application\" \\\n"
+" --~a 'https://webid-oidc.planete-kraus.eu/Running-a-client' \\\n"
+" --~a $PORT\n"
+"\n"
"Si vous trouvez une erreur dans le programme, envoyez-en un rapport à\n"
"~a.\n"
-#: src/scm/webid-oidc/program.scm:205 src/scm/webid-oidc/program.scm:255
-#: src/scm/webid-oidc/program.scm:341
+#: src/scm/webid-oidc/program.scm:270 src/scm/webid-oidc/program.scm:326
+#: src/scm/webid-oidc/program.scm:427
msgid "command-line|command|reverse-proxy"
msgstr "proxy-inversé"
-#: src/scm/webid-oidc/program.scm:206 src/scm/webid-oidc/program.scm:261
-#: src/scm/webid-oidc/program.scm:359
+#: src/scm/webid-oidc/program.scm:271 src/scm/webid-oidc/program.scm:332
+#: src/scm/webid-oidc/program.scm:445
msgid "command-line|command|identity-provider"
msgstr "fournisseur-identité"
-#: src/scm/webid-oidc/program.scm:236 src/scm/webid-oidc/program.scm:240
-#: src/scm/webid-oidc/program.scm:244 src/scm/webid-oidc/program.scm:248
+#: src/scm/webid-oidc/program.scm:272 src/scm/webid-oidc/program.scm:338
+#: src/scm/webid-oidc/program.scm:486
+msgid "command-line|command|client-service"
+msgstr "service-client"
+
+#: src/scm/webid-oidc/program.scm:307 src/scm/webid-oidc/program.scm:311
+#: src/scm/webid-oidc/program.scm:315 src/scm/webid-oidc/program.scm:319
#, scheme-format
msgid "an environment variable| It is currently set to ~s."
msgstr " Elle vaut actuellement ~s."
-#: src/scm/webid-oidc/program.scm:238 src/scm/webid-oidc/program.scm:242
-#: src/scm/webid-oidc/program.scm:246 src/scm/webid-oidc/program.scm:250
+#: src/scm/webid-oidc/program.scm:309 src/scm/webid-oidc/program.scm:313
+#: src/scm/webid-oidc/program.scm:317 src/scm/webid-oidc/program.scm:321
msgid "an environment variable| It is currently unset."
msgstr " Elle n’est actuellement pas définie."
-#: src/scm/webid-oidc/program.scm:276
+#: src/scm/webid-oidc/program.scm:352
#, scheme-format
msgid "The --~a argument must be a number, not ~s.\n"
msgstr "L’argument de --~a doit être un nombre, pas ~s.\n"
-#: src/scm/webid-oidc/program.scm:282
+#: src/scm/webid-oidc/program.scm:358
#, scheme-format
msgid "The --~a argument must be an integer, not ~s.\n"
msgstr "L’argument de --~a doit être un entier, pas ~s.\n"
-#: src/scm/webid-oidc/program.scm:288
+#: src/scm/webid-oidc/program.scm:364
#, scheme-format
msgid "The --~a argument must be positive, ~s is invalid.\n"
msgstr "L’argument de --~a doit être positif, ~s est invalide.\n"
-#: src/scm/webid-oidc/program.scm:293
+#: src/scm/webid-oidc/program.scm:369
#, scheme-format
msgid "The --~a argument must be less than 65536, ~s is invalid.\n"
msgstr "L’argument de --~a doit être inférieur à 65536, ~s est invalide.\n"
-#: src/scm/webid-oidc/program.scm:325
+#: src/scm/webid-oidc/program.scm:411
#, scheme-format
msgid ""
"Usage: ~a COMMAND [OPTIONS]...\n"
@@ -1622,17 +1577,17 @@ msgstr ""
"Utilisation : ~a COMMANDE [OPTIONS]...\n"
"Voir --~a (-h).\n"
-#: src/scm/webid-oidc/program.scm:344 src/scm/webid-oidc/program.scm:362
+#: src/scm/webid-oidc/program.scm:430 src/scm/webid-oidc/program.scm:448
#, scheme-format
msgid "You must pass --~a to set the server name.\n"
msgstr "Vous devez passer --~a pour définir le nom du serveur.\n"
-#: src/scm/webid-oidc/program.scm:348
+#: src/scm/webid-oidc/program.scm:434
#, scheme-format
msgid "You must pass --~a to set the backend URI.\n"
msgstr "Vous devez passer --~a pour définir l'URI du service d’arrière-plan.\n"
-#: src/scm/webid-oidc/program.scm:366
+#: src/scm/webid-oidc/program.scm:452
#, scheme-format
msgid ""
"You must pass --~a to set the file where to store the identity provider "
@@ -1641,47 +1596,172 @@ msgstr ""
"Vous devez passer --~a pour définir le nom du fichier pour sauvegarder\n"
"la clé du fournisseur d’identité.\n"
-#: src/scm/webid-oidc/program.scm:370
+#: src/scm/webid-oidc/program.scm:456
#, scheme-format
msgid "You must pass --~a to set the subject of the identity provider.\n"
msgstr ""
"Vous devez passer --~a pour définir le sujet du fournisseur d’identité.\n"
-#: src/scm/webid-oidc/program.scm:374
+#: src/scm/webid-oidc/program.scm:460
#, scheme-format
msgid "You must pass --~a to set the subject’s password.\n"
msgstr "Vous devez passer --~a pour définir le mot de passe du sujet.\n"
-#: src/scm/webid-oidc/program.scm:378
+#: src/scm/webid-oidc/program.scm:464
#, scheme-format
msgid "You must pass --~a to set the JWKS URI.\n"
msgstr "Vous devez passer --~a pour définir l'URI du JWKS.\n"
-#: src/scm/webid-oidc/program.scm:382
+#: src/scm/webid-oidc/program.scm:468
#, scheme-format
msgid "You must pass --~a to set the authorization endpoint URI.\n"
msgstr ""
"Vous devez passer --~a pour définir l'URI du terminal d'autorisation.\n"
-#: src/scm/webid-oidc/program.scm:386
+#: src/scm/webid-oidc/program.scm:472
#, scheme-format
msgid "You must pass --~a to set the token endpoint URI.\n"
msgstr "Vous devez passer --~a pour définir l'URI du terminal de jeton.\n"
-#: src/scm/webid-oidc/program.scm:412
+#: src/scm/webid-oidc/program.scm:489
#, scheme-format
-msgid ""
-"The client locale ~s can’t be approximated by system locale ~s (because ~a), "
-"using C.\n"
+msgid "You must pass --~a to set the application web ID.\n"
msgstr ""
-"La locale du client ~s ne peut pas être approchée par la locale système ~s "
-"(parce que ~a), on utilise C.\n"
+"Vous devez passer --~a pour définir l'identifiant web de l’application.\n"
-#: src/scm/webid-oidc/program.scm:426
+#: src/scm/webid-oidc/program.scm:493
+#, scheme-format
+msgid "You must pass --~a to set the redirection URI.\n"
+msgstr "Vous devez passer --~a pour définir l'URI de redirection.\n"
+
+#: src/scm/webid-oidc/program.scm:497
+#, scheme-format
+msgid "You must pass --~a to set the informative client name.\n"
+msgstr ""
+"Vous devez passer --~a pour donner un nom pour l’application à titre "
+"informatif.\n"
+
+#: src/scm/webid-oidc/program.scm:501
+#, scheme-format
+msgid "You must pass --~a to set the informative client URI.\n"
+msgstr ""
+"Vous devez passer --~a pour définir l'URI du client, à titre informatif.\n"
+
+#: src/scm/webid-oidc/program.scm:513
#, scheme-format
msgid "Unknown command ~s\n"
msgstr "Commande inconnue ~s\n"
+#~ msgid "comand-line|log-file"
+#~ msgstr "fichier-journal"
+
+#~ msgid "comand-line|error-file"
+#~ msgstr "fichier-erreur"
+
+#, scheme-format
+#~ msgid ""
+#~ "Usage: ~a [OPTIONS]...\n"
+#~ "\n"
+#~ "Serve public pages for an application.\n"
+#~ "\n"
+#~ "Options:\n"
+#~ " -h, --~a:\n"
+#~ " display this help message and exit.\n"
+#~ " -v, --~a:\n"
+#~ " display the version information (~a) and exit.\n"
+#~ " -i URI, --~a=URI:\n"
+#~ " set the webid of the client.\n"
+#~ " -r FILE, --~a=URI:\n"
+#~ " set the redirection URI where to get the authorization code.\n"
+#~ " -n NAME, --~a=NAME:\n"
+#~ " set the name of the application.\n"
+#~ " -u URI, --~a=URI:\n"
+#~ " set the address of the application (informative).\n"
+#~ " -p PORT, --~a=PORT:\n"
+#~ " set the port to bind (instead of 8080).\n"
+#~ " -l FILE.log, --~a=FILE.log:\n"
+#~ " dump the standard output to that file.\n"
+#~ " -e FILE.err, --~a=FILE.err:\n"
+#~ " dump the standard error to that file.\n"
+#~ "\n"
+#~ "Environment variables:\n"
+#~ "\n"
+#~ " LANG: set the locale of the sysadmin-facing interface, for log files\n"
+#~ "and command-line interface. It is currently ~a.\n"
+#~ "\n"
+#~ "Example used in webid-oidc-demo.planete-kraus.eu (except it’s managed\n"
+#~ "by shepherd in reality):\n"
+#~ "\n"
+#~ " export LANG=C\n"
+#~ " webid-oidc-client-service \\\n"
+#~ " --client-id 'https://webid-oidc-demo.planete-kraus.eu/example-"
+#~ "application#id' \\\n"
+#~ " --redirect-uri 'https://webid-oidc-demo.planete-kraus.eu/"
+#~ "authorized' \\\n"
+#~ " --client-name 'Example Solid Application' \\\n"
+#~ " --client-uri 'https://webid-oidc.planete-kraus.eu/Running-a-client."
+#~ "html#Running-a-client' \\\n"
+#~ " --port $PORT\n"
+#~ "\n"
+#~ "If you find a bug, send a report to ~a.\n"
+#~ msgstr ""
+#~ "Utilisation : ~a [OPTIONS]...\n"
+#~ "\n"
+#~ "Sert les pages publiques d’une application.\n"
+#~ "\n"
+#~ "Options :\n"
+#~ " -h, --~a :\n"
+#~ " affiche ce message d’aide et quitte.\n"
+#~ " -v, --~a :\n"
+#~ " affiche le numéro de version (~a) et quitte.\n"
+#~ " -i URI, --~a=URI :\n"
+#~ " définit le webid du client.\n"
+#~ " -r URI, --~a=URI :\n"
+#~ " définit l’URI de redirection où obtenir le code d’autorisation.\n"
+#~ " -n NOM, --~a=NOM :\n"
+#~ " définit le nom de l’application.\n"
+#~ " -u URI, --~a=URI :\n"
+#~ " définit l’adresse de l’application (à titre informatif).\n"
+#~ " -p PORT, --~a=PORT :\n"
+#~ " définit le port à lier (au lieu de 8080).\n"
+#~ " -l FICHIER.log, --~a=FICHIER.log :\n"
+#~ " déverser la sortie standard vers ce fichier.\n"
+#~ " -e FICHIER.err, --~a=FICHIER.err :\n"
+#~ " déverser la sortie d’erreur vers ce fichier.\n"
+#~ "\n"
+#~ "Variables d’environnement :\n"
+#~ "\n"
+#~ " LANG : définit la locale de l’interface de l’administrateur système,\n"
+#~ "pour les fichiers de journaux et l’interface en ligne de\n"
+#~ "commande. Elle vaut actuellement ~a.\n"
+#~ "\n"
+#~ "Exemple utilisé pour webid-oidc-demo.planete-kraus.eu (sauf que le\n"
+#~ "service est géré par shepherd en réalité, et les URI sont en\n"
+#~ "anglais) :\n"
+#~ "\n"
+#~ " export LANG=fr_FR.UTF-8\n"
+#~ " webid-oidc-client-service \\\n"
+#~ " --id-client 'https://webid-oidc-demo.planete-kraus.eu/application-"
+#~ "exemple#id' \\\n"
+#~ " --uri-redirection 'https://webid-oidc-demo.planete-kraus.eu/"
+#~ "autorisé' \\\n"
+#~ " --nom-client 'Exemple d’application Solid' \\\n"
+#~ " --uri-client 'https://webid-oidc.planete-kraus.eu/Running-a-client."
+#~ "html#Running-a-client' \\\n"
+#~ " --port $PORT\n"
+#~ "\n"
+#~ "Si vous trouvez une erreur dans le programme, envoyez-en un rapport à "
+#~ "~a.\n"
+
+#~ msgid "You need to set the client ID as an URI.\n"
+#~ msgstr "Vous devez définir l’identifiant du client comme URI.\n"
+
+#~ msgid "You need to set the redirect URI.\n"
+#~ msgstr "Vous devez définir l'URI de redirection.\n"
+
+#~ msgid "The client URI should be an URI.\n"
+#~ msgstr "L’URI du client doit être un URI.\n"
+
#~ msgid "comand-line|issuer"
#~ msgstr "émetteur"
diff --git a/po/webid-oidc.pot b/po/webid-oidc.pot
index 67e3b0f..74b3c31 100644
--- a/po/webid-oidc.pot
+++ b/po/webid-oidc.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: webid-oidc SNAPSHOT\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
-"POT-Creation-Date: 2021-06-27 22:30+0200\n"
+"POT-Creation-Date: 2021-06-27 23:23+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -931,17 +931,16 @@ msgstr ""
msgid "~a: authentication failure: ~a\n"
msgstr ""
-#: src/scm/webid-oidc/hello-world.scm:31 src/scm/webid-oidc/client.scm:619
-#: src/scm/webid-oidc/example-app.scm:100 src/scm/webid-oidc/program.scm:52
+#: src/scm/webid-oidc/hello-world.scm:31 src/scm/webid-oidc/example-app.scm:100
+#: src/scm/webid-oidc/program.scm:79
msgid "command-line|version"
msgstr ""
-#: src/scm/webid-oidc/hello-world.scm:33 src/scm/webid-oidc/client.scm:621
-#: src/scm/webid-oidc/example-app.scm:102
+#: src/scm/webid-oidc/hello-world.scm:33 src/scm/webid-oidc/example-app.scm:102
msgid "comand-line|help"
msgstr ""
-#: src/scm/webid-oidc/hello-world.scm:35 src/scm/webid-oidc/client.scm:631
+#: src/scm/webid-oidc/hello-world.scm:35
msgid "comand-line|port"
msgstr ""
@@ -961,106 +960,16 @@ msgid ""
" set the port to bind.\n"
msgstr ""
-#: src/scm/webid-oidc/hello-world.scm:61 src/scm/webid-oidc/client.scm:700
-#: src/scm/webid-oidc/example-app.scm:143 src/scm/webid-oidc/program.scm:268
+#: src/scm/webid-oidc/hello-world.scm:61 src/scm/webid-oidc/example-app.scm:143
+#: src/scm/webid-oidc/program.scm:344
#, scheme-format
msgid "~a version ~a\n"
msgstr ""
-#: src/scm/webid-oidc/hello-world.scm:72 src/scm/webid-oidc/client.scm:738
+#: src/scm/webid-oidc/hello-world.scm:72
msgid "The port should be a number between 0 and 65535.\n"
msgstr ""
-#: src/scm/webid-oidc/client.scm:623
-msgid "comand-line|client-id"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:625
-msgid "comand-line|redirect-uri"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:627
-msgid "comand-line|client-name"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:629
-msgid "comand-line|client-uri"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:633
-msgid "comand-line|log-file"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:635
-msgid "comand-line|error-file"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:650
-#, scheme-format
-msgid ""
-"Usage: ~a [OPTIONS]...\n"
-"\n"
-"Serve public pages for an application.\n"
-"\n"
-"Options:\n"
-" -h, --~a:\n"
-" display this help message and exit.\n"
-" -v, --~a:\n"
-" display the version information (~a) and exit.\n"
-" -i URI, --~a=URI:\n"
-" set the webid of the client.\n"
-" -r FILE, --~a=URI:\n"
-" set the redirection URI where to get the authorization code.\n"
-" -n NAME, --~a=NAME:\n"
-" set the name of the application.\n"
-" -u URI, --~a=URI:\n"
-" set the address of the application (informative).\n"
-" -p PORT, --~a=PORT:\n"
-" set the port to bind (instead of 8080).\n"
-" -l FILE.log, --~a=FILE.log:\n"
-" dump the standard output to that file.\n"
-" -e FILE.err, --~a=FILE.err:\n"
-" dump the standard error to that file.\n"
-"\n"
-"Environment variables:\n"
-"\n"
-" LANG: set the locale of the sysadmin-facing interface, for log files\n"
-"and command-line interface. It is currently ~a.\n"
-"\n"
-"Example used in webid-oidc-demo.planete-kraus.eu (except it’s managed\n"
-"by shepherd in reality):\n"
-"\n"
-" export LANG=C\n"
-" webid-oidc-client-service \\\n"
-" --client-id 'https://webid-oidc-demo.planete-kraus.eu/example-"
-"application#id' \\\n"
-" --redirect-uri 'https://webid-oidc-demo.planete-kraus.eu/authorized' "
-"\\\n"
-" --client-name 'Example Solid Application' \\\n"
-" --client-uri 'https://webid-oidc.planete-kraus.eu/Running-a-client."
-"html#Running-a-client' \\\n"
-" --port $PORT\n"
-"\n"
-"If you find a bug, send a report to ~a.\n"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:723
-msgid "You need to set the client ID as an URI.\n"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:727
-msgid "You need to set the redirect URI.\n"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:731
-msgid "The client URI should be an URI.\n"
-msgstr ""
-
-#: src/scm/webid-oidc/client.scm:749 src/scm/webid-oidc/program.scm:401
-#, scheme-format
-msgid "~a: Internal server error: ~a\n"
-msgstr ""
-
#: src/scm/webid-oidc/example-app.scm:35
#, scheme-format
msgid "~a.\t~a, certified by ~a;\n"
@@ -1167,59 +1076,87 @@ msgstr ""
msgid "There was an error: ~a\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:54
+#: src/scm/webid-oidc/program.scm:51
+#, scheme-format
+msgid "~a: Internal server error: ~a\n"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:62
+#, scheme-format
+msgid ""
+"The client locale ~s can’t be approximated by system locale ~s (because ~a), "
+"using C.\n"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:81
msgid "command-line|help"
msgstr ""
-#: src/scm/webid-oidc/program.scm:56
+#: src/scm/webid-oidc/program.scm:83
msgid "command-line|server|port"
msgstr ""
-#: src/scm/webid-oidc/program.scm:58
+#: src/scm/webid-oidc/program.scm:85
msgid "command-line|server|server-name"
msgstr ""
-#: src/scm/webid-oidc/program.scm:60
+#: src/scm/webid-oidc/program.scm:87
msgid "command-line|server|reverse-proxy|backend-uri"
msgstr ""
-#: src/scm/webid-oidc/program.scm:62
+#: src/scm/webid-oidc/program.scm:89
msgid "command-line|server|reverse-proxy|header"
msgstr ""
-#: src/scm/webid-oidc/program.scm:64
+#: src/scm/webid-oidc/program.scm:91
msgid "command-line|server|issuer|key-file"
msgstr ""
-#: src/scm/webid-oidc/program.scm:66
+#: src/scm/webid-oidc/program.scm:93
msgid "command-line|server|issuer|subject"
msgstr ""
-#: src/scm/webid-oidc/program.scm:68
+#: src/scm/webid-oidc/program.scm:95
msgid "command-line|server|issuer|password"
msgstr ""
-#: src/scm/webid-oidc/program.scm:70
+#: src/scm/webid-oidc/program.scm:97
msgid "command-line|server|issuer|jwks-uri"
msgstr ""
-#: src/scm/webid-oidc/program.scm:72
+#: src/scm/webid-oidc/program.scm:99
msgid "command-line|server|issuer|authorization-endpoint-uri"
msgstr ""
-#: src/scm/webid-oidc/program.scm:74
+#: src/scm/webid-oidc/program.scm:101
msgid "command-line|server|issuer|token-endpoint-uri"
msgstr ""
-#: src/scm/webid-oidc/program.scm:76
+#: src/scm/webid-oidc/program.scm:103
+msgid "command-line|server|client-id"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:105
+msgid "command-line|server|redirect-uri"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:107
+msgid "command-line|server|client-name"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:109
+msgid "command-line|server|client-uri"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:111
msgid "command-line|log-file"
msgstr ""
-#: src/scm/webid-oidc/program.scm:78
+#: src/scm/webid-oidc/program.scm:113
msgid "command-line|error-file"
msgstr ""
-#: src/scm/webid-oidc/program.scm:98
+#: src/scm/webid-oidc/program.scm:137
#, scheme-format
msgid ""
"Usage: ~a COMMAND [OPTIONS]...\n"
@@ -1231,6 +1168,8 @@ msgid ""
" run an authenticating reverse proxy.\n"
" ~a:\n"
" run an identity provider.\n"
+" ~a:\n"
+" serve the pages for a public application.\n"
"\n"
"General options:\n"
" -h, --~a:\n"
@@ -1271,6 +1210,19 @@ msgid ""
" -t URI, --~a=URI:\n"
" set the token endpoint of the issuer.\n"
"\n"
+"Options for the client service:\n"
+" -c URI, --~a=URI:\n"
+" set the web identifier of the client application, which is\n"
+" dereferenced to a semantic resource.\n"
+" -r URI, --~a=URI:\n"
+" set the redirection URI to get the authorization code back. The\n"
+" page is presented with the code to paste in the application.\n"
+" -C NAME, --~a=NAME:\n"
+" set the user-visible application name (may be misleading...).\n"
+" -u URI, --~a=URI:\n"
+" set an URI where someone would find more information about the\n"
+" application (again, may be misleading).\n"
+"\n"
"Environment variables:\n"
"\n"
" LANG: set the locale of the user interface (for the server commands,\n"
@@ -1324,107 +1276,138 @@ msgid ""
" --~a 'https://webid-oidc-demo.planete-kraus.eu/token' \\\n"
" --~a $PORT\n"
"\n"
+"Running the public pages for an application\n"
+"\n"
+"webid-oidc-demo.planete-kraus.eu is configured this way:\n"
+"\n"
+" ~a ~a \\\n"
+" --~a 'https://webid-oidc-demo.planete-kraus.eu/example-application#id' "
+"\\\n"
+" --~a 'https://webid-oidc-demo.planete-kraus.eu/authorized' \\\n"
+" --~a 'Example Solid Application' \\\n"
+" --~a 'https://webid-oidc.planete-kraus.eu/Running-a-client."
+"html#Running-a-client' \\\n"
+" --~a $PORT\n"
+"\n"
"If you find a bug, then please send a report to ~a.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:205 src/scm/webid-oidc/program.scm:255
-#: src/scm/webid-oidc/program.scm:341
+#: src/scm/webid-oidc/program.scm:270 src/scm/webid-oidc/program.scm:326
+#: src/scm/webid-oidc/program.scm:427
msgid "command-line|command|reverse-proxy"
msgstr ""
-#: src/scm/webid-oidc/program.scm:206 src/scm/webid-oidc/program.scm:261
-#: src/scm/webid-oidc/program.scm:359
+#: src/scm/webid-oidc/program.scm:271 src/scm/webid-oidc/program.scm:332
+#: src/scm/webid-oidc/program.scm:445
msgid "command-line|command|identity-provider"
msgstr ""
-#: src/scm/webid-oidc/program.scm:236 src/scm/webid-oidc/program.scm:240
-#: src/scm/webid-oidc/program.scm:244 src/scm/webid-oidc/program.scm:248
+#: src/scm/webid-oidc/program.scm:272 src/scm/webid-oidc/program.scm:338
+#: src/scm/webid-oidc/program.scm:486
+msgid "command-line|command|client-service"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:307 src/scm/webid-oidc/program.scm:311
+#: src/scm/webid-oidc/program.scm:315 src/scm/webid-oidc/program.scm:319
#, scheme-format
msgid "an environment variable| It is currently set to ~s."
msgstr ""
-#: src/scm/webid-oidc/program.scm:238 src/scm/webid-oidc/program.scm:242
-#: src/scm/webid-oidc/program.scm:246 src/scm/webid-oidc/program.scm:250
+#: src/scm/webid-oidc/program.scm:309 src/scm/webid-oidc/program.scm:313
+#: src/scm/webid-oidc/program.scm:317 src/scm/webid-oidc/program.scm:321
msgid "an environment variable| It is currently unset."
msgstr ""
-#: src/scm/webid-oidc/program.scm:276
+#: src/scm/webid-oidc/program.scm:352
#, scheme-format
msgid "The --~a argument must be a number, not ~s.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:282
+#: src/scm/webid-oidc/program.scm:358
#, scheme-format
msgid "The --~a argument must be an integer, not ~s.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:288
+#: src/scm/webid-oidc/program.scm:364
#, scheme-format
msgid "The --~a argument must be positive, ~s is invalid.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:293
+#: src/scm/webid-oidc/program.scm:369
#, scheme-format
msgid "The --~a argument must be less than 65536, ~s is invalid.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:325
+#: src/scm/webid-oidc/program.scm:411
#, scheme-format
msgid ""
"Usage: ~a COMMAND [OPTIONS]...\n"
"See --~a (-h).\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:344 src/scm/webid-oidc/program.scm:362
+#: src/scm/webid-oidc/program.scm:430 src/scm/webid-oidc/program.scm:448
#, scheme-format
msgid "You must pass --~a to set the server name.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:348
+#: src/scm/webid-oidc/program.scm:434
#, scheme-format
msgid "You must pass --~a to set the backend URI.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:366
+#: src/scm/webid-oidc/program.scm:452
#, scheme-format
msgid ""
"You must pass --~a to set the file where to store the identity provider "
"key.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:370
+#: src/scm/webid-oidc/program.scm:456
#, scheme-format
msgid "You must pass --~a to set the subject of the identity provider.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:374
+#: src/scm/webid-oidc/program.scm:460
#, scheme-format
msgid "You must pass --~a to set the subject’s password.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:378
+#: src/scm/webid-oidc/program.scm:464
#, scheme-format
msgid "You must pass --~a to set the JWKS URI.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:382
+#: src/scm/webid-oidc/program.scm:468
#, scheme-format
msgid "You must pass --~a to set the authorization endpoint URI.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:386
+#: src/scm/webid-oidc/program.scm:472
#, scheme-format
msgid "You must pass --~a to set the token endpoint URI.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:412
+#: src/scm/webid-oidc/program.scm:489
#, scheme-format
-msgid ""
-"The client locale ~s can’t be approximated by system locale ~s (because ~a), "
-"using C.\n"
+msgid "You must pass --~a to set the application web ID.\n"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:493
+#, scheme-format
+msgid "You must pass --~a to set the redirection URI.\n"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:497
+#, scheme-format
+msgid "You must pass --~a to set the informative client name.\n"
+msgstr ""
+
+#: src/scm/webid-oidc/program.scm:501
+#, scheme-format
+msgid "You must pass --~a to set the informative client URI.\n"
msgstr ""
-#: src/scm/webid-oidc/program.scm:426
+#: src/scm/webid-oidc/program.scm:513
#, scheme-format
msgid "Unknown command ~s\n"
msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
index 5932f1d..034ae92 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES += %reldir%/libwebidoidc.la
-dist_bin_SCRIPTS += %reldir%/webid-oidc %reldir%/webid-oidc-hello %reldir%/webid-oidc-client-service %reldir%/webid-oidc-example-app
+dist_bin_SCRIPTS += %reldir%/webid-oidc %reldir%/webid-oidc-hello %reldir%/webid-oidc-example-app
AM_CPPFLAGS += -I %reldir% -I $(srcdir)/%reldir%
diff --git a/src/scm/webid-oidc/client.scm b/src/scm/webid-oidc/client.scm
index 6fe9cc2..d8f438b 100644
--- a/src/scm/webid-oidc/client.scm
+++ b/src/scm/webid-oidc/client.scm
@@ -604,158 +604,4 @@
(body
(p "This page does not exist on the server."))))))))))))))
-(define (G_ text)
- (let ((out (gettext text)))
- (if (string=? out text)
- ;; No translation, disambiguate
- (car (reverse (string-split text #\|)))
- out)))
-(define-public (main-server)
- (setlocale LC_ALL "")
- (bindtextdomain cfg:package cfg:localedir)
- (textdomain cfg:package)
- (let ((version-sym
- (string->symbol (G_ "command-line|version")))
- (help-sym
- (string->symbol (G_ "comand-line|help")))
- (client-id-sym
- (string->symbol (G_ "comand-line|client-id")))
- (redirect-uri-sym
- (string->symbol (G_ "comand-line|redirect-uri")))
- (client-name-sym
- (string->symbol (G_ "comand-line|client-name")))
- (client-uri-sym
- (string->symbol (G_ "comand-line|client-uri")))
- (port-sym
- (string->symbol (G_ "comand-line|port")))
- (log-file-sym
- (string->symbol (G_ "comand-line|log-file")))
- (error-file-sym
- (string->symbol (G_ "comand-line|error-file"))))
- (let ((options
- (let ((option-spec
- `((,version-sym (single-char #\v) (value #f))
- (,help-sym (single-char #\h) (value #f))
- (,client-id-sym (single-char #\i) (value #t))
- (,redirect-uri-sym (single-char #\r) (value #t))
- (,client-name-sym (single-char #\n) (value #t))
- (,client-uri-sym (single-char #\u) (value #t))
- (,port-sym (single-char #\p) (value #t))
- (,log-file-sym (single-char #\l) (value #t))
- (,error-file-sym (single-char #\e) (value #t)))))
- (getopt-long (command-line) option-spec))))
- (cond
- ((option-ref options help-sym #f)
- (format #t (G_ "Usage: ~a [OPTIONS]...
-
-Serve public pages for an application.
-
-Options:
- -h, --~a:
- display this help message and exit.
- -v, --~a:
- display the version information (~a) and exit.
- -i URI, --~a=URI:
- set the webid of the client.
- -r FILE, --~a=URI:
- set the redirection URI where to get the authorization code.
- -n NAME, --~a=NAME:
- set the name of the application.
- -u URI, --~a=URI:
- set the address of the application (informative).
- -p PORT, --~a=PORT:
- set the port to bind (instead of 8080).
- -l FILE.log, --~a=FILE.log:
- dump the standard output to that file.
- -e FILE.err, --~a=FILE.err:
- dump the standard error to that file.
-
-Environment variables:
-
- LANG: set the locale of the sysadmin-facing interface, for log files
-and command-line interface. It is currently ~a.
-
-Example used in webid-oidc-demo.planete-kraus.eu (except it’s managed
-by shepherd in reality):
-
- export LANG=C
- webid-oidc-client-service \\
- --client-id 'https://webid-oidc-demo.planete-kraus.eu/example-application#id' \\
- --redirect-uri 'https://webid-oidc-demo.planete-kraus.eu/authorized' \\
- --client-name 'Example Solid Application' \\
- --client-uri 'https://webid-oidc.planete-kraus.eu/Running-a-client.html#Running-a-client' \\
- --port $PORT
-
-If you find a bug, send a report to ~a.
-")
- (car (command-line))
- help-sym version-sym
- cfg:version
- client-id-sym redirect-uri-sym client-name-sym client-uri-sym port-sym
- log-file-sym error-file-sym
- (or (getenv "LANG") "")
- cfg:package-bugreport))
- ((option-ref options version-sym #f)
- (format #t (G_ "~a version ~a\n")
- cfg:package cfg:version))
- (else
- (let ((client-id (option-ref options client-id-sym #f))
- (redirect-uri (option-ref options redirect-uri-sym #f))
- (client-name (option-ref options client-name-sym "Example Solid App"))
- (client-uri
- (option-ref options client-uri-sym
- "https://webid-oidc.planete-kraus.eu/Running-a-client.html#Running-a-client"))
- (port-string
- (option-ref options port-sym "8080"))
- (log-file-string
- (option-ref options log-file-sym #f))
- (error-file-string
- (option-ref options error-file-sym #f)))
- (when log-file-string
- (set-current-output-port (stubs:open-output-file* log-file-string))
- (setvbuf (current-output-port) 'none))
- (when error-file-string
- (set-current-error-port (stubs:open-output-file* error-file-string))
- (setvbuf (current-error-port) 'none))
- (unless (and client-id (string->uri client-id))
- (format (current-error-port)
- (G_ "You need to set the client ID as an URI.\n"))
- (exit 1))
- (unless (and redirect-uri (string->uri redirect-uri))
- (format (current-error-port)
- (G_ "You need to set the redirect URI.\n"))
- (exit 2))
- (unless (string->uri client-uri)
- (format (current-error-port)
- (G_ "The client URI should be an URI.\n"))
- (exit 3))
- (unless (and (string->number port-string)
- (integer? (string->number port-string))
- (>= (string->number port-string) 0)
- (<= (string->number port-string) 65535))
- (format (current-error-port)
- (G_ "The port should be a number between 0 and 65535.\n"))
- (exit 1))
- (let ((handler
- (serve-application client-id redirect-uri
- #:client-name client-name
- #:client-uri client-uri)))
- (let ((handler-with-log
- (lambda (request request-body)
- (with-exception-handler
- (lambda (error)
- (format (current-error-port)
- (G_ "~a: Internal server error: ~a\n")
- (date->string (time-utc->date (current-time)))
- (error->str error))
- (values
- (build-response #:code 500
- #:reason-phrase "Internal Server Error")
- "Sorry, there was an error."))
- (lambda ()
- (handler request request-body))
- #:unwind? #t))))
- (install-suspendable-ports!)
- (run-server handler 'http
- (list #:port (string->number port-string)))))))))))
diff --git a/src/scm/webid-oidc/program.scm b/src/scm/webid-oidc/program.scm
index 3582eaa..c53be5d 100644
--- a/src/scm/webid-oidc/program.scm
+++ b/src/scm/webid-oidc/program.scm
@@ -2,6 +2,7 @@
#:use-module (webid-oidc errors)
#:use-module (webid-oidc reverse-proxy)
#:use-module (webid-oidc identity-provider)
+ #:use-module (webid-oidc client)
#:use-module (webid-oidc jti)
#:use-module ((webid-oidc stubs) #:prefix stubs:)
#:use-module ((webid-oidc config) #:prefix cfg:)
@@ -42,6 +43,32 @@
(define cache-http-get
(with-cache #:http-get http-get-with-log))
+(define (handler-with-log handler)
+ (lambda (request request-body)
+ (with-exception-handler
+ (lambda (error)
+ (format (current-error-port)
+ (G_ "~a: Internal server error: ~a\n")
+ (date->string (time-utc->date (current-time)))
+ (error->str error))
+ (values
+ (build-response #:code 500
+ #:reason-phrase "Internal Server Error")
+ "Sorry, there was an error."))
+ (lambda ()
+ (with-exception-handler
+ (lambda (error)
+ (format (current-error-port)
+ (G_ "The client locale ~s can’t be approximated by system locale ~s (because ~a), using C.\n")
+ ((record-accessor &unknown-client-locale 'web-locale) error)
+ ((record-accessor &unknown-client-locale 'c-locale) error)
+ (error->str error)))
+ (lambda ()
+ (handler request request-body))
+ #:unwind? #t
+ #:unwind-for-type &unknown-client-locale))
+ #:unwind? #t)))
+
(define-public (main)
(setvbuf (current-output-port) 'none)
(setvbuf (current-error-port) 'none)
@@ -72,6 +99,14 @@
(string->symbol (G_ "command-line|server|issuer|authorization-endpoint-uri")))
(token-endpoint-uri-sym
(string->symbol (G_ "command-line|server|issuer|token-endpoint-uri")))
+ (client-id-sym
+ (string->symbol (G_ "command-line|server|client-id")))
+ (redirect-uri-sym
+ (string->symbol (G_ "command-line|server|redirect-uri")))
+ (client-name-sym
+ (string->symbol (G_ "command-line|server|client-name")))
+ (client-uri-sym
+ (string->symbol (G_ "command-line|server|client-uri")))
(log-file-sym
(string->symbol (G_ "command-line|log-file")))
(error-file-sym
@@ -88,6 +123,10 @@
(,jwks-uri-sym (single-char #\j) (value #t))
(,authorization-endpoint-uri-sym (single-char #\a) (value #t))
(,token-endpoint-uri-sym (single-char #\t) (value #t))
+ (,client-id-sym (single-char #\c) (value #t))
+ (,redirect-uri-sym (single-char #\r) (value #t))
+ (,client-name-sym (single-char #\C) (value #t))
+ (,client-uri-sym (single-char #\u) (value #t))
(,port-sym (single-char #\p) (value #t))
(,server-name-sym (single-char #\n) (value #t))
(,header-sym (single-char #\H) (value #t))
@@ -104,6 +143,8 @@ Available commands:
run an authenticating reverse proxy.
~a:
run an identity provider.
+ ~a:
+ serve the pages for a public application.
General options:
-h, --~a:
@@ -144,6 +185,19 @@ Options for the identity provider:
-t URI, --~a=URI:
set the token endpoint of the issuer.
+Options for the client service:
+ -c URI, --~a=URI:
+ set the web identifier of the client application, which is
+ dereferenced to a semantic resource.
+ -r URI, --~a=URI:
+ set the redirection URI to get the authorization code back. The
+ page is presented with the code to paste in the application.
+ -C NAME, --~a=NAME:
+ set the user-visible application name (may be misleading...).
+ -u URI, --~a=URI:
+ set an URI where someone would find more information about the
+ application (again, may be misleading).
+
Environment variables:
LANG: set the locale of the user interface (for the server commands,
@@ -197,6 +251,17 @@ invoked with the following options:
--~a 'https://webid-oidc-demo.planete-kraus.eu/token' \\
--~a $PORT
+Running the public pages for an application
+
+webid-oidc-demo.planete-kraus.eu is configured this way:
+
+ ~a ~a \\
+ --~a 'https://webid-oidc-demo.planete-kraus.eu/example-application#id' \\
+ --~a 'https://webid-oidc-demo.planete-kraus.eu/authorized' \\
+ --~a 'Example Solid Application' \\
+ --~a 'https://webid-oidc.planete-kraus.eu/Running-a-client.html#Running-a-client' \\
+ --~a $PORT
+
If you find a bug, then please send a report to ~a.
")
;; Usage:
@@ -204,6 +269,7 @@ If you find a bug, then please send a report to ~a.
;; Available commands:
(G_ "command-line|command|reverse-proxy")
(G_ "command-line|command|identity-provider")
+ (G_ "command-line|command|client-service")
;; General options
;; help
help-sym
@@ -231,6 +297,11 @@ If you find a bug, then please send a report to ~a.
jwks-uri-sym
authorization-endpoint-uri-sym
token-endpoint-uri-sym
+ ;; Options for the client service
+ client-id-sym
+ redirect-uri-sym
+ client-name-sym
+ client-uri-sym
;; Environment variables
(if (getenv "LANG")
(format #f (G_ "an environment variable| It is currently set to ~s.")
@@ -262,6 +333,11 @@ If you find a bug, then please send a report to ~a.
server-name-sym key-file-sym subject-sym password-sym
jwks-uri-sym authorization-endpoint-uri-sym
token-endpoint-uri-sym port-sym
+ ;; Running the public pages for an application
+ (car (command-line))
+ (G_ "command-line|command|client-service")
+ client-id-sym redirect-uri-sym client-name-sym client-uri-sym
+ port-sym
;; Bug report
cfg:package-bugreport))
((option-ref options version-sym #f)
@@ -319,7 +395,17 @@ If you find a bug, then please send a report to ~a.
(and str (string->uri str))))
(token-endpoint-uri
(let ((str (option-ref options token-endpoint-uri-sym #f)))
- (and str (string->uri str)))))
+ (and str (string->uri str))))
+ (client-id
+ (let ((str (option-ref options client-id-sym #f)))
+ (and str (string->uri str))))
+ (redirect-uri
+ (let ((str (option-ref options redirect-uri-sym #f)))
+ (and str (string->uri str))))
+ (client-name
+ (option-ref options client-name-sym #f))
+ (client-uri
+ (option-ref options client-uri-sym #f)))
(when (null? rest)
(format (current-error-port)
(G_ "Usage: ~a COMMAND [OPTIONS]...\nSee --~a (-h).\n")
@@ -393,36 +479,37 @@ If you find a bug, then please send a report to ~a.
(make-jti-list)
#:current-time current-time
#:http-get cache-http-get)))
- (let ((handler-with-log
- (lambda (request request-body)
- (with-exception-handler
- (lambda (error)
- (format (current-error-port)
- (G_ "~a: Internal server error: ~a\n")
- (date->string (time-utc->date (current-time)))
- (error->str error))
- (values
- (build-response #:code 500
- #:reason-phrase "Internal Server Error")
- "Sorry, there was an error."))
- (lambda ()
- (with-exception-handler
- (lambda (error)
- (format (current-error-port)
- (G_ "The client locale ~s can’t be approximated by system locale ~s (because ~a), using C.\n")
- ((record-accessor &unknown-client-locale 'web-locale) error)
- ((record-accessor &unknown-client-locale 'c-locale) error)
- (error->str error)))
- (lambda ()
- (handler request request-body))
- #:unwind? #t
- #:unwind-for-type &unknown-client-locale))
- #:unwind? #t))))
- (run-server
- handler-with-log
- 'http
- (list #:port port))))))
+ (run-server
+ (handler-with-log handler)
+ 'http
+ (list #:port port)))))
+ ((equal? command (G_ "command-line|command|client-service"))
+ (begin
+ (unless client-id
+ (format (current-error-port) (G_ "You must pass --~a to set the application web ID.\n")
+ client-id-sym)
+ (exit 1))
+ (unless redirect-uri
+ (format (current-error-port) (G_ "You must pass --~a to set the redirection URI.\n")
+ redirect-uri-sym)
+ (exit 1))
+ (unless client-name
+ (format (current-error-port) (G_ "You must pass --~a to set the informative client name.\n")
+ client-name-sym)
+ (exit 1))
+ (unless client-uri
+ (format (current-error-port) (G_ "You must pass --~a to set the informative client URI.\n")
+ client-uri-sym)
+ (exit 1))
+ (let ((handler
+ (serve-application client-id redirect-uri
+ #:client-name client-name
+ #:client-uri client-uri)))
+ (run-server
+ (handler-with-log handler)
+ 'http
+ (list #:port port)))))
(else
- (format (current-error-port) (G_ "Unknown command ~s\n")
- command)
- (exit 1))))))))))
+ (format (current-error-port) (G_ "Unknown command ~s\n")
+ command)
+ (exit 1))))))))))