<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.0.0 - 10.13.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSConnectionDelegate/authenticateComponents:withData:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSConnectionDelegate(im)authenticateComponents:withData:"
  },
  "title" : "authenticateComponents:withData:"
}
-->

# authenticateComponents:withData:

Returns a Boolean value that indicates whether given authentication data is valid for a given set of components.

```
- (BOOL) authenticateComponents:(NSArray *) components withData:(NSData *) signature;
```

## Parameters

`components`

An array that contains `NSData` and `NSPort` objects belonging to an `NSPortMessage` object. See the [`PortMessage`](/documentation/Foundation/PortMessage) class specification for more information.

`signature`

Authentication data created by the delegate of the peer `NSConnection` object with [`authenticationDataForComponents:`](/documentation/Foundation/NSConnectionDelegate/authenticationDataForComponents:).

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the `signature` provided is valid for `components`, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Use this message for validation of incoming messages. An `NSConnection` object raises an `NSFailedAuthenticationException` on receipt of a remote message the delegate doesn’t authenticate.

## See Also

  [Distributed Objects Programming Topics](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/DistrObjects/DistrObjects.html#//apple_ref/doc/uid/10000102i)



---

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)