{
    "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate",
    "locale": "en",
    "title": "WWW-Authenticate: Knowledge hub | DeLaParra Services",
    "description": "Sent with 401 Unauthorized — tells the client what auth scheme is required.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/www-authenticate",
        "nl": "https://delaparra-services.nl/nl/kennisbank/www-authenticate"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/www-authenticate.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/www-authenticate.md",
        "json": "https://delaparra-services.nl/knowledge-hub/www-authenticate.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/www-authenticate.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/www-authenticate.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate.csv",
            "encodingFormat": "text/csv",
            "name": "www-authenticate.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate.json",
            "encodingFormat": "application/json",
            "name": "www-authenticate.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate.md",
            "encodingFormat": "text/markdown",
            "name": "www-authenticate.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate.pdf",
            "encodingFormat": "application/pdf",
            "name": "www-authenticate.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate.zip",
            "encodingFormat": "application/zip",
            "name": "www-authenticate.zip"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate/skills.zip",
            "encodingFormat": "application/zip",
            "name": "www-authenticate-skills.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [WWW-Authenticate](<https://delaparra-services.nl/knowledge-hub/www-authenticate>)\n\n  \n\nCategory: HTTP headers \n\n# WWW-Authenticate\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is WWW-Authenticate?\n\n \n\nWWW-Authenticate: Sent with 401 Unauthorized — tells the client what auth scheme is required. ` WWW-Authenticate ` is sent with a ` 401 Unauthorized ` response to tell the client how to authenticate. ` WWW-Authenticate: Bearer realm=\"api\", error=\"invalid_token\" ` says a bearer token is required and the one sent was invalid. Browsers react to ` Basic ` in this header by showing a login dialog, which is how simple password protection on staging sites works.\n\n \n\nDefinition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)\n\n \n\n## Frequently asked questions about WWW-Authenticate\n\n  \n\n### What should you keep in mind with WWW-Authenticate?\n\n \n\nFor APIs, including this header with a clear error code helps clients understand what went wrong: missing token, expired token or insufficient scope. That lets an app refresh its token automatically instead of logging the user out. Note that Basic authentication sends credentials in an easily decoded form, so only use it over HTTPS, and prefer proper login or token-based authentication for anything beyond a temporary barrier.\n\n    \n\n### What does an example of WWW-Authenticate look like?\n\n \n\n```\nWWW-Authenticate: Bearer realm=\"api\", error=\"invalid_token\"\n```\n\n \n\n## At a glance\n\n   CategoryHTTP headers Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026\n\n \n\n## More HTTP headers terms\n\n \n\n- [Strict-Transport-Security](<https://delaparra-services.nl/knowledge-hub/strict-transport-security>) \n- [User-Agent](<https://delaparra-services.nl/knowledge-hub/user-agent>) \n- [Vary](<https://delaparra-services.nl/knowledge-hub/vary>) \n- [X-Content-Type-Options](<https://delaparra-services.nl/knowledge-hub/x-content-type-options>) \n- [X-Frame-Options](<https://delaparra-services.nl/knowledge-hub/x-frame-options>) \n- [X-Rate-Limit-\\*](<https://delaparra-services.nl/knowledge-hub/x-rate-limit>)\n\n \n\n[All terms starting with W](<https://delaparra-services.nl/knowledge-hub#letter-w>)\n\n \n\n## Skills\n\n \n\n- ### Authentication & Authorization Implementation Patterns\n\n \n\nMaster authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.\n\n [View skill](<https://delaparra-services.nl/skills/auth-implementation-patterns>) [Download zip](<https://delaparra-services.nl/skills/auth-implementation-patterns/download>) \n- ### HTTP headers review\n\n \n\nUse when reviewing or setting HTTP response headers for a web app or API - security headers (Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy), CORS headers, caching headers (Cache-Control, ETag, Last-Modified, Vary) and cookies (Set-Cookie flags). Also use when a security scan reports missing headers.\n\n [View skill](<https://delaparra-services.nl/skills/http-headers-review>) [Download zip](<https://delaparra-services.nl/skills/http-headers-review/download>) \n- ### Laravel OWASP Security\n\n \n\nOWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities (\"run OWASP audit\", \"security review\", \"check my app security\") or writing secure Laravel code involving auth, payments, file uploads, or API design. Triggers on security-related tasks, payment handling, authentication, or any request to audit a Laravel codeba\n\n [View skill](<https://delaparra-services.nl/skills/laravel-owasp-security>) [Download zip](<https://delaparra-services.nl/skills/laravel-owasp-security/download>)\n\n [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/www-authenticate/skills.zip>)\n\n \n\n## Manuals\n\n \n\n- [HTTP headers: security, caching and CORS](<https://delaparra-services.nl/manuals/http-headers-beveiliging-caching-en-cors>) \n- [Reading HTTP status codes and debugging API errors](<https://delaparra-services.nl/manuals/http-statuscodes-en-api-fouten>)\n\n \n\n## Related services\n\n \n\n- [AI code review](<https://delaparra-services.nl/services#service-05>)\n\nWhen you push your new change, I will review your code, help your agent avoid the same mistake again, and get your app ready for deployment. \n- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)\n\nPerhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.\n\n \n\n## Need any help?\n\n \n\nStuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.\n\n  [Get in touch](<https://delaparra-services.nl/availability>)\n\n[HTML version](https://delaparra-services.nl/knowledge-hub/www-authenticate)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "FAQPage",
                "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate",
                "name": "WWW-Authenticate: Knowledge hub | DeLaParra Services",
                "description": "Sent with 401 Unauthorized — tells the client what auth scheme is required.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#term",
                    "name": "WWW-Authenticate",
                    "description": "Sent with 401 Unauthorized — tells the client what auth scheme is required.",
                    "termCode": "www-authenticate",
                    "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate",
                    "inLanguage": "en",
                    "keywords": "HTTP headers",
                    "dateModified": "2026-11-25T17:46:31+00:00",
                    "inDefinedTermSet": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#terms"
                    },
                    "isPartOf": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#dataset"
                    },
                    "subjectOf": [
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is WWW-Authenticate?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Sent with 401 Unauthorized — tells the client what auth scheme is required. WWW-Authenticate is sent with a 401 Unauthorized response to tell the client how to authenticate. WWW-Authenticate: Bearer realm=\"api\", error=\"invalid_token\" says a bearer token is required and the one sent was invalid. Browsers react to Basic in this header by showing a login dialog, which is how simple password protection on staging sites works."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with WWW-Authenticate?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "For APIs, including this header with a clear error code helps clients understand what went wrong: missing token, expired token or insufficient scope. That lets an app refresh its token automatically instead of logging the user out. Note that Basic authentication sends credentials in an easily decoded form, so only use it over HTTPS, and prefer proper login or token-based authentication for anything beyond a temporary barrier."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What does an example of WWW-Authenticate look like?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "WWW-Authenticate: Bearer realm=\"api\", error=\"invalid_token\""
                        }
                    }
                ],
                "author": {
                    "@id": "https://delaparra-services.nl/#person"
                },
                "mentions": [
                    {
                        "@id": "https://delaparra-services.nl/skills/auth-implementation-patterns#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/http-headers-review#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/laravel-owasp-security#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/http-headers-beveiliging-caching-en-cors#article"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/http-statuscodes-en-api-fouten#article"
                    }
                ]
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Knowledge hub",
                        "item": "https://delaparra-services.nl/knowledge-hub"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "WWW-Authenticate"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#dataset",
                "name": "WWW-Authenticate",
                "description": "Sent with 401 Unauthorized — tells the client what auth scheme is required.",
                "url": "https://delaparra-services.nl/knowledge-hub/www-authenticate",
                "identifier": "https://delaparra-services.nl/knowledge-hub/www-authenticate#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/www-authenticate#term"
                },
                "creator": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://creativecommons.org/licenses/by/4.0/",
                "creditText": "Coders Lingo (https://coderslingo.com/resources/open-dataset/), CC BY 4.0",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "keywords": "HTTP headers",
                "version": "2026-11-25",
                "dateModified": "2026-11-25T17:46:31+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#dataset",
                    "name": "IT terms from A to Z",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "www-authenticate.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/www-authenticate.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "www-authenticate.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/www-authenticate.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "www-authenticate.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/www-authenticate.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "www-authenticate.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/www-authenticate.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "www-authenticate.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/www-authenticate.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "www-authenticate-skills.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/www-authenticate/skills.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:31+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}