pub unsafe extern "C-unwind" fn SecAddSharedWebCredential(
fqdn: &CFString,
account: &CFString,
password: Option<&CFString>,
completion_handler: &DynBlock<dyn Fn(*mut CFError)>,
)
SecSharedCredential
and block2
only.Expand description
Asynchronously store (or update) a shared password for a website.
Parameter fqdn
: The fully qualified domain name of the website requiring the password.
Parameter account
: The account name associated with this password.
Parameter password
: The password to be stored. Pass NULL to remove a shared password if it exists.
Parameter completionHandler
: A block which will be invoked when the function has completed. If the shared password was successfully added (or removed), the CFErrorRef parameter passed to the block will be NULL. If the error parameter is non-NULL, an error occurred and the error reference will hold the result. Note: the error reference will be automatically released after this handler is called, though you may optionally retain it for as long as needed.
This function adds a shared password item which will be accessible by Safari and applications that have the specified fully-qualified domain name in their ‘com.apple.developer.associated-domains’ entitlement. If a shared password item already exists for the specified website and account, it will be updated with the provided password. To remove a password, pass NULL for the password parameter.
Note: since a request involving shared web credentials may potentially require user interaction or other verification to be approved, this function is dispatched asynchronously; your code provides a completion handler that will be called once the results (if any) are available.