Skip to content

JWT 凭证(JWT credentials)#

你可以使用以下凭据验证以下节点:

🌐 You can use these credentials to authenticate the following nodes:

支持的身份验证方法(Supported authentication methods)#

  • 密码短语:使用 HMAC 算法和密钥签名
  • 私钥(PEM 密钥):用于带有 RSA 或 ECDSA 算法的 Private Key JWT

有关更多详情,请参阅 JSON Web Token 规范

🌐 Refer to the JSON Web Token spec for more details.

如需更详细的介绍,请参阅 JWT 网站的 JSON Web 令牌简介。有关在两种类型之间进行选择及相关算法的更多信息,请参阅 JSON Web 令牌 (JWT) 签名算法概述

🌐 For a more verbose introduction, refer to the JWT website Introduction to JSON Web Tokens. Refer to JSON Web Token (JWT) Signing Algorithms Overview for more information on selecting between the two types and the algorithms involved.

使用密码短语(Using Passphrase)#

配置此凭据:

🌐 To configure this credential:

  1. 选择 密码短语密钥类型
  2. 请输入密码短语 Secret
  3. 选择用于签署声明的算法。有关支持的算法列表,请参阅下面的可用算法

使用私钥(PEM 密钥)(Using private key (PEM key))#

配置此凭据:

🌐 To configure this credential:

  1. 选择PEM密钥密钥类型
  2. 一个 私钥:通过生成密钥对获得。请参阅 生成 RSA 密钥对 获取示例。
  3. 一个 公钥:通过生成密钥对获得。请参阅 生成 RSA 密钥对 获取示例。
  4. 选择用于签署声明的算法。有关支持的算法列表,请参阅下面的可用算法

可用算法(Available algorithms)#

此 n8n 凭据支持以下算法:

🌐 This n8n credential supports the following algorithms:

  • HS256
  • HS384
  • HS512
  • RS256
  • RS384
  • RS512
  • ES256
  • ES384
  • ES512
  • PS256
  • PS384
  • PS512
  • none