Bug 50191 - WebKit2 authentication support
Summary: WebKit2 authentication support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-11-29 16:53 PST by Brady Eidson
Modified: 2010-12-09 08:55 PST (History)
4 users (show)

See Also:


Attachments
Skeleton files v1 (50.92 KB, patch)
2010-11-29 17:09 PST, Brady Eidson
beidson: commit-queue-
Details | Formatted Diff | Diff
Skeleton files v2 (build works now) (50.93 KB, patch)
2010-11-29 17:13 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
First stage v1 (99.75 KB, patch)
2010-12-02 18:21 PST, Brady Eidson
beidson: commit-queue-
Details | Formatted Diff | Diff
First stage v2 (105.07 KB, patch)
2010-12-03 08:56 PST, Brady Eidson
beidson: commit-queue-
Details | Formatted Diff | Diff
First stage v3 - More build fixes all around (105.75 KB, patch)
2010-12-03 09:15 PST, Brady Eidson
andersca: review+
beidson: commit-queue-
Details | Formatted Diff | Diff
Stage 2 - Fill out necessary API and cross-process encoding (43.68 KB, patch)
2010-12-08 14:24 PST, Brady Eidson
beidson: commit-queue-
Details | Formatted Diff | Diff
Stage 2 v2 - Now with more Windows building! (41.20 KB, patch)
2010-12-08 17:41 PST, Brady Eidson
beidson: commit-queue-
Details | Formatted Diff | Diff
Stage 2 v3 - Now with more building all around (45.26 KB, patch)
2010-12-08 17:48 PST, Brady Eidson
mjs: review+
beidson: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2010-11-29 16:53:18 PST
The WebKit2 API needs to handle authentication challenges.

In radar as <rdar://problem/7660733>
Comment 1 Brady Eidson 2010-11-29 17:09:52 PST
Created attachment 75085 [details]
Skeleton files v1
Comment 2 Brady Eidson 2010-11-29 17:13:54 PST
Created attachment 75087 [details]
Skeleton files v2 (build works now)
Comment 3 Early Warning System Bot 2010-11-29 17:21:54 PST
Attachment 75085 [details] did not build on qt:
Build output: http://queues.webkit.org/results/6343099
Comment 4 Eric Seidel (no email) 2010-11-29 17:42:27 PST
Attachment 75085 [details] did not build on mac:
Build output: http://queues.webkit.org/results/6332089
Comment 5 Sam Weinig 2010-11-29 18:38:15 PST
Comment on attachment 75087 [details]
Skeleton files v2 (build works now)

View in context: https://bugs.webkit.org/attachment.cgi?id=75087&action=review

Why is AuthenticationChallenge in the UIProcess and the others are in Shared. Can you explain how they will be used?

> WebKit2/ChangeLog:7
> +	Add new-file-skeletons to the projects as a first step before filling in the code.

Weird spacing.

> WebKit2/ChangeLog:49
> +        * Shared/API/c/WKBase.h:
> +
> +        * Shared/API/c/WKCredential.cpp: Added.
> +        (WKCredentialGetTypeID):
> +        * Shared/API/c/WKCredential.h: Added.
> +        * Shared/API/c/WKCredentialTypes.h: Added.
> +
> +        * Shared/API/c/WKProtectionSpace.cpp: Added.
> +        (WKProtectionSpaceGetTypeID):
> +        * Shared/API/c/WKProtectionSpace.h: Added.
> +        * Shared/API/c/WKProtectionSpaceTypes.h: Added.
> +
> +        * Shared/API/c/WKSharedAPICast.h:
> +
> +        * Shared/APIObject.h:
> +
> +        * Shared/WebCredential.cpp: Added.
> +        * Shared/WebCredential.h: Added.
> +        (WebKit::WebCredential::create):
> +        (WebKit::WebCredential::type):
> +
> +        * Shared/WebProtectionSpace.cpp: Added.
> +        * Shared/WebProtectionSpace.h: Added.
> +        (WebKit::WebProtectionSpace::create):
> +        (WebKit::WebProtectionSpace::type):
> +
> +        * UIProcess/API/C/WKAPICast.h:
> +
> +        * UIProcess/API/C/WKAuthenticationChallenge.cpp: Added.
> +        (WKAuthenticationChallengeGetTypeID):
> +        * UIProcess/API/C/WKAuthenticationChallenge.h: Added.
> +
> +        * UIProcess/WebAuthenticationChallenge.cpp: Added.
> +        * UIProcess/WebAuthenticationChallenge.h: Added.
> +        (WebKit::WebAuthenticationChallenge::create):
> +        (WebKit::WebAuthenticationChallenge::type):
> +
> +        * WebKit2.pro:
> +        * WebKit2.xcodeproj/project.pbxproj:
> +        * win/WebKit2.vcproj:
> +

