Skip to content

JWT credentials#

คุณสามารถใช้ credentials เหล่านี้เพื่อยืนยันตัวตนกับ node ต่อไปนี้ได้:

Supported authentication methods#

  • Passphrase: ลงนามด้วย secret โดยใช้อัลกอริทึม HMAC
  • Private key (PEM key): สำหรับใช้กับ Private Key JWT ด้วยอัลกอริทึม RSA หรือ ECDSA

ดูรายละเอียดเพิ่มเติมได้ที่ JSON Web Token spec

สำหรับข้อมูลเบื้องต้นที่ละเอียดมากขึ้น โปรดดู JWT website Introduction to JSON Web Tokens โปรดดู JSON Web Token (JWT) Signing Algorithms Overview สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการเลือกระหว่างสองประเภทและอัลกอริทึมที่เกี่ยวข้อง

Using Passphrase#

ในการตั้งค่า credential นี้:

  1. เลือก Key Type เป็น Passphrase
  2. ป้อน Passphrase Secret
  3. เลือก Algorithm ที่ใช้ในการลงนาม assertion ดูรายการอัลกอริทึมที่รองรับได้ที่ Available algorithms ด้านล่าง

Using private key (PEM key)#

ในการตั้งค่า credential นี้: 1. เลือก Key Type เป็น PEM Key 2. Private Key: ได้มาจากการสร้าง Key Pair ดูตัวอย่างได้ที่ Generate RSA Key Pair 3. Public Key: ได้มาจากการสร้าง Key Pair ดูตัวอย่างได้ที่ Generate RSA Key Pair 4. เลือก Algorithm ที่ใช้ในการลงนาม assertion ดูรายการอัลกอริทึมที่รองรับได้ที่ Available algorithms ด้านล่าง

Available algorithms#

n8n credential นี้รองรับอัลกอริทึมต่อไปนี้:

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