1 /* Copyright (c) 2012 Apple Inc. All Rights Reserved. */
3 #ifndef _SECURITY_AUTH_CREDENTIAL_H_
4 #define _SECURITY_AUTH_CREDENTIAL_H_
6 #if defined(__cplusplus)
11 typedef bool (^credential_iterator_t
)(credential_t
);
12 #endif /* __BLOCKS__ */
14 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
15 credential_t
credential_create(uid_t
);
17 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
18 credential_t
credential_create_with_credential(credential_t
,bool);
20 AUTH_WARN_RESULT AUTH_MALLOC AUTH_NONNULL_ALL AUTH_RETURNS_RETAINED
21 credential_t
credential_create_with_right(const char *);
24 uid_t
credential_get_uid(credential_t
);
27 const char * credential_get_name(credential_t
);
30 const char * credential_get_realname(credential_t
);
33 CFAbsoluteTime
credential_get_creation_time(credential_t
);
36 bool credential_get_valid(credential_t
);
39 bool credential_get_shared(credential_t
);
42 bool credential_is_right(credential_t
);
45 bool credential_check_membership(credential_t
,const char*);
48 void credential_invalidate(credential_t
);
50 #if defined(__cplusplus)
54 #endif /* !_SECURITY_AUTH_CREDENTIAL_H_ */