---
title: "shouldProvideIdentity(for:)"
framework: networkextension
role: symbol
role_heading: Instance Method
path: "networkextension/nwtcpconnectionauthenticationdelegate/shouldprovideidentity(for:)"
---

# shouldProvideIdentity(for:)

Indicate that the delegate can provide an identity for the connection authentication.

## Declaration

```swift
optional func shouldProvideIdentity(for connection: NWTCPConnection) -> Bool
```

## Parameters

- `connection`: The connection sending this message.

## Return Value

Return Value Return true to provide the identity for this connection, in which case the delegate method provideIdentity(for:completionHandler:) will be called.

## Discussion

Discussion The caller can implement this optional protocol method to decide whether it wants to provide the identity for this connection for authentication. If this delegate method is not implemented, the return value will default to YES if provideIdentity(for:completionHandler:) is implemented.

## See Also

### Delegate methods

- [shouldEvaluateTrust(for:)](networkextension/nwtcpconnectionauthenticationdelegate/shouldevaluatetrust(for:).md)
- [evaluateTrust(for:peerCertificateChain:completionHandler:)](networkextension/nwtcpconnectionauthenticationdelegate/evaluatetrust(for:peercertificatechain:completionhandler:).md)
- [provideIdentity(for:completionHandler:)](networkextension/nwtcpconnectionauthenticationdelegate/provideidentity(for:completionhandler:).md)
