New in 2.4: Test runs you can trust See what's new →

JWT 認証

JWT。ログインして署名付き JWT を取得し、[Authorize] とロールチェックで保護されたエンドポイントを呼び出し、refresh token をローテーションし、ネガティブテスト用に期限切れのトークンを取得できます。

リクエストの例

Allow only JWTs with the admin role. 完全なリファレンスと Send ボタン(英語).

cURL
curl -X GET "https://api.testingapis.com/api/auth/jwt/admin" \
  -H "Authorization: Bearer {{adminJwt}}"
Studio で実行
レスポンス · 200 OK
{"message": "Welcome, admin. You passed the role check.", "username": "admin"}