The paragraphing is weird here. How about some comments.

> WebKit2/Shared/API/c/WKProtectionSpaceTypes.h:27
> +#ifndef WKCredentialTypes_h
> +#define WKCredentialTypes_h

This should be WKProtectionSpaceTypes_h

> WebKit2/Shared/API/c/WKProtectionSpaceTypes.h:62
> +#endif /* WKCredentialTypes_h */

This one should also be WKProtectionSpaceTypes_h

> WebKit2/UIProcess/WebAuthenticationChallenge.h:36
> +class WebAuthenticationChallenge : public APIObject
> +{
> +public:

The { is in the wrong place.
Comment 6 Brady Eidson 2010-11-29 18:58:27 PST
Discussed this with Sam in person.  Taking a different approach.
Comment 7 Brady Eidson 2010-12-02 18:21:09 PST
Created attachment 75448 [details]
First stage v1

This patch gets all the API objects and clients in place, and does IPC to tell the UIProcess a challenge has occurred, and allows the UIProcess to respond.

After this infrastructure is in place, filling in the following holes will commence:
1 - Actually shipping Challenge, ProtectionSpace, and Credential data across the IPC boundary instead of empty representations of them.
2 - Provide the proper WK2 API for apps to actually be able to work with those 3 objects
Comment 8 Early Warning System Bot 2010-12-02 18:39:20 PST
Attachment 75448 [details] did not build on qt:
Build output: http://queues.webkit.org/results/6746022
Comment 9 Build Bot 2010-12-02 19:26:52 PST
Attachment 75448 [details] did not build on win:
Build output: http://queues.webkit.org/results/6825019
Comment 10 Brady Eidson 2010-12-03 08:56:47 PST
Created attachment 75500 [details]
First stage v2

Attempt at Windows and Qt build fixes
Comment 11 Early Warning System Bot 2010-12-03 09:08:36 PST
Attachment 75500 [details] did not build on qt:
Build output: http://queues.webkit.org/results/6728028
Comment 12 Brady Eidson 2010-12-03 09:15:01 PST
Created attachment 75501 [details]
First stage v3 - More build fixes all around
Comment 13 Brady Eidson 2010-12-03 11:43:33 PST
Landed in r73281.

More coming.
Comment 14 Brady Eidson 2010-12-08 14:24:50 PST
Created attachment 75962 [details]
Stage 2 - Fill out necessary API and cross-process encoding
Comment 15 Build Bot 2010-12-08 17:33:17 PST
Attachment 75962 [details] did not build on win:
Build output: http://queues.webkit.org/results/6789125
Comment 16 Brady Eidson 2010-12-08 17:41:48 PST
Created attachment 75993 [details]
Stage 2 v2 - Now with more Windows building!
Comment 17 Brady Eidson 2010-12-08 17:48:14 PST
Created attachment 75995 [details]
Stage 2 v3 - Now with more building all around

Forgot WebCore changes in the v2 patch
Comment 18 Maciej Stachowiak 2010-12-09 00:26:16 PST
Comment on attachment 75995 [details]
Stage 2 v3 - Now with more building all around

r=me
Comment 19 Brady Eidson 2010-12-09 08:55:59 PST
Landed in r73614