Re: Authenticating without UI
Re: Authenticating without UI
- Subject: Re: Authenticating without UI
- From: OL&L Lists <email@hidden>
- Date: Tue, 22 Jun 2004 02:56:13 -0700
In answer to your question - the answer is yes - but only if you have
a previously valid AuthorizationRef. Once that is done, you can pass
the flags to AuthorizationCopyRights to supress the e dialog and it
will allow the security server to authorize without showing the
dialog - assuming the previous credentials have been cached. The bad
news is you can *never* avoid the 1st dialog unless you use some
other way for the user to enter authentication data that the Security
Server accepts (smart card, retinal scan, etc.) or unless you used a
shared right that has already had user credentials cached by the
Security Server.
Also note this error from Authorization.h:
errAuthorizationInteractionNotAllowed = -60007, /* The
authorization was denied since no user interaction was possible. */
In other words, if the Security Server needs to authenticate the
user, and no valid credential exists for that user in the Security
Servers' credentials caches, the dialog is going to show up no matter
what you do.
Also note this comment from the same file for AuthorizationCreate &
AuthorizationCopyRights:
When the kAuthorizationFlagInteractionAllowed flag is set, user
interaction will happen when required. Failing to set this flag will
result in this call failing with a
errAuthorizationInteractionNotAllowed status when interaction is
required.
You can't get around the first dialog no matter what you do unless
you use one of the aforementioned methods. If you cache your
AuthorizationRef and credentials properly all further dialogs can be
avoided.
Michael
Orbital Launch & Lift, Inc.
http://www.orbitallaunch.com
At 3:50 PM +0200 6/17/04, Tito Ciuro wrote:
>
Hello,
>
>
Is it possible to collect the user name/password from a custom-made
>
window, can I feed the info to Authorization Services without
>
displaying the standard Apple dialog?
>
>
Thanks,
>
>
-- Tito
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.