-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Authenticate private resource requests #21331
base: trunk
Are you sure you want to change the base?
Conversation
Unauthenticated requests failed when attempting to load resources from a private site, e.g., an image.
Generated by 🚫 Danger |
Project dependencies changesThe following changes in project dependencies were detected (configuration list
tree +--- project :libs:editor
-| \--- org.wordpress.gutenbergkit:android:trunk-a58a46f3fbb892f311b562e3c122d7ef4ebbfe33
+| \--- org.wordpress.gutenbergkit:android:trunk-d6fbfc7bc28ae6db2cce09950f24bc3080374596
-\--- org.wordpress.gutenbergkit:android:trunk-a58a46f3fbb892f311b562e3c122d7ef4ebbfe33 (*)
+\--- org.wordpress.gutenbergkit:android:trunk-d6fbfc7bc28ae6db2cce09950f24bc3080374596 (*) |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergEditorFragment.java
Fixed
Show fixed
Hide fixed
The proxy is required to authenticate the request with a bearer token.
This was added to mirror the `shouldInterceptRequest` method signature, but is unnecessary complexity.
Mirror the iOS method structure.
|
||
String proxyUrl = url.toString(); | ||
if (mIsPrivateAtomic) { | ||
proxyUrl = getPrivateResourceProxyUrl(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Private Atomic sites require a proxy for request authentication (D38925-code).
libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergEditorFragment.java
Outdated
Show resolved
Hide resolved
Likely better performance and accuracy.
libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergEditorFragment.java
Fixed
Show fixed
Hide fixed
Address lint error regarding a common source of bugs. #21331 (review)
… into feat/authenticate-private-resource-requests
Quality Gate passedIssues Measures |
👋🏻 @jkmassel. I updated this with the merged wordpress-mobile/GutenbergKit#30 and the latest from |
Related
Description
Authenticate resource requests originating from within the WebView so that
requests to private sites succeed.
To Test:
See wordpress-mobile/GutenbergKit#34.
Regression Notes
Gutenberg Mobile or Aztec editors fail.
Manually tested both editors.
None, feels unnecessary for this currently experimental editor feature.
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):