Interface: ProcessingAuthPayload

PSPDFKit.ProcessingAuthPayload

Contains information needed to authenticate processing request with Nutrient backend (Document Engine or DWS API).

DWS API

JSON Web Token (JWT) are used to authorize with the DWS API. See DWS's guides for more details about the JWT authorization.

Auth token can be generated via DWS API. For example, you can generate a token that can only access the document_Editor_api operation from the example.com origin and expires in 1 hour, without having access to other operations or origins:

curl -X POST https://api.nutrient.io/tokens \
 -H 'Authorization: Bearer pdf_live_<rest_of_your_api_key>' \
 -H "Content-Type: application/json" \
 -d '{
   "allowedOperations": [
     "document_editor_api",
   ],
   "allowedOrigins": [
     "example.com"
   ],
   "expirationTime": 3600
 }'

Document Engine

JSON Web Token (JWT) are used to authorize with the Document Engine. See Document Engine's API Reference for more details about the JWT authorization.

Properties:
Name Type Description
jwt string

Authorization token needed to authorize the processing request with the backend.

serverUrl string

Base server URL to use as the Build API endpoint (<server_url>/api/build). Optional, since it's possible to encode it in the auth token, DWS API does that by default.