Re: Authenticate a user
Re: Authenticate a user
- Subject: Re: Authenticate a user
- From: email@hidden
- Date: Fri, 21 Oct 2005 13:40:55 +1000
I think I can see where the original poster is going, and while I do
I agree with the response so far that [s]he should try to just use
the keychain(s), I think there is sufficient merit otherwise to
warrant a proper response...
The proper way to do such things is to define "rights" that are
really just localised to your app. For example, there's the
"com.apple.Safari.parental-controls" right which Safari uses to
permit modification of just it's parental controls, which is
different of course to just being able to run the app or not.
You'll want to start by reading through most of: http://
developer.apple.com/documentation/Security/Reference/
authorization_ref/index.html
Specifically, you'll need to use AuthorizationRightSet at some point
to setup your rights. This includes default behaviours on how
they're handled, what sort of authorisation and/or authentication is
required to obtain them, etc. It's a pretty complex topic - there
are some useful comments in /etc/authorization itself that might be
worth perusing at some point.
Once you have your rights in the database, you can use
AuthorizationCreate [and possibly AuthorizationCopyRights] to request
those rights, which will prompt for a username and password if you so
configure it.
Wade Tregaskis
ICQ: 40056898
AIM, Yahoo & Skype: wadetregaskis
MSN: email@hidden
iChat & email: email@hidden
Jabber: email@hidden
Google Talk: email@hidden
http://homepage.mac.com/wadetregaskis/
-- Sed quis custodiet ipsos custodes?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden