views:

131

answers:

2

I am building an application in Mac OS X which should bring up the password screen in Mac OS X once when a button on a QT WIndow is clicked. Which API I should use for this? Also, how will my application get notified whether system is locked or not?

Thanks in advance.

A: 

I believe you are looking for the Authorization Services API.

Reynolds
using authorization services I can bring up the apple provided usr authentication but how do i bring my own customized window and close it upon teh correct input of password? thanks...
sbabu
I don't understand- You want to unlock the system (i.e. run with administrator privileges) but you want to write a custom dialog to prompt the user?I don't want to tell you how to code your application, but I'm having trouble coming up with a use case that would require this sort of solution. Why do you need a custom dialog box? Or have I misunderstood you?
Reynolds
I am building an application which authenticates user using face reconginition. But if the user is un able to authenticate using face recognition, he should be able to enter system password and unlock the screen.
sbabu
I see now why this is important. But honestly, I wouldn't know how to go about it. Let's hope someone with more Mac OS experience can provide an answer, because this is a very interesting problem.
Reynolds
A: 

This sounds a lot like an SFAuthorizationPluginView.

Apple has an API for you to add your own authentication methods. Here is some sample code to get started.

http://developer.apple.com/mac/library/samplecode/NameAndPassword/Introduction/Intro.html

Michael Bishop
Thanks for the response. I will check this later
sbabu