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

feat(plugins): Better define plugin behaviour protocols #1514

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Dec 14, 2024

Platforms affected

iOS

Motivation and Context

Closes GH-1212.
Closes GH-1272.
Closes GH-1333.

Description

Adds protocols to formalize the methods that plugins should implement to interact with behaviour around authentication challenges and navigation decisions.

For navigation decisions, we now pass along the full navigation action details as a dictionary.

This also adds the ability for plugins to intercept and respond to server authentication challenges.

Testing

All existing tests pass.

Checklist

  • I've run the tests to see all new and existing tests pass
  • 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

@dpogue dpogue added this to the 8.0.0 milestone Dec 14, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.34%. Comparing base (d2db6e6) to head (2da37a6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1514   +/-   ##
=======================================
  Coverage   81.34%   81.34%           
=======================================
  Files          16       16           
  Lines        1855     1855           
=======================================
  Hits         1509     1509           
  Misses        346      346           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dpogue dpogue force-pushed the plugin-protocols branch 2 times, most recently from 81ea6a4 to 778b874 Compare December 17, 2024 22:10
dpogue and others added 3 commits December 26, 2024 23:02
Closes apacheGH-1212.

Co-Authored-By: Christopher J. Brody <chris.brody+brodybits@gmail.com>
This also adds a dictionary parameter containing the other navigation
action details so that plugins can make choices based on frames.

Closes apacheGH-1272.
Closes apacheGH-1333.

Co-Authored-By: Michael Tamburro <61243400+msmtamburro@users.noreply.github.com>
without a credential.
- Returns: A Boolean value indicating if the plugin is handling the request.
*/
- (BOOL)willHandleAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler;
Copy link
Member Author

Choose a reason for hiding this comment

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

@erisu Updated this to be willHandleAuthenticationChallenge and return a BOOL so that multiple plugins can have a chance to respond

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.

2 participants