{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "name": "Shield offline token verification | Edge Docs",
  "headline": "Shield offline token verification | Edge Docs",
  "description": "Verify Shield tokens locally with zero network calls. Tokens are Ed25519-signed JWTs, and the public key is published at a standard JWKS endpoint.",
  "url": "https://edge.network/docs/shield/offline-verification",
  "image": "https://edge.network/og/docs__shield__offline-verification.png",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Edge Network",
    "url": "https://edge.network",
    "logo": "https://edge.network/favicon.svg"
  },
  "isPartOf": {
    "@type": "WebSite",
    "name": "Edge Network",
    "url": "https://edge.network"
  },
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://edge.network"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Docs",
        "item": "https://edge.network/docs"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Shield",
        "item": "https://edge.network/docs/shield"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "Offline verification",
        "item": "https://edge.network/docs/shield/offline-verification"
      }
    ]
  },
  "section": "documentation/shield",
  "articleBody": "Docs CDN Deployments, domains, caching, purging and on-the-fly image optimisation. Getting started \n Deployments \n Domains & SSL \n Compute Virtual machines in seconds: networking, firewalls, backups and SSH keys. Getting started \n Creating VMs \n Managing VMs \n DNS Zones, records, geo-routing, backups and development domains. Getting started \n Zone management \n DNS records \n Storage S3-compatible buckets, access keys, presigned URLs and multipart uploads. Getting started \n Buckets \n Access keys \n Shield Privacy-first bot protection: widget modes, siteverify and verified agents. Getting started \n Widget modes \n JavaScript API \n Assist AI answers from your own content: widget, ingestion and the API. Getting started \n Widget & embedding \n Content ingestion \n Pulse Uptime monitoring from several locations: checks, incidents, alerts and status pages. Getting started \n Check types \n Locations & intervals \n REST API Manage every Edge resource over HTTPS with API keys. Authentication \n Errors \n Versioning \n Compute \n CDN \n DNS \n CLI One binary for macOS, Linux and Windows to script every product. Installation \n Authentication \n Compute commands \n CDN commands \n DNS commands \n Storage commands \n Dev tooling Command palette and keyboard shortcuts across the console. Command palette \n Agent tooling Let AI agents deploy and manage infrastructure: discovery, MCP and access codes. Start with the overview MCP server \n MCP tool reference \n Connect your tool \n Framework wrappers \n Self-signup \n Access codes \n Discovery endpoint \n Deploy a static site \n Deploy an app \n Projects \n Bot protection \n AI answers \n Uptime monitoring \n Account & support Teams, security, audit logs, alerts, billing tools and support. Start with the overview Teams \n Referral programme \n Cost Advisor \n Security \n Two-factor auth \n Audit log \n Alerts \n Support tickets \n Search the docs ⌘K Console Products\n\n CDN Compute DNS Storage Shield Overview Getting started Widget modes JavaScript API Server-side validation Offline verification Testing & CI Static sites Verified agents Turnstile migration Analytics Examiner Assist Pulse Developer tools\n\n REST API CLI Dev tooling Agents\n\n Agent tooling Account\n\n Account & support The key endpoint Copy Anchor Link \n\n HTTP Copy Text GET https://shield.edge.network/.well-known/jwks.json \n \n { \n \" keys \": [ \n { \n \" kty \": \" OKP \", \n \" crv \": \" Ed25519 \", \n \" x \": \" … \", \n \" kid \": \" a1b2c3d4e5f60718 \", \n \" alg \": \" EdDSA \", \n \" use \": \" sig \" \n } \n ] \n } Cache the key set for up to an hour. If you encounter a token with an unknown kid header, refetch once. That&#x27;s how key rotation propagates. Keys rotate automatically roughly every 60 days, and the retiring public key stays in the key set for 24 hours after rotation, so an hourly cache never verifies against a stale set.\n\n Verifying a token Copy Anchor Link \n\n Any JWT library that supports EdDSA works. With jose in Node:\n\n JavaScript Copy Text import { createRemoteJWKSet , jwtVerify } from &#x27; jose &#x27; \n \n const JWKS = createRemoteJWKSet ( \n new URL (&#x27; https://shield.edge.network/.well-known/jwks.json &#x27;) \n ) \n \n async function verifyOffline ( token , sitekey ) { \n const { payload } = await jwtVerify ( token , JWKS , { \n issuer : &#x27; edge-shield &#x27;, \n subject : sitekey , // REQUIRED: binds the token to YOUR widget \n }) \n return { \n score : payload . score , // 1–100 humanity score \n hostname : payload . hn , // hostname the widget ran on \n agent : payload . agt || null // verified agent domain, if declared \n } \n } Your verification must check, in order:\n\n The signature, against a JWKS key matching the token&#x27;s kid .\n iss equals edge-shield .\n sub equals your sitekey . Without this check, a token minted for any Shield widget anywhere would pass.\n exp : tokens live 5 minutes.\n Optionally, that hn is one of your hostnames.\n The claims you get back:\n\n JSON Copy Text { \n \" iss \": \" edge-shield \", \n \" sub \": \" es_... \", // the widget&#x27;s sitekey \n \" jti \": \" b3f9… \", // unique token id (replay ledger key) \n \" iat \": 1785459151 , \n \" exp \": 1785459451 , // 5-minute lifetime \n \" score \": 92 , // 1–100 humanity score \n \" hn \": \" example.com \", // hostname the widget ran on \n \" agt \": \" crawler.example \", // optional: verified agent domain \n \" agm \": \" web-bot-auth \" // optional: agent verification method \n } The trade-off: no single-use guarantee Copy Anchor Link \n\n The one thing offline verification cannot give you is replay protection. The ledger of spent tokens lives on Shield&#x27;s servers, so only siteverify guarantees that a token verifies exactly once. Verified offline, the same token is valid for its full 5-minute lifetime, as many times as it&#x27;s presented.\n\n Warning\n\n Use offline verification for high-throughput, lower-stakes endpoints (search, previews, read APIs) where latency matters more than strict single-use. Keep siteverify for signups, logins, payments and anything a farmed token shouldn&#x27;t touch.\n\n You can narrow the replay window further by rejecting tokens whose iat is older than your form could plausibly take to submit. 60 seconds is a common choice.\n\n Next steps\n\n Server-side validation\n\n The strict path, with single-use enforcement\n\n Testing & CI\n\n Fixed test keys that never hit the network&#x27;s real state\n\n Something unclear or out of date? Tell us , or read this page as Markdown .\n\n Server-side validation\n\n Previous\n\n Testing & CI\n\n Next",
  "headings": [
    {
      "level": 1,
      "text": "Offline token verification"
    },
    {
      "level": 2,
      "text": "Next steps"
    },
    {
      "level": 3,
      "text": "Server-side validation"
    },
    {
      "level": 3,
      "text": "Testing &amp; CI"
    }
  ],
  "relatedLinks": [
    {
      "@type": "WebPage",
      "name": "Network",
      "url": "https://edge.network/network"
    },
    {
      "@type": "WebPage",
      "name": "Pricing",
      "url": "https://edge.network/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Docs",
      "url": "https://edge.network/docs"
    },
    {
      "@type": "WebPage",
      "name": "Sign in",
      "url": "https://edge.network/console/access"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/cdn/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Deployments",
      "url": "https://edge.network/docs/cdn/deployments"
    },
    {
      "@type": "WebPage",
      "name": "Domains &amp; SSL",
      "url": "https://edge.network/docs/cdn/domains"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/compute/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Creating VMs",
      "url": "https://edge.network/docs/compute/creating-vms"
    },
    {
      "@type": "WebPage",
      "name": "Managing VMs",
      "url": "https://edge.network/docs/compute/managing-vms"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/dns/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Zone management",
      "url": "https://edge.network/docs/dns/zones"
    },
    {
      "@type": "WebPage",
      "name": "DNS records",
      "url": "https://edge.network/docs/dns/records"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/storage/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Buckets",
      "url": "https://edge.network/docs/storage/buckets"
    },
    {
      "@type": "WebPage",
      "name": "Access keys",
      "url": "https://edge.network/docs/storage/access-keys"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/shield/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget modes",
      "url": "https://edge.network/docs/shield/widget-modes"
    },
    {
      "@type": "WebPage",
      "name": "JavaScript API",
      "url": "https://edge.network/docs/shield/js-api"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/assist/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget &amp; embedding",
      "url": "https://edge.network/docs/assist/widget"
    },
    {
      "@type": "WebPage",
      "name": "Content ingestion",
      "url": "https://edge.network/docs/assist/ingestion"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/pulse/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Check types",
      "url": "https://edge.network/docs/pulse/check-types"
    },
    {
      "@type": "WebPage",
      "name": "Locations &amp; intervals",
      "url": "https://edge.network/docs/pulse/locations"
    },
    {
      "@type": "WebPage",
      "name": "Authentication",
      "url": "https://edge.network/docs/api/authentication"
    },
    {
      "@type": "WebPage",
      "name": "Errors",
      "url": "https://edge.network/docs/api/errors"
    },
    {
      "@type": "WebPage",
      "name": "Versioning",
      "url": "https://edge.network/docs/api/versioning"
    },
    {
      "@type": "WebPage",
      "name": "Compute",
      "url": "https://edge.network/docs/api/compute"
    },
    {
      "@type": "WebPage",
      "name": "CDN",
      "url": "https://edge.network/docs/api/cdn"
    }
  ],
  "alternateFormats": [
    {
      "@type": "MediaObject",
      "contentType": "text/html",
      "url": "https://edge.network/docs/shield/offline-verification",
      "name": "HTML version"
    }
  ],
  "dateModified": "2026-11-26T16:11:23.558Z"
}