---
title: "decideAuthenticationChallengeDisposition(for:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webpage/navigationdeciding/decideauthenticationchallengedisposition(for:)"
---

# decideAuthenticationChallengeDisposition(for:)

Determines the response to an authentication challenge.

## Declaration

```swift
@MainActor mutating func decideAuthenticationChallengeDisposition(for challenge: URLAuthenticationChallenge) async -> (URLSession.AuthChallengeDisposition, URLCredential?)
```

## Parameters

- `challenge`: The authentication challenge.

## Return Value

Return Value The option to use to handle the challenge, and the credential to use for authentication when the disposition is URLSession/AuthChallengeDisposition/useCredential.
