Skip to content

Conversation

@aslushnikov
Copy link
Contributor

@aslushnikov aslushnikov commented Sep 9, 2017

This patch implements page.authenticate which should cover all
cases of HTTP authentication.

Implementation notes:

  1. Since HTTP authentication is based on request interception internally, the implementation
    of NetworkManager splits the "requestInterceptionEnabled" flag into two:
    • userRequestInterceptionEnabled - true if the user has enabled request interception
    • protocolRequestInterceptionEnabled - true if we've enabled request interception in protocol
  2. In case of invalid credentials, in order to escape infinite authentication loop we maintain the attemptedAuthentications set that stores all the interception ids we've tried to authenticate.

Fixes #426.

@robert-shade
Copy link

This works great - even worked for NTLM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to _onRequestIntercepted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This patch implements `page.authenticate` which should cover all
cases of HTTP authentication.

Fixes puppeteer#426.
@Androbin
Copy link
Contributor

Androbin commented Mar 3, 2021

@aslushnikov Proxy authentication -> Request interception -> Cache disabled
Is there a way to use an authenticated proxy with an enabled cache?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants