Function

ODNodeSetCredentials(_:_:_:_:_:)

Sets credentials for interacting with a node.

Declaration

func ODNodeSetCredentials(_ node: ODNodeRef!, _ recordType: String!, _ recordName: CFString!, _ password: CFString!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Parameters

inNode

The node.

inRecordType

The record type that uses the credentials. Can be NULL. The default value is kODRecordTypeUsers.

inRecordName

The username to use to authenticate with the node.

inPassword

The password to use to authenticate with the node.

outError

An error reference for error details. Can be NULL.

Return Value

true if the credentials are successfully set; otherwise, false.

Discussion

If this function fails, the previous credentials for the node are used.

This function sets credentials for all references to the node. If you only want to set credentials for a single record referencing the node, use ODRecordSetNodeCredentials(_:_:_:_:) instead.

See Also

Working with Nodes

func ODNodeCopyUnreachableSubnodeNames(ODNodeRef!, UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFArray>!

Returns an array of the subnodes of a given node that are currently unreachable.

func ODNodeGetTypeID() -> CFTypeID

Returns the type ID for an Open Directory node.