pub unsafe static kODPolicyAttributeCreationTime: Option<&'static ODPolicyAttributeType>Available on crate feature
CFOpenDirectoryConstants only.Expand description
Policy attribute for the record creation time.
Policy attribute for the record creation time. The time is specified as the number of seconds since the “reference date”. Could be used to disable “temporary” accounts after a specific period of time.
The example below disables authentications after 10 days after the account was created.
Note that kODPolicyAttributeDaysUntilExpiration must be converted to seconds to match the units of the other times. The special keyword DAYS_TO_SECONDS can be used for the conversion.
@ { kODPolicyKeyIdentifier : “ expires after 10 days“, kODPolicyKeyParameters : @ {kODPolicyAttributeDaysUntilExpiration : @ 10 }, kODPolicyKeyContent : [NSString stringWithFormat: “ % @ < % @
- (% @
- DAYS_TO_SECONDS)“, kODPolicyAttributeCurrentTime, kODPolicyAttributeCreationTime, kODPolicyAttributeDaysUntilExpiration]};
See also Apple’s documentation