---
title: "peerAuthentication(_:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/tls/peerauthentication(_:)"
---

# peerAuthentication(_:)

Specify a preference for how to authenticate the peer.

## Declaration

```swift
func peerAuthentication(_ preference: TLS.PeerAuthentication) -> TLS
```

## Parameters

- `preference`: The peer authentication preference.
