...
Deutsch | |||||
---|---|---|---|---|---|
JWT wird auf https://en.wikipedia.org/wiki/JSON_Web_Token wie folgt beschrieben: JSON Web Token (JWT, manchmal ausgesprochen /dʒɒt/, wie das englische Wort "jot"[1]) ist ein Internet-Standard für die Erstellung von Daten mit optionaler Signatur und/oder optionaler Verschlüsselung, deren Nutzdaten JSON enthalten, das eine Reihe von Behauptungen aufstellt. Die Token werden entweder mit einem privaten Geheimnis oder einem öffentlichen/privaten Schlüssel signiert. Das JWT wird im HTTP-Header Authorization gesendet. Ein Beispiel sieht wie folgt aus:
Das Token kann mit dem JWT-Debugger unter https://jwt.io entschlüsselt werden:
Das bedeutet, dass das angegebene JWT für den Benutzer admin gilt, der im Konto mit der UUID 9769a8e7-c3c6-4efb-bb37-d13b72f34953 mit der Rolle admin eingeloggt ist. Dieses Token wird mit jeder API-Anfrage gesendet, damit der jeweilige Mikrodienst die Anfrage autorisieren kann. Das Token erhält man durch Authentifizierung und anschließende Autorisierung gegenüber dem Authentifizierungsmikrodienst. Abrufen eines temporären JWTWählen Sie im Debugger Ihres Browsers eine beliebige Anfrage aus, nachdem Sie sich angemeldet haben. Öffnen Sie die Registerkarte Header und scrollen Sie ganz nach unten zum Abschnitt Request Headers. Das Attribut Authorization enthält das JWT: |
Englisch | |||||
---|---|---|---|---|---|
JWT is introduced on https://en.wikipedia.org/wiki/JSON_Web_Token as follows: JSON Web Token (JWT, sometimes pronounced /dʒɒt/, the same as the English word "jot”[1]) is an Internet standard for creating data with optional signature and/or optional encryption whose payload holds JSON that asserts some number of claims. The tokens are signed either using a private secret or a public/private key. The JWT is sent in the HTTP Header
The token can be decoded with the JWT debugger at https://jwt.io:
This, means the given JWT is for the user This token is sent with each API request, s.th. the respective micro service can authorize the request. The token is obtained by authenticating and then authorizing against the authentication microservice. Obtaining a temporary JWTWithin your browser's debugger, select any request after logging in. Open the The attribute |
...