Bug 406605 - [Browser] WebKitGTK 2.0 authentication prompter not vetoed by AuthenticationListener
Summary: [Browser] WebKitGTK 2.0 authentication prompter not vetoed by AuthenticationL...
Status: CLOSED DUPLICATE of bug 516838
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.3   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2013-04-25 14:51 EDT by Grant Gayed CLA
Modified: 2018-05-11 14:23 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2013-04-25 14:51:24 EDT
The WebKitGTK authentication mechanism changed as of their 2.0 release, their default authentication prompter can no longer be vetoed by cancelling the "authenticate" signal.
Comment 1 Dilton McGowan II CLA 2015-01-15 11:30:39 EST
(In reply to Grant Gayed from comment #0)
> The WebKitGTK authentication mechanism changed as of their 2.0 release,
> their default authentication prompter can no longer be vetoed by cancelling
> the "authenticate" signal.

Is there a workaround?

As an aside, I'd think it would be better if the browser widget had the ability to pass credentials when it's created instead of waiting for a 401 to be returned then invoking the listener.
Comment 2 Grant Gayed CLA 2015-01-15 12:59:01 EST
There was not a workaround at the time, and I don't think the behaviour in that native WebKitGTK stream would have changed in the meantime (for that matter it looks like that stream is now officially gone).

I don't work on this anymore, but off the top of my head the only workaround that may work today could be to make the Browser use the WebKitGTK 2.x API instead (it currently uses the 1.x API by default; the API version name does not necessarily correlate with the WebKitGTK+ version name).  This newer API may have different behaviour from the 1.x API.  To try this I think you need to:

1. Use the GTK+ 3 API (this is the default behaviour as of the Luna release, assuming GTK+ 3 is found on your machine)
2. Use the WebKitGTK 2.x API (set Java property SWT_WEBKIT2 to 1 with something like command-line arg -DSWT_WEBKIT2=1)
Comment 3 Dilton McGowan II CLA 2015-01-19 10:56:54 EST
Thanks for the feedback Grant. I found that one of the SWT Snippets actually demonstrates the bug:

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet317.java

It also happens on my Ubuntu 14.04 machine with GTK 3 and WEBKIT2 (libwebkit2gtk-3.0-25) specifying -DSWT_WEBKIT2=1 or not, either.

Using an external browser is an option, will continue to investigate options to make the internal browser work.
Comment 4 Eric Williams CLA 2018-05-11 14:23:33 EDT
We use Webkit2 now.

*** This bug has been marked as a duplicate of bug 516838 ***