Built-in Cocoa Password Authentication Dialog Box?

Is there a built-in username / password in the Cocoa dialog box? I do not want to reinvent this if there is a standard way to do this, but after googling I did not come up with anything.

I often see that a lock image with an application image overlays it, so I thought there might be something.

+7
authentication passwords cocoa modal-dialog macos
source share
1 answer

There is an NSSecureTextField control ( NSTextField ) for entering protected text (it shows โ€ข instead of the entered letters and does not allow copying to an insecure text field), but there is no standard Cocoa authentication dialog for arbitrary use.

The Authorization Services structure will display a standard dialog if necessary (i.e., in response to a request to the structure), but I do not believe that you can co-opt this dialogue for your own purposes (and would not: it would be a serious mistake to allow users to think that they allow a privileged action according to the meaning of the dialogue when you used the dialogue with a different intention).

+12
source share

All Articles