Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/Collaboration.framework |
Availability | Available in Mac OS X v10.5 and later. |
Companion guide | |
Declared in | CBIdentity.h |
A CBIdentity
object is used for accessing the attributes of an identity stored in an identity authority. You can use an identity object for finding identities, and storing them in an access control list (ACL). If you need to edit these attributes, take advantage of the CSIdentity
class in Core Services.
You can obtain a CBIdentity
object from one of the following class factory methods: identityWithName:authority:
, identityWithUUIDString:authority:
, identityWithPersistentReference:
, or identityWithCSIdentity:
.
A CBIdentity
object has methods to support for interoperability with the Core Services Identity API. Send CSIdentity
to your CBIdentity
object to return an opaque object for use in the Core Services Identity API. Similarly, call identityWithCSIdentity:
to use an Core Services Identity opaque object in the Collaboration framework.
There are two subclasses of CBIdentity
: CBGroupIdentity
and CBUserIdentity
. If you are working specifically with a group identity, use CBGroupIdentity
. Similarly, if you are working with a user identity, use CBUserIdentity
.
+ identityWithCSIdentity:
+ identityWithName:authority:
+ identityWithPersistentReference:
+ identityWithUUIDString:authority:
– aliases
– authority
– emailAddress
– fullName
– image
– isHidden
– isMemberOfGroup:
– posixName
– UUIDString
Returns an identity object created from the specified Core Services Identity opaque object.
+ (CBIdentity *)identityWithCSIdentity:(CSIdentityRef)csIdentity
The Core Services Identity opaque object.
The identity object for use with the Collaboration framework.
This method is used for interoperability with the Core Services Identity API.
CBIdentity.h
Returns the identity object with the given name from the specified identity authority.
+ (CBIdentity *)identityWithName:(NSString *)name authority:(CBIdentityAuthority *)authority
The name of the identity.
The identity authority to search.
The identity object, or nil
if no identity is found with the specified name.
The name is compared against all valid identity names, including full names, short names, email addresses, and aliases.
CBIdentity.h
Returns the identity object matching the persistent reference data.
+ (CBIdentity *)identityWithPersistentReference:(NSData *)data
The persistent data object that refers to an identity.
The identity object matching the persistent data object, or nil
if the identity is not found.
A persistent reference is an opaque data object suitable for persistent storage.
CBIdentity.h
Returns the identity object with the given UUID from the specified identity authority.
+ (CBIdentity *)identityWithUUIDString:(NSString *)uuid authority:(CBIdentityAuthority *)authority
The UUID of the identity you are searching for.
The identity authority to search.
The identity object, or nil
if no identity is found with the matching criteria.
CBIdentity.h
Returns an array of aliases (alternate names) for the identity.
- (NSArray *)aliases
An array of NSString
objects containing the alternate names for the identity.
An identity can have zero or more aliases. Like the full and short names, two identities cannot share an alias.
CBIdentity.h
Returns the identity authority where the identity is stored.
- (CBIdentityAuthority *)authority
The identity authority where the identity is stored.
CBIdentity.h
Returns an opaque object for use with the Core Services Identity API.
- (CSIdentityRef)CSIdentity
The opaque object for use with the Core Services Identity API.
This method, along with identityWithCSIdentity:
, is used for interoperability with the Core Services Identity API.
CBIdentity.h
Returns the email address of an identity.
- (NSString *)emailAddress
The email address of an identity or nil
if none exists.
CBIdentity.h
Returns the full name of the identity.
- (NSString *)fullName
The full name for the identity.
CBIdentity.h
Returns the image associated with an identity.
- (NSImage *)image
The image associated with an identity, or nil
if none exists.
CBIdentity.h
Returns a Boolean value indicating the state of the identity’s hidden property.
- (BOOL)isHidden
YES
if the identity is hidden; NO
if it is not.
A hidden identity does not show up in the Identity Picker. A hidden identity refers to system identities such as root
, www
, and wheel
.
CBIdentity.h
Returns a Boolean value indicating whether the identity is a member of the specified group.
- (BOOL)isMemberOfGroup:(CBGroupIdentity *)group
The group to check for membership.
YES
if the identity is a member of the group; NO
if it is not.
CBIdentity.h
Returns a persistent reference to store a reference to an identity.
- (NSData *)persistentReference
A data object that uniquely references an identity.
A persistent reference data object is an object generated from an identity. Persistent data objects can be written to and read from a file, making them extremely useful for storing identities in an ACL.
CBIdentity.h
Returns the POSIX name of the identity.
- (NSString *)posixName
The POSIX name of the identity.
The POSIX name is also referred to as the “short name” for an identity. It can only contain the characters A-Z, a-z, 0-9, -, _, ., and @.
CBIdentity.h
Returns the UUID of the identity as a string.
- (NSString *)UUIDString
The UUID string of the identity.
The UUID string is generated so it is unique across all identity authorities. When storing ACLs, one method is to store the UUID of each identity. However, it is recommended that you use a persistent data object instead (see persistentReference
).
CBIdentity.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-05-14)