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

Autenticação JWT

JWT: faça login para receber um JWT assinado, chame endpoints protegidos por [Authorize] e por checagem de papel, rotacione refresh tokens e obtenha um token expirado para testes negativos.

Requisição de exemplo

Allow only JWTs with the admin role. Referência completa e botão Send (em inglês).

cURL
curl -X GET "https://api.testingapis.com/api/auth/jwt/admin" \
  -H "Authorization: Bearer {{adminJwt}}"
Executar no Studio
Resposta · 200 OK
{"message": "Welcome, admin. You passed the role check.", "username": "admin"}