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

[RFC] support authentication challenge callback via plugin #1212

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brodybits
Copy link
Contributor

@brodybits brodybits commented Dec 21, 2021

Platforms affected

iOS

Motivation and Context

I think it would be nice if we could support plugins that can handle an authentication challenge coming from the server, namely this callback on WKWebView:

It would help support this functionality in a plugin that I maintain:

Description

This proposal adds a handler for a "didReceiveAuthenticationChallenge" callback from the WKWebView, and hands it off to a plugin if possible.

I am raising this proposal now to see whether or not there is sufficient interest to justify any further work. A couple major TODO items:

  • cleanup logging
  • cleanup some comments
  • find a better completion strategy than "first plugin wins"

Alternative solution: leave this functionality up to a native XHR plugin to support, which is good enough for my customer need right now

Testing

Tested with this proposal on my plugin:

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2021

Codecov Report

Merging #1212 (c194fc0) into master (67b0bb2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1212   +/-   ##
=======================================
  Coverage   78.53%   78.53%           
=======================================
  Files          15       15           
  Lines        1761     1761           
=======================================
  Hits         1383     1383           
  Misses        378      378           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67b0bb2...c194fc0. Read the comment docs.

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.

None yet

2 participants