Skip to content

Support customization of the authentication failed status code #168

@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

I suggest to introduce the ability to customise the status code for failed authentication requests

Motivation

A follow-up issue to #164. To support using Proxy-Authenticate in a manner that is compliant to the http standard it is necessary to use the 407 status code in the error response. See

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Proxy-Authenticate

Example

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

Originally posted by @pqnet in #164

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