web:javascript:jwt
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
web:javascript:jwt [2022/04/10 21:57] – [jsonwebtoken] sgariepy | web:javascript:jwt [2025/03/04 15:00] (Version actuelle) – [Clé privée] sgariepy | ||
---|---|---|---|
Ligne 158: | Ligne 158: | ||
+ | Importer: | ||
+ | < | ||
+ | import jwks from ' | ||
+ | // ou | ||
+ | import * as jwks from ' | ||
+ | < | ||
- | + | < | |
+ | const jwksClient = jwksClient({ | ||
+ | cache: true, | ||
+ | jwksUri: ' | ||
+ | }); | ||
+ | </ | ||
====== JOSE ====== | ====== JOSE ====== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
===== Clé privée ===== | ===== Clé privée ===== | ||
Ligne 185: | Ligne 198: | ||
</ | </ | ||
+ | ==== Simple secret ==== | ||
+ | |||
+ | Si on veut créer un simple secret (qu'on utilise pas JWKS), on peut exécuter: | ||
+ | |||
+ | < | ||
+ | openssl rand -hex 32 | ||
+ | </ | ||
+ | |||
+ | Ajuster la longueur du secret avec le dernier paramètre (ex: 64 versus 32). | ||
web/javascript/jwt.1649620675.txt.gz · Dernière modification : 2022/04/10 21:57 de sgariepy