Our Postman collection provides a basic set of API requests and automated tests for JWT Authentication Pro, designed for the developer to extend the collection to their needs.

Collection Contents

Token Generation
required
Route
POST /wp-json/jwt-auth/v1/token
  • Generate JWT tokens with credentials
  • Pre-request scripts for auth
  • Response validation tests
Token Validation
required
Route
POST /wp-json/jwt-auth/v1/validate
  • Validate JWT tokens
  • Automatic header injection
  • Token status verification
Token Refresh
required
Route
POST /wp-json/jwt-auth/v1/refresh
  • Refresh expired tokens
  • Auto token management
  • Token rotation tests
User Information
required
Route
GET /wp-json/jwt-auth/v1/me
  • Get user profile data
  • Auth header handling
  • Response validation

Installation

1

Install Postman

First, install Postman by downloading it from the official website

3

Import Collection

Import the downloaded collection file into Postman

Environment Setup

1

Open Environment Settings

  1. Open Postman and select the imported collection
  2. Click on “Environments” in the left sidebar
  3. Create a new environment named “JWT Auth Pro”
2

Configure Variables

Add the following variables in the environment editor:

baseURL
string
required

Your WordPress site URL (e.g., https://your-site.com)

username
string
required

Your WordPress username

password
string
required

Your WordPress password

3

Save Changes

Click the “Save” button to apply your changes

Both methods achieve the same result. Choose the one that best fits your workflow.

Running Tests

newman run jwt-auth-pro-postman.json -e jwt-auth-pro.postman_environment.json

You can use Newman, Postman’s command-line collection runner, to automate your API tests in CI/CD pipelines

Additional Resources