---
title: "verifyPassword(_:)"
framework: opendirectory
role: symbol
role_heading: Instance Method
path: "opendirectory/odrecord/verifypassword(_:)"
---

# verifyPassword(_:)

Verifies the password for interaction with the record.

## Declaration

```swift
func verifyPassword(_ inPassword: String!) throws
```

## Parameters

- `inPassword`: The password for authenticating with the record.

## Discussion

Discussion note: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Managing Authentication

- [changePassword(_:toPassword:)](opendirectory/odrecord/changepassword(_:topassword:).md)
- [setNodeCredentials(_:password:)](opendirectory/odrecord/setnodecredentials(_:password:).md)
- [setNodeCredentialsWithRecordType(_:authenticationType:authenticationItems:continueItems:context:)](opendirectory/odrecord/setnodecredentialswithrecordtype(_:authenticationtype:authenticationitems:continueitems:context:).md)
- [verifyExtended(withAuthenticationType:authenticationItems:continueItems:context:)](opendirectory/odrecord/verifyextended(withauthenticationtype:authenticationitems:continueitems:context:).md)
