Skip to content

Support using Proxy-Authenticate and Proxy-Authorization rather than WWW-Authenticate and Authorization #164

@pqnet

Description

@pqnet

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

While the header option allow setting Proxy-Authorization as source for auth data, we are missing the ability to customize the response header sent to the browser to trigger authentication to Proxy-Authenticate.

I suggest adding an optional header parameter in the authenticate option.

Motivation

When running fastify-basic-auth plugin in a proxy to perform authentication, it should rely on the standard headers Proxy-Authenticate and Proxy-Authorization, leaving WWW-Authenticate and Authorization free for the proxied webapp to use.

Example

options = {
    authenticate: { realm: "My Realm", header: "Proxy-Authorization" }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions