• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Passing Around AuthorizationRefs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Passing Around AuthorizationRefs
      • From: James Masasaki <email@hidden>
References: 
 >Passing Around AuthorizationRefs (From: James Masasaki <email@hidden>)

  • Prev by Date: Re: Passing Around AuthorizationRefs
  • Next by Date: Re: Passing Around AuthorizationRefs
  • Previous by thread: Re: Passing Around AuthorizationRefs
  • Next by thread: Re: Passing Around AuthorizationRefs
  • Index(es):
    • Date
    • Thread