Re: Passing Around AuthorizationRefs
Re: Passing Around AuthorizationRefs
- Subject: Re: Passing Around AuthorizationRefs
- From: Quinn <email@hidden>
- Date: Thu, 23 Oct 2003 21:54:27 -0700
At 15:44 -0700 23/10/03, James Masasaki wrote:
Is it possible to pass an AuthorizationRef from one application or
process to another?
Not directly, however, you can externalise the AuthorizationRef and
pass that between processes. Check out AuthorizationMakeExternalForm
and AuthorizationCreateFromExternalForm in <Security/Authorization.h>.
Is it possible to have the parent app create the AuthorizationRef,
have the child process copy it via
AuthorizationCreateFromExternalForm, and then have the child process
use it?
Yep. That's exactly what this API is designed for. We strongly
recommend you use it in this way. MoreAuthSample shows how it's done.
If you do this correctly then, in Panther at least, your
authorization dialogs will get keyboard focus (yay!). Authorization
Services knows that the AuthorizationRef originated in a GUI
application and, if that GUI application is at the front, any dialog
put up by that AuthorizationRef will have focus, even if it's
triggered by a non-GUI tool.
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.