<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebDownloadDelegate/downloadWindow(forAuthenticationSheet:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebDownloadDelegate(im)downloadWindowForAuthenticationSheet:"
  },
  "title" : "downloadWindow(forAuthenticationSheet:)"
}
-->

# downloadWindow(forAuthenticationSheet:)

Returns the window to be used by the authentication sheet.

```
optional func downloadWindow(forAuthenticationSheet download: WebDownload!) -> NSWindow!
```

## Parameters

`download`

The download object that is requesting the window.

## Return Value

An <doc://com.apple.documentation/documentation/AppKit/NSWindow> object into which the `WebDownload` object should draw its authentication sheet.

## Discussion

The default implementation prompts the user for authentication using the standard WebKit authentication panel, as either a sheet or window.

---

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)