Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,220 of 9,220 pages
About the help in other languages
All help pages

exp:expgraphqlpublickey

Erzeugt den öffentlichen Leseschlüssel eines Frontends mit einem Befehl: eine Rolle, eine Benutzergruppe und einen Benutzer, die nur lesen, dann den Schlüssel (einmal gezeigt); listet die öffentlichen Schlüssel auf oder…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/commands/expgraphqlpublickey.md

On this page

This page is a translation. Read the English original

exp:expgraphqlpublickey

Erzeugt den öffentlichen Leseschlüssel eines Frontends mit einem Befehl: eine Rolle, eine Benutzergruppe und einen Benutzer, die nur lesen, dann den Schlüssel (einmal gezeigt); listet die öffentlichen Schlüssel auf oder widerruft einen; ein Probelauf ohne --apply.

Skript bin/php/expgraphqlpublickey.php, Code in kernel/private/classes/commands/expgraphqlpublickey.php. Führen Sie es im Wurzelverzeichnis der Installation aus, als der Benutzer, unter dem der Webserver läuft:

./console exp:expgraphqlpublickey --help
./console exp:graphql:public-key --help
php bin/php/expgraphqlpublickey.php --help

Hilfetext

Was --help ausgibt, so wie der Befehl es schreibt:

The public read key of a front end
A public read key (only graphql:read, only the siteaccesses of --siteaccess) needs an owner that
only reads. This command makes that owner once: the role "GraphQL public reader" (content/read as
the anonymous user of the siteaccesses reads, and apikey/create with the Scope graphql:read; no
user/login, so the owner cannot sign in), the hidden user group "GraphQL public readers" below the
user root node with the role, and the user graphql-public in it (a random password nobody is shown).
Then it makes the key and shows the token once. Run again, it reuses the role, the group and the
user, and makes no second key for the same siteaccesses unless --new. Making and revoking keys are
recorded in the audit (access.apikey.create, .revoke), the role in access.role.create.
Nothing is written without --apply.

./console exp:graphql:public-key --siteaccess=site                  what would be made
./console exp:graphql:public-key --siteaccess=site,site_de --name='Shop front end' --apply
./console exp:graphql:public-key --siteaccess=site --new --days=30 --apply
./console exp:graphql:public-key --list
./console exp:graphql:public-key --revoke=expk_4f2a9c1d7e3b --apply

Exit code: 0 done (or shown, or the key exists already); 1 the owner or the key could not be made,
or the key not revoked; 2 wrong options (no or an unknown siteaccess, an anonymous user that reads
nothing, a lifetime that is not offered, an unknown key, a user graphql-public of someone else).

Optionen

OptionWertHilfe
--siteaccesserforderlichdie Siteaccesses, in denen der Schlüssel gilt, durch Kommas getrennt (erforderlich, um einen Schlüssel zu erzeugen)
--nameerforderlichder Name des Schlüssels (Standard: GraphQL public key)
--dayserforderlichdie Lebensdauer des Schlüssels in Tagen (rest.ini [ApiKeySettings] ExpiryChoices[]; Standard DefaultExpiryDays, wie auf der Schlüsselseite)
--neweinen weiteren Schlüssel erzeugen, obwohl es für diese Siteaccesses schon einen aktiven öffentlichen Schlüssel gibt
--listdie öffentlichen Leseschlüssel auflisten: Präfix, Status, Siteaccesses, Ablauf, Besitzer
--revokeerforderlichden öffentlichen Leseschlüssel mit diesem Präfix (expk_...) widerrufen
--applyschreiben; ohne diese Option wird nichts geändert

Aus den Optionsdefinitionen im Code gelesen (startup(), getOptions(), options() oder ezcConsoleOption). Jedes Skript nimmt außerdem die Standardoptionen des Skript-Frameworks (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).

Siehe auch


Erzeugt von ./console exp:help:examples --language=ger-de aus bin/php/expgraphqlpublickey.php, kernel/private/classes/commands/expgraphqlpublickey.php. Bearbeiten Sie diese Seite nicht: Ändern Sie die Quelle oder die deutsche Übersetzung und erzeugen Sie sie neu (wie). Freie Dokumentation: GFDL 1.3 oder später.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x