[WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuth...
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 20:43:00 +0000 (20:43 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 20:43:00 +0000 (20:43 +0000)
commit2e8ef082d9d8f1afef3a5e1249e1745383eabf19
tree72a4e19f7906f7071d19d0d122049b390af2e444
parentd09ee26cbfe7d64d8d9a80fcfad0b92538cba286
[WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator
https://bugs.webkit.org/show_bug.cgi?id=191527
<rdar://problem/54237146>

Reviewed by Chris Dumez.

This patch makes an ABC CtapDriver, which services as an abstract interface for CtapAuthenticator/U2fAuthenticator to talk to
the actual object that implement the specific CTAP protocol that mananges communications over different transports, for example,
CtapHidDriver, such that CtapAuthenticator/U2fAuthenticator can be shared across different transports.

This patch also renames CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator correspondingly.

* Sources.txt:
* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::continueAddDeviceAfterGetInfo):
* UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp.
(WebKit::CtapAuthenticator::CtapAuthenticator):
(WebKit::CtapAuthenticator::makeCredential):
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapAuthenticator::getAssertion):
(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
(WebKit::CtapAuthenticator::tryDowngrade):
* UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
* UIProcess/WebAuthentication/fido/CtapDriver.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h.
* UIProcess/WebAuthentication/fido/CtapHidDriver.h:
(WebKit::CtapHidDriver::setProtocol):
* UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp.
(WebKit::U2fAuthenticator::U2fAuthenticator):
(WebKit::U2fAuthenticator::makeCredential):
(WebKit::U2fAuthenticator::checkExcludeList):
(WebKit::U2fAuthenticator::issueRegisterCommand):
(WebKit::U2fAuthenticator::getAssertion):
(WebKit::U2fAuthenticator::issueSignCommand):
(WebKit::U2fAuthenticator::issueNewCommand):
(WebKit::U2fAuthenticator::issueCommand):
(WebKit::U2fAuthenticator::responseReceived):
(WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueBogusCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived):
* UIProcess/WebAuthentication/fido/U2fAuthenticator.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h.
* WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Sources.txt
Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.mm
Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp [moved from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp with 87% similarity]
Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.h [moved from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h with 81% similarity]
Source/WebKit/UIProcess/WebAuthentication/fido/CtapDriver.h [new file with mode: 0644]
Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp
Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.h
Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp [moved from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp with 88% similarity]
Source/WebKit/UIProcess/WebAuthentication/fido/U2fAuthenticator.h [moved from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h with 87% similarity]
Source/WebKit/WebKit.xcodeproj/project.pbxproj