Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth scheme artifacts are dropped when mode is not 'try' #4000

Closed
nlf opened this issue Nov 14, 2019 · 0 comments
Closed

auth scheme artifacts are dropped when mode is not 'try' #4000

nlf opened this issue Nov 14, 2019 · 0 comments
Assignees
Labels
feature New functionality or improvement
Milestone

Comments

@nlf
Copy link
Member

nlf commented Nov 14, 2019

Support plan

  • which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
  • is this issue currently blocking your project? (yes/no): Yes
  • is this issue affecting a production system? (yes/no): No

Context

  • node version: 12.x
  • module version with issue: 18.x
  • last module version without issue: n/a
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): hapi-rate-limit
  • any other relevant information:

What are you trying to achieve or the steps to reproduce?

We're attempting to use artifacts from a request to pass data to lifecycle hooks in order to facilitate several levels of rate limiting. The issue we're having currently is that the artifacts from an auth scheme are only attached to the request object after an authentication failure when the mode is set to try, while we need the artifacts regardless of the mode.

Relevant code segment appears to be this: https://github.com/hapijs/hapi/blob/master/lib/auth.js#L464-L472

What was the result you got?

Artifacts do not get attached to the request

What result did you expect?

Artifacts to be attached to the request

@nlf nlf added the support Questions, discussions, and general support label Nov 14, 2019
@hueniverse hueniverse self-assigned this Dec 26, 2019
@hueniverse hueniverse added this to the 19.0.0 milestone Dec 26, 2019
@hueniverse hueniverse added feature New functionality or improvement and removed support Questions, discussions, and general support labels Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

2 participants