<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebResourceLoadDelegate/webView(_:resource:didCancel:from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebResourceLoadDelegate(im)webView:resource:didCancelAuthenticationChallenge:fromDataSource:"
  },
  "title" : "webView(_:resource:didCancel:from:)"
}
-->

# webView(_:resource:didCancel:from:)

Invoked when an authentication challenge for a resource was canceled.

```
optional func webView(_ sender: WebView!, resource identifier: Any!, didCancel challenge: URLAuthenticationChallenge!, from dataSource: WebDataSource!)
```

## Parameters

`sender`

The web view that sent this message.

`identifier`

An identifier object used to track the resource being loaded by `dataSource`.

`challenge`

The authentication challenge that was canceled.

`dataSource`

The data source for this web view.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)