Changeset 256062 in webkit


Ignore:
Timestamp:
Feb 7, 2020 2:16:54 PM (4 years ago)
Author:
jiewen_tan@apple.com
Message:

[WebAuthn] Report CTAP Client Pin Error to clients
https://bugs.webkit.org/show_bug.cgi?id=205837
<rdar://problem/58356872>

Reviewed by Brent Fulgham.

Source/WebKit:

Authenticators could return four different errors { kCtap2ErrPinInvalid, kCtap2ErrPinBlocked, kCtap2ErrPinAuthInvalid, kCtap2ErrPinAuthBlocked }
during 1) GetPinToken or 2) MakeCredential/GetAssertion with PinAuth.

All errors should be reported to the client so that appropriate UI can be displayed to users.
For kCtap2ErrPinAuthInvalid and kCtap2ErrPinInvalid, we will restart the whole Pin process to get
another Pin from the user.

Covered by API tests.

  • UIProcess/API/APIWebAuthenticationPanelClient.h:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:

(WebKit::wkWebAuthenticationPanelUpdate):

  • UIProcess/WebAuthentication/WebAuthenticationFlags.h:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:

(WebKit::fido::toStatus):
(WebKit::fido::isPinError):
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived):
(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
(WebKit::CtapAuthenticator::continueRequestAfterGetPinToken):
(WebKit::CtapAuthenticator::tryRestartPin):

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-pin-auth-blocked-error.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-pin-invalid-error-retry.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-auth-blocked-error.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-invalid-error-retry.html: Added.
Location:
trunk
Files:
4 added
9 edited
3 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r256057 r256062  
     12020-02-07  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        [WebAuthn] Report CTAP Client Pin Error to clients
     4        https://bugs.webkit.org/show_bug.cgi?id=205837
     5        <rdar://problem/58356872>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Authenticators could return four different errors { kCtap2ErrPinInvalid, kCtap2ErrPinBlocked, kCtap2ErrPinAuthInvalid, kCtap2ErrPinAuthBlocked }
     10        during 1) GetPinToken or 2) MakeCredential/GetAssertion with PinAuth.
     11
     12        All errors should be reported to the client so that appropriate UI can be displayed to users.
     13        For kCtap2ErrPinAuthInvalid and kCtap2ErrPinInvalid, we will restart the whole Pin process to get
     14        another Pin from the user.
     15
     16        Covered by API tests.
     17
     18        * UIProcess/API/APIWebAuthenticationPanelClient.h:
     19        * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:
     20        (WebKit::wkWebAuthenticationPanelUpdate):
     21        * UIProcess/WebAuthentication/WebAuthenticationFlags.h:
     22        * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
     23        (WebKit::fido::toStatus):
     24        (WebKit::fido::isPinError):
     25        (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived):
     26        (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
     27        (WebKit::CtapAuthenticator::continueRequestAfterGetPinToken):
     28        (WebKit::CtapAuthenticator::tryRestartPin):
     29        * UIProcess/WebAuthentication/fido/CtapAuthenticator.h:
     30
    1312020-02-07  Jonathan Bedard  <jbedard@apple.com>
    232
  • trunk/Source/WebKit/UIProcess/API/APIWebAuthenticationPanelClient.h

    r254554 r256062  
    3838
    3939namespace WebKit {
    40 enum class WebAuthenticationStatus : bool;
     40enum class WebAuthenticationStatus : uint8_t;
    4141enum class WebAuthenticationResult : bool;
    4242}
  • trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm

    r254554 r256062  
    6060    if (status == WebAuthenticationStatus::NoCredentialsFound)
    6161        return _WKWebAuthenticationPanelUpdateNoCredentialsFound;
     62    if (status == WebAuthenticationStatus::PinBlocked)
     63        return _WKWebAuthenticationPanelUpdatePINBlocked;
     64    if (status == WebAuthenticationStatus::PinAuthBlocked)
     65        return _WKWebAuthenticationPanelUpdatePINAuthBlocked;
     66    if (status == WebAuthenticationStatus::PinInvalid)
     67        return _WKWebAuthenticationPanelUpdatePINInvalid;
    6268    ASSERT_NOT_REACHED();
    6369    return _WKWebAuthenticationPanelUpdateMultipleNFCTagsPresent;
  • trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticationFlags.h

    r251317 r256062  
    4141};
    4242
    43 enum class WebAuthenticationStatus : bool {
     43enum class WebAuthenticationStatus : uint8_t {
    4444    MultipleNFCTagsPresent,
    45     NoCredentialsFound
     45    NoCredentialsFound,
     46    PinBlocked,
     47    PinAuthBlocked,
     48    PinInvalid
    4649};
    4750
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp

    r256001 r256062  
    4747using namespace fido;
    4848
     49namespace {
     50WebAuthenticationStatus toStatus(const CtapDeviceResponseCode& error)
     51{
     52    switch (error) {
     53    case CtapDeviceResponseCode::kCtap2ErrPinAuthInvalid:
     54    case CtapDeviceResponseCode::kCtap2ErrPinInvalid:
     55        return WebAuthenticationStatus::PinInvalid;
     56    case CtapDeviceResponseCode::kCtap2ErrPinAuthBlocked:
     57        return WebAuthenticationStatus::PinAuthBlocked;
     58    case CtapDeviceResponseCode::kCtap2ErrPinBlocked:
     59        return WebAuthenticationStatus::PinBlocked;
     60    default:
     61        ASSERT_NOT_REACHED();
     62        return WebAuthenticationStatus::PinInvalid;
     63    }
     64}
     65
     66bool isPinError(const CtapDeviceResponseCode& error)
     67{
     68    switch (error) {
     69    case CtapDeviceResponseCode::kCtap2ErrPinAuthInvalid:
     70    case CtapDeviceResponseCode::kCtap2ErrPinAuthBlocked:
     71    case CtapDeviceResponseCode::kCtap2ErrPinInvalid:
     72    case CtapDeviceResponseCode::kCtap2ErrPinBlocked:
     73        return true;
     74    default:
     75        return false;
     76    }
     77}
     78
     79} // namespace
     80
    4981CtapAuthenticator::CtapAuthenticator(std::unique_ptr<CtapDriver>&& driver, AuthenticatorGetInfoResponse&& info)
    5082    : FidoAuthenticator(WTFMove(driver))
     
    77109    if (!response) {
    78110        auto error = getResponseCode(data);
    79         if (error == CtapDeviceResponseCode::kCtap2ErrCredentialExcluded)
     111
     112        if (error == CtapDeviceResponseCode::kCtap2ErrCredentialExcluded) {
    80113            receiveRespond(ExceptionData { InvalidStateError, "At least one credential matches an entry of the excludeCredentials list in the authenticator."_s });
    81         // FIXME(205837)
    82         else if (error == CtapDeviceResponseCode::kCtap2ErrPinInvalid || error == CtapDeviceResponseCode::kCtap2ErrPinAuthInvalid)
    83             getRetries();
    84         else
    85             receiveRespond(ExceptionData { UnknownError, makeString("Unknown internal error. Error code: ", static_cast<uint8_t>(error)) });
     114            return;
     115        }
     116
     117        if (isPinError(error)) {
     118            if (!m_pinAuth.isEmpty()) // Skip the very first command that acts like wink.
     119                observer()->authenticatorStatusUpdated(toStatus(error));
     120            if (tryRestartPin(error))
     121                return;
     122        }
     123
     124        receiveRespond(ExceptionData { UnknownError, makeString("Unknown internal error. Error code: ", static_cast<uint8_t>(error)) });
    86125        return;
    87126    }
     
    111150    if (!response) {
    112151        auto error = getResponseCode(data);
    113         // FIXME(205837)
    114         if (error == CtapDeviceResponseCode::kCtap2ErrPinInvalid || error == CtapDeviceResponseCode::kCtap2ErrPinAuthInvalid) {
    115             getRetries();
    116             return;
    117         }
    118         if (error != CtapDeviceResponseCode::kCtap2ErrInvalidCBOR && tryDowngrade())
    119             return;
     152
     153        if (!isPinError(error) && tryDowngrade())
     154            return;
     155
     156        if (isPinError(error)) {
     157            if (!m_pinAuth.isEmpty()) // Skip the very first command that acts like wink.
     158                observer()->authenticatorStatusUpdated(toStatus(error));
     159            if (tryRestartPin(error))
     160                return;
     161        }
     162
    120163        if (error == CtapDeviceResponseCode::kCtap2ErrNoCredentials && observer())
    121164            observer()->authenticatorStatusUpdated(WebAuthenticationStatus::NoCredentialsFound);
     165
    122166        receiveRespond(ExceptionData { UnknownError, makeString("Unknown internal error. Error code: ", static_cast<uint8_t>(error)) });
    123167        return;
     
    250294    if (!token) {
    251295        auto error = getResponseCode(data);
     296
     297        if (isPinError(error)) {
     298            observer()->authenticatorStatusUpdated(toStatus(error));
     299            if (tryRestartPin(error))
     300                return;
     301        }
     302
    252303        receiveRespond(ExceptionData { UnknownError, makeString("Unknown internal error. Error code: ", static_cast<uint8_t>(error)) });
    253304        return;
     
    260311        getAssertion();
    261312    });
     313}
     314
     315bool CtapAuthenticator::tryRestartPin(const CtapDeviceResponseCode& error)
     316{
     317    switch (error) {
     318    case CtapDeviceResponseCode::kCtap2ErrPinAuthInvalid:
     319    case CtapDeviceResponseCode::kCtap2ErrPinInvalid:
     320        getRetries();
     321        return true;
     322    default:
     323        return false;
     324    }
    262325}
    263326
  • trunk/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.h

    r254495 r256062  
    6666    void continueGetPinTokenAfterRequestPin(const String& pin, const WebCore::CryptoKeyEC&);
    6767    void continueRequestAfterGetPinToken(Vector<uint8_t>&&, const fido::pin::TokenRequest&);
     68    bool tryRestartPin(const fido::CtapDeviceResponseCode&);
    6869
    6970    bool tryDowngrade();
  • trunk/Tools/ChangeLog

    r256059 r256062  
     12020-02-07  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        [WebAuthn] Report CTAP Client Pin Error to clients
     4        https://bugs.webkit.org/show_bug.cgi?id=205837
     5        <rdar://problem/58356872>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     10        * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
     11        (-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]):
     12        (TestWebKitAPI::TEST):
     13        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-pin-auth-blocked-error.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
     14        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-pin-invalid-error-retry.html: Added.
     15        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-auth-blocked-error.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
     16        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
     17        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html: Added.
     18        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html.
     19        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html: Added.
     20        * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-invalid-error-retry.html: Added.
     21
    1222020-02-07  Jonathan Bedard  <jbedard@apple.com>
    223
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r256000 r256062  
    334334                570D26F423C3CA6A00D5CF67 /* web-authentication-make-credential-hid-pin-get-key-agreement-error.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 570D26F323C3CA5500D5CF67 /* web-authentication-make-credential-hid-pin-get-key-agreement-error.html */; };
    335335                570D26F623C3D33000D5CF67 /* web-authentication-make-credential-hid-pin.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 570D26F523C3D32700D5CF67 /* web-authentication-make-credential-hid-pin.html */; };
    336                 570D26FA23C3F25100D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-error.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 570D26F923C3F24500D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-error.html */; };
     336                570D26FA23C3F25100D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 570D26F923C3F24500D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html */; };
    337337                570D26FC23C3F87000D5CF67 /* web-authentication-get-assertion-hid-pin.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 570D26FB23C3F86500D5CF67 /* web-authentication-get-assertion-hid-pin.html */; };
    338338                5714ECB91CA8B5B000051AC8 /* DownloadRequestOriginalURL.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5714ECB81CA8B58800051AC8 /* DownloadRequestOriginalURL.html */; };
     
    367367                5778D05622110A2600899E3B /* LoadWebArchive.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5778D05522110A2600899E3B /* LoadWebArchive.mm */; };
    368368                578CBD67204FB2C80083B9F2 /* LocalAuthentication.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 578CBD66204FB2C70083B9F2 /* LocalAuthentication.framework */; };
     369                578DA44223ECC7A000246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 578DA44123ECC76B00246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html */; };
     370                578DA44423ECCAE900246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 578DA44323ECC8A800246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html */; };
     371                578DA44623ECCC0A00246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 578DA44523ECCBD000246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html */; };
     372                578DA44823ECD09B00246010 /* web-authentication-make-credential-hid-pin-auth-blocked-error.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 578DA44723ECD01300246010 /* web-authentication-make-credential-hid-pin-auth-blocked-error.html */; };
     373                578DA44A23ECD18600246010 /* web-authentication-make-credential-hid-pin-invalid-error-retry.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 578DA44923ECD15500246010 /* web-authentication-make-credential-hid-pin-invalid-error-retry.html */; };
     374                578DA44C23ECD23000246010 /* web-authentication-get-assertion-hid-pin-auth-blocked-error.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 578DA44B23ECD20300246010 /* web-authentication-get-assertion-hid-pin-auth-blocked-error.html */; };
     375                578DA44E23ECD28B00246010 /* web-authentication-get-assertion-hid-pin-invalid-error-retry.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 578DA44D23ECD26100246010 /* web-authentication-get-assertion-hid-pin-invalid-error-retry.html */; };
    369376                57901FB11CAF142D00ED64F9 /* LoadInvalidURLRequest.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 57901FB01CAF141C00ED64F9 /* LoadInvalidURLRequest.html */; };
    370377                579651E7216BFDED006EBFE5 /* FidoHidMessageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 579651E6216BFD53006EBFE5 /* FidoHidMessageTest.cpp */; };
     
    15021509                                579F1C0123C93AF500C7D4B4 /* web-authentication-get-assertion-hid-multiple-accounts.html in Copy Resources */,
    15031510                                577454D02359B378008E1ED7 /* web-authentication-get-assertion-hid-no-credentials.html in Copy Resources */,
     1511                                578DA44C23ECD23000246010 /* web-authentication-get-assertion-hid-pin-auth-blocked-error.html in Copy Resources */,
     1512                                578DA44E23ECD28B00246010 /* web-authentication-get-assertion-hid-pin-invalid-error-retry.html in Copy Resources */,
    15041513                                570D26FC23C3F87000D5CF67 /* web-authentication-get-assertion-hid-pin.html in Copy Resources */,
    15051514                                57663DEC234F1F9300E85E09 /* web-authentication-get-assertion-hid.html in Copy Resources */,
     
    15081517                                577454D22359BB01008E1ED7 /* web-authentication-get-assertion-u2f-no-credentials.html in Copy Resources */,
    15091518                                57C624502346C21E00383FE7 /* web-authentication-get-assertion.html in Copy Resources */,
     1519                                578DA44823ECD09B00246010 /* web-authentication-make-credential-hid-pin-auth-blocked-error.html in Copy Resources */,
    15101520                                570D26F423C3CA6A00D5CF67 /* web-authentication-make-credential-hid-pin-get-key-agreement-error.html in Copy Resources */,
    1511                                 570D26FA23C3F25100D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-error.html in Copy Resources */,
     1521                                578DA44223ECC7A000246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html in Copy Resources */,
     1522                                578DA44623ECCC0A00246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html in Copy Resources */,
     1523                                570D26FA23C3F25100D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html in Copy Resources */,
     1524                                578DA44423ECCAE900246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html in Copy Resources */,
    15121525                                5758598423C3C3A400C74572 /* web-authentication-make-credential-hid-pin-get-retries-error.html in Copy Resources */,
     1526                                578DA44A23ECD18600246010 /* web-authentication-make-credential-hid-pin-invalid-error-retry.html in Copy Resources */,
    15131527                                570D26F623C3D33000D5CF67 /* web-authentication-make-credential-hid-pin.html in Copy Resources */,
    15141528                                5798337E236019A4008E5547 /* web-authentication-make-credential-hid.html in Copy Resources */,
     
    19261940                570D26F323C3CA5500D5CF67 /* web-authentication-make-credential-hid-pin-get-key-agreement-error.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-get-key-agreement-error.html"; sourceTree = "<group>"; };
    19271941                570D26F523C3D32700D5CF67 /* web-authentication-make-credential-hid-pin.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin.html"; sourceTree = "<group>"; };
    1928                 570D26F923C3F24500D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-error.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-get-pin-token-error.html"; sourceTree = "<group>"; };
     1942                570D26F923C3F24500D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html"; sourceTree = "<group>"; };
    19291943                570D26FB23C3F86500D5CF67 /* web-authentication-get-assertion-hid-pin.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-get-assertion-hid-pin.html"; sourceTree = "<group>"; };
    19301944                5714ECB81CA8B58800051AC8 /* DownloadRequestOriginalURL.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DownloadRequestOriginalURL.html; sourceTree = "<group>"; };
     
    19611975                5778D05522110A2600899E3B /* LoadWebArchive.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadWebArchive.mm; sourceTree = "<group>"; };
    19621976                578CBD66204FB2C70083B9F2 /* LocalAuthentication.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LocalAuthentication.framework; path = System/Library/Frameworks/LocalAuthentication.framework; sourceTree = SDKROOT; };
     1977                578DA44123ECC76B00246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html"; sourceTree = "<group>"; };
     1978                578DA44323ECC8A800246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html"; sourceTree = "<group>"; };
     1979                578DA44523ECCBD000246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html"; sourceTree = "<group>"; };
     1980                578DA44723ECD01300246010 /* web-authentication-make-credential-hid-pin-auth-blocked-error.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-auth-blocked-error.html"; sourceTree = "<group>"; };
     1981                578DA44923ECD15500246010 /* web-authentication-make-credential-hid-pin-invalid-error-retry.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-make-credential-hid-pin-invalid-error-retry.html"; sourceTree = "<group>"; };
     1982                578DA44B23ECD20300246010 /* web-authentication-get-assertion-hid-pin-auth-blocked-error.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-get-assertion-hid-pin-auth-blocked-error.html"; sourceTree = "<group>"; };
     1983                578DA44D23ECD26100246010 /* web-authentication-get-assertion-hid-pin-invalid-error-retry.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "web-authentication-get-assertion-hid-pin-invalid-error-retry.html"; sourceTree = "<group>"; };
    19631984                57901FAC1CAF12C200ED64F9 /* LoadInvalidURLRequest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadInvalidURLRequest.mm; sourceTree = "<group>"; };
    19641985                57901FAE1CAF137100ED64F9 /* LoadInvalidURLRequest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoadInvalidURLRequest.mm; sourceTree = "<group>"; };
     
    35393560                                579F1BFF23C92FD300C7D4B4 /* web-authentication-get-assertion-hid-multiple-accounts.html */,
    35403561                                577454CF2359B338008E1ED7 /* web-authentication-get-assertion-hid-no-credentials.html */,
     3562                                578DA44B23ECD20300246010 /* web-authentication-get-assertion-hid-pin-auth-blocked-error.html */,
     3563                                578DA44D23ECD26100246010 /* web-authentication-get-assertion-hid-pin-invalid-error-retry.html */,
    35413564                                570D26FB23C3F86500D5CF67 /* web-authentication-get-assertion-hid-pin.html */,
    35423565                                57663DEB234F1F8000E85E09 /* web-authentication-get-assertion-hid.html */,
     
    35453568                                577454D12359BAD5008E1ED7 /* web-authentication-get-assertion-u2f-no-credentials.html */,
    35463569                                57C6244F2346C1EC00383FE7 /* web-authentication-get-assertion.html */,
     3570                                578DA44723ECD01300246010 /* web-authentication-make-credential-hid-pin-auth-blocked-error.html */,
    35473571                                570D26F323C3CA5500D5CF67 /* web-authentication-make-credential-hid-pin-get-key-agreement-error.html */,
    3548                                 570D26F923C3F24500D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-error.html */,
     3572                                578DA44123ECC76B00246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html */,
     3573                                578DA44523ECCBD000246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry.html */,
     3574                                570D26F923C3F24500D5CF67 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html */,
     3575                                578DA44323ECC8A800246010 /* web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry.html */,
    35493576                                5758598323C3C36200C74572 /* web-authentication-make-credential-hid-pin-get-retries-error.html */,
     3577                                578DA44923ECD15500246010 /* web-authentication-make-credential-hid-pin-invalid-error-retry.html */,
    35503578                                570D26F523C3D32700D5CF67 /* web-authentication-make-credential-hid-pin.html */,
    35513579                                5798337D2360196D008E5547 /* web-authentication-make-credential-hid.html */,
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm

    r254554 r256062  
    4747static bool webAuthenticationPanelUpdateMultipleNFCTagsPresent = false;
    4848static bool webAuthenticationPanelUpdateNoCredentialsFound = false;
     49static bool webAuthenticationPanelUpdatePINBlocked = false;
     50static bool webAuthenticationPanelUpdatePINAuthBlocked = false;
     51static bool webAuthenticationPanelUpdatePINInvalid = false;
    4952static bool webAuthenticationPanelCancelImmediately = false;
    5053static String webAuthenticationPanelPin;
     
    6871    if (update == _WKWebAuthenticationPanelUpdateNoCredentialsFound) {
    6972        webAuthenticationPanelUpdateNoCredentialsFound = true;
     73        return;
     74    }
     75    if (update == _WKWebAuthenticationPanelUpdatePINBlocked) {
     76        webAuthenticationPanelUpdatePINBlocked = true;
     77        return;
     78    }
     79    if (update == _WKWebAuthenticationPanelUpdatePINAuthBlocked) {
     80        webAuthenticationPanelUpdatePINAuthBlocked = true;
     81        return;
     82    }
     83    if (update == _WKWebAuthenticationPanelUpdatePINInvalid) {
     84        webAuthenticationPanelUpdatePINInvalid = true;
    7085        return;
    7186    }
     
    222237    webAuthenticationPanelFailed = false;
    223238    webAuthenticationPanelSucceded = false;
     239    webAuthenticationPanelUpdateMultipleNFCTagsPresent = false;
     240    webAuthenticationPanelUpdateNoCredentialsFound = false;
     241    webAuthenticationPanelUpdatePINBlocked = false;
     242    webAuthenticationPanelUpdatePINAuthBlocked = false;
     243    webAuthenticationPanelUpdatePINInvalid = false;
    224244    webAuthenticationPanelCancelImmediately = false;
     245    webAuthenticationPanelPin = emptyString();
     246    webAuthenticationPanelNullUserHandle = NO;
    225247}
    226248
     
    839861}
    840862
    841 TEST(WebAuthenticationPanel, PinGetPinTokenError)
    842 {
    843     reset();
    844     RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-pin-get-pin-token-error" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     863TEST(WebAuthenticationPanel, PinGetPinTokenPinBlockedError)
     864{
     865    reset();
     866    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
    845867
    846868    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     
    853875    webAuthenticationPanelPin = "1234";
    854876    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
    855     [webView waitForMessage:@"Unknown internal error. Error code: 2"];
     877    [webView waitForMessage:@"Unknown internal error. Error code: 50"];
     878    EXPECT_FALSE(webAuthenticationPanelUpdatePINInvalid);
     879    EXPECT_TRUE(webAuthenticationPanelUpdatePINBlocked);
     880}
     881
     882TEST(WebAuthenticationPanel, PinGetPinTokenPinAuthBlockedError)
     883{
     884    reset();
     885    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     886
     887    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     888    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     889
     890    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     891    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     892    [webView setUIDelegate:delegate.get()];
     893
     894    webAuthenticationPanelPin = "1234";
     895    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     896    [webView waitForMessage:@"Unknown internal error. Error code: 52"];
     897    EXPECT_FALSE(webAuthenticationPanelUpdatePINInvalid);
     898    EXPECT_TRUE(webAuthenticationPanelUpdatePINAuthBlocked);
     899}
     900
     901TEST(WebAuthenticationPanel, PinGetPinTokenPinInvalidErrorAndRetry)
     902{
     903    reset();
     904    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-pin-get-pin-token-pin-invalid-error-retry" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     905
     906    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     907    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     908
     909    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     910    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     911    [webView setUIDelegate:delegate.get()];
     912
     913    webAuthenticationPanelPin = "1234";
     914    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     915    [webView waitForMessage:@"Succeeded!"];
     916    EXPECT_TRUE(webAuthenticationPanelUpdatePINInvalid);
     917}
     918
     919TEST(WebAuthenticationPanel, PinGetPinTokenPinAuthInvalidErrorAndRetry)
     920{
     921    reset();
     922    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-invalid-error-retry" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     923
     924    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     925    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     926
     927    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     928    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     929    [webView setUIDelegate:delegate.get()];
     930
     931    webAuthenticationPanelPin = "1234";
     932    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     933    [webView waitForMessage:@"Succeeded!"];
     934    EXPECT_TRUE(webAuthenticationPanelUpdatePINInvalid);
    856935}
    857936
     
    873952}
    874953
     954TEST(WebAuthenticationPanel, MakeCredentialPinAuthBlockedError)
     955{
     956    reset();
     957    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-pin-auth-blocked-error" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     958
     959    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     960    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     961
     962    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     963    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     964    [webView setUIDelegate:delegate.get()];
     965
     966    webAuthenticationPanelPin = "1234";
     967    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     968    [webView waitForMessage:@"Unknown internal error. Error code: 52"];
     969    EXPECT_FALSE(webAuthenticationPanelUpdatePINInvalid);
     970    EXPECT_TRUE(webAuthenticationPanelUpdatePINAuthBlocked);
     971}
     972
     973TEST(WebAuthenticationPanel, MakeCredentialPinInvalidErrorAndRetry)
     974{
     975    reset();
     976    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-make-credential-hid-pin-invalid-error-retry" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     977
     978    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     979    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     980
     981    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     982    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     983    [webView setUIDelegate:delegate.get()];
     984
     985    webAuthenticationPanelPin = "1234";
     986    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     987    [webView waitForMessage:@"Succeeded!"];
     988    EXPECT_TRUE(webAuthenticationPanelUpdatePINInvalid);
     989}
     990
    875991TEST(WebAuthenticationPanel, GetAssertionPin)
    876992{
     
    8901006}
    8911007
     1008TEST(WebAuthenticationPanel, GetAssertionPinAuthBlockedError)
     1009{
     1010    reset();
     1011    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-get-assertion-hid-pin-auth-blocked-error" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     1012
     1013    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     1014    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     1015
     1016    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     1017    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     1018    [webView setUIDelegate:delegate.get()];
     1019
     1020    webAuthenticationPanelPin = "1234";
     1021    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     1022    [webView waitForMessage:@"Unknown internal error. Error code: 52"];
     1023    EXPECT_FALSE(webAuthenticationPanelUpdatePINInvalid);
     1024    EXPECT_TRUE(webAuthenticationPanelUpdatePINAuthBlocked);
     1025}
     1026
     1027TEST(WebAuthenticationPanel, GetAssertionPinInvalidErrorAndRetry)
     1028{
     1029    reset();
     1030    RetainPtr<NSURL> testURL = [[NSBundle mainBundle] URLForResource:@"web-authentication-get-assertion-hid-pin-invalid-error-retry" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"];
     1031
     1032    auto *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     1033    [[configuration preferences] _setEnabled:YES forExperimentalFeature:webAuthenticationExperimentalFeature()];
     1034
     1035    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSZeroRect configuration:configuration]);
     1036    auto delegate = adoptNS([[TestWebAuthenticationPanelUIDelegate alloc] init]);
     1037    [webView setUIDelegate:delegate.get()];
     1038
     1039    webAuthenticationPanelPin = "1234";
     1040    [webView loadRequest:[NSURLRequest requestWithURL:testURL.get()]];
     1041    [webView waitForMessage:@"Succeeded!"];
     1042    EXPECT_TRUE(webAuthenticationPanelUpdatePINInvalid);
     1043}
     1044
    8921045TEST(WebAuthenticationPanel, MultipleAccountsNullDelegate)
    8931046{
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-pin-auth-blocked-error.html

    r256060 r256062  
    11<input type="text" id="input">
    22<script>
    3     const testCtapPinInvalidErrorBase64 = "MQ==";
     3    const testCtapPinAuthInvalidErrorBase64 = "Mw==";
    44    const testPinGetRetriesResponseBase64 = "AKEDCA==";
    55    const testPinGetKeyAgreementResponseBase64 = "AKEBpQECAzgYIAEhWCDodiWJbuTkbcAydm6Ah5YvNt+d/otWfzdjAVsZkKYOFCJYICfeYS1mQYvaGVBYHrxcjB2tcQyxTCL4yXBF9GEvsgyR";
    6     const testCtapInvalidParameterErrorBase64 = "Ag==";
     6    const testPinGetPinTokenResponseBase64 = "AKECUBOk7rcOyRrqAB6TFvYeQfc=";
     7    const testCtapPinAuthBlockedErrorBase64 = "NA==";
    78    if (window.internals) {
    8         internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testCtapInvalidParameterErrorBase64] } });
     9        internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinAuthInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testPinGetPinTokenResponseBase64, testCtapPinAuthBlockedErrorBase64] } });
    910        internals.withUserGesture(() => { input.focus(); });
    1011    }
     
    1213    const options = {
    1314        publicKey: {
    14             rp: {
    15                 name: "localhost",
    16             },
    17             user: {
    18                 name: "John Appleseed",
    19                 id: new Uint8Array(16),
    20                 displayName: "Appleseed",
    21             },
    2215            challenge: new Uint8Array(16),
    23             pubKeyCredParams: [{ type: "public-key", alg: -7 }]
     16            timeout: 100
    2417        }
    2518    };
    2619
    27     navigator.credentials.create(options).then(credential => {
     20    navigator.credentials.get(options).then(credential => {
    2821        // console.log("Succeeded!");
    2922        window.webkit.messageHandlers.testHandler.postMessage("Succeeded!");
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-auth-blocked-error.html

    r256060 r256062  
    11<input type="text" id="input">
    22<script>
    3     const testCtapPinInvalidErrorBase64 = "MQ==";
     3    const testCtapPinAuthInvalidErrorBase64 = "Mw==";
    44    const testPinGetRetriesResponseBase64 = "AKEDCA==";
    55    const testPinGetKeyAgreementResponseBase64 = "AKEBpQECAzgYIAEhWCDodiWJbuTkbcAydm6Ah5YvNt+d/otWfzdjAVsZkKYOFCJYICfeYS1mQYvaGVBYHrxcjB2tcQyxTCL4yXBF9GEvsgyR";
    6     const testCtapInvalidParameterErrorBase64 = "Ag==";
     6    const testPinGetPinTokenResponseBase64 = "AKECUBOk7rcOyRrqAB6TFvYeQfc=";
     7    const testCtapPinAuthBlockedErrorBase64 = "NA==";
    78    if (window.internals) {
    8         internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testCtapInvalidParameterErrorBase64] } });
     9        internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinAuthInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testPinGetPinTokenResponseBase64, testCtapPinAuthBlockedErrorBase64, ] } });
    910        internals.withUserGesture(() => { input.focus(); });
    1011    }
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-auth-blocked-error.html

    r256060 r256062  
    44    const testPinGetRetriesResponseBase64 = "AKEDCA==";
    55    const testPinGetKeyAgreementResponseBase64 = "AKEBpQECAzgYIAEhWCDodiWJbuTkbcAydm6Ah5YvNt+d/otWfzdjAVsZkKYOFCJYICfeYS1mQYvaGVBYHrxcjB2tcQyxTCL4yXBF9GEvsgyR";
    6     const testCtapInvalidParameterErrorBase64 = "Ag==";
     6    const testCtapPinAuthBlockedErrorBase64 = "NA==";
    77    if (window.internals) {
    8         internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testCtapInvalidParameterErrorBase64] } });
     8        internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testCtapPinAuthBlockedErrorBase64] } });
    99        internals.withUserGesture(() => { input.focus(); });
    1010    }
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-pin-blocked-error.html

    r256060 r256062  
    44    const testPinGetRetriesResponseBase64 = "AKEDCA==";
    55    const testPinGetKeyAgreementResponseBase64 = "AKEBpQECAzgYIAEhWCDodiWJbuTkbcAydm6Ah5YvNt+d/otWfzdjAVsZkKYOFCJYICfeYS1mQYvaGVBYHrxcjB2tcQyxTCL4yXBF9GEvsgyR";
    6     const testCtapInvalidParameterErrorBase64 = "Ag==";
     6    const testCtapPinBlockedErrorBase64 = "Mg==";
    77    if (window.internals) {
    8         internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testCtapInvalidParameterErrorBase64] } });
     8        internals.setMockWebAuthenticationConfiguration({ hid: { supportClientPin: true, payloadBase64: [testCtapPinInvalidErrorBase64, testPinGetRetriesResponseBase64, testPinGetKeyAgreementResponseBase64, testCtapPinBlockedErrorBase64] } });
    99        internals.withUserGesture(() => { input.focus(); });
    1010    }
Note: See TracChangeset for help on using the changeset viewer.