ODRecord Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/OpenDirectory.framework |
| Availability | Available in OS X v10.6 and later. |
| Declared in | ODRecord.h |
Tasks
Managing Authentication
-
– changePassword:toPassword:error: -
– passwordPolicyAndReturnError: -
– setNodeCredentials:password:error: -
– setNodeCredentialsWithRecordType:authenticationType:authenticationItems:continueItems:context:error: -
– verifyExtendedWithAuthenticationType:authenticationItems:continueItems:context:error: -
– verifyPassword:error: -
– setNodeCredentialsUsingKerberosCache:error:Deprecated in OS X v10.7
Managing Group Records
Managing Record Attributes
-
– addValue:toAttribute:error: -
– recordDetailsForAttributes:error: -
recordNameproperty -
recordTypeproperty -
– removeValuesForAttribute:error: -
– removeValue:fromAttribute:error: -
– setValue:forAttribute:error: -
– synchronizeAndReturnError: -
– valuesForAttribute:error:
Deleting a Record
Properties
recordName
The official name of the record. (read-only)
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hrecordType
The record’s type. (read-only)
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
ODRecord.hInstance Methods
addMemberRecord:error:
Adds a member record to this group record.
Parameters
- inRecord
The member record to add.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the member record is successfully added; otherwise, NO.
Discussion
This method produces an error if this record is not a group record, or if inRecord is not an appropriate type.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.haddValue:toAttribute:error:
Adds a value to an attribute of the record.
Parameters
- inValue
The value. Should be of type
NSStringorNSData.- inAttribute
The attribute.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the value is successfully added; otherwise, NO.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hchangePassword:toPassword:error:
Changes the record’s password.
Parameters
- oldPassword
The record’s old password. Can be
nilif the user has the proper permissions.- newPassword
The new password.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the password is successfully changed; otherwise, NO.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hdeleteRecordAndReturnError:
Deletes the record from its node and invalidates it.
Parameters
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the record is successfully deleted; otherwise, NO.
Discussion
The record should be released after this method is called.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hisMemberRecord:error:
Determines whether a given record is a member of this group record.
Parameters
- inRecord
The record to test for membership.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if inRecord is a member of this group record; otherwise, NO.
Discussion
If this record is not a group record, this method returns NO.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hpasswordPolicyAndReturnError:
Returns a dictionary containing the password policy for the record.
Parameters
- outError
An error reference for error details. Can be
nil.
Return Value
The password policy for the record.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hrecordDetailsForAttributes:error:
Returns a dictionary of attributes with their respective values.
Parameters
- inAttributes
An array of attributes. Can be
nil.- outError
An error reference for error details. Can be
nil.
Return Value
A dictionary of the attributes in inAttributes with their respective values.
Discussion
If inAttributes is nil, all currently retrieved attributes are returned.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
ODRecord.hremoveMemberRecord:error:
Removes a record as a member of this group record.
Parameters
- inRecord
The member record.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if inRecord is successfully removed from this group record; otherwise, NO.
Discussion
This method produces an error if this record is not a group record, or if inRecord is not an appropriate type.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hremoveValue:fromAttribute:error:
Removes a value from an attribute of the record.
Parameters
- inValue
The value. Should be of type
NSStringorNSData.- inAttribute
The attribute.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the value is successfully removed; otherwise, NO.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
ODRecord.hremoveValuesForAttribute:error:
Removes all values from an attribute of the record.
Parameters
- inAttribute
The attribute.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the values are successfully removed; otherwise, NO.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
ODRecord.hsetNodeCredentials:password:error:
Sets credentials for the record’s node.
Parameters
- inUsername
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
nil.
Return Value
YES if the credentials are successfully set; otherwise, NO.
Discussion
If this function fails, the previous credentials for the node are used.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hsetNodeCredentialsWithRecordType:authenticationType:authenticationItems:continueItems:context:error:
Sets the credentials for interaction with the record’s node using other types of authentication available to Open Directory.
Parameters
- inRecordType
The record type that uses the credentials. Can be
nil. The default value iskODRecordTypeUsers.- inType
The authentication type.
- inItems
An array of
NSStringorNSDataobjects to be used in the authentication process.- outItems
An array of
NSDataobjects returned from the authentication process, if any are returned;nilotherwise.- outContext
The proper context if the authentication attempt requires a context;
nilotherwise. If notnil, then more calls must be made with the Context to continue the authentication.- outError
An error reference for error details. Can be
nil.
Return Value
YES if no error occurs; otherwise, NO.
Discussion
If this function fails, the previous credentials for the node are used.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hsetValue:forAttribute:error:
Sets the values of an attribute of the record.
Parameters
- inValueOrValues
The value or values. Can be of type
NSStringorNSData, or anNSArraywith elements of both types.- inAttribute
The attribute.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the values are successfully set; otherwise, NO.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
ODRecord.hsynchronizeAndReturnError:
Synchronizes the record from the directory to get current data and commit changes.
Parameters
- outError
An error reference for error details. Can be
nil.
Return Value
YES if the record successfully synchronizes; otherwise, NO.
Discussion
This method only fetches those attributes that have been fetched before.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.hvaluesForAttribute:error:
Returns the values of an attribute of the record.
Parameters
- inAttribute
The attribute.
- outError
An error reference for error details. Can be
nil.
Return Value
An array of attribute values. Elements are of type NSString or NSData.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
ODRecord.hverifyExtendedWithAuthenticationType:authenticationItems:continueItems:context:error:
Verifies the credentials for interaction with the record’s node using other types of authentication available to Open Directory.
Parameters
- inType
The authentication type.
- inItems
An array of
NSStringorNSDataobjects to be used in the authentication process.- outItems
An array of
NSDataobjects returned from the authentication process, if any are returned;nilotherwise.- outContext
The proper context if the authentication attempt requires a context;
nilotherwise. If notnil, then more calls must be made with the Context to continue the authentication.- outError
An error reference for error details. Can be
nil.
Return Value
YES if verification succeeds; otherwise, NO.
Availability
- Available in OS X v10.6 and later.
See Also
Declared In
ODRecord.hverifyPassword:error:
Verifies the password for interaction with the record.
Parameters
- inPassword
The password for authenticating with the record.
- outError
An error reference for error details. Can be
nil.
Return Value
YES if verification succeeds; otherwise, NO.
Availability
- Available in OS X v10.6 and later.
Declared In
ODRecord.h© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-07-23)