There is NSSecureTextField
, a control (NSTextField
subclass) for entering secure text (it shows • instead of the typed letters and doesn't allow copying to a non-secure text field), but there is no standard authentication dialog in Cocoa for arbitrary use.
The Authorization Services framework will display the standard dialog when needed (i.e. in response to a request to the framework), but I don't believe you can co-opt this dialog for your own purposes (nor should you; it would be a serious mistake to let users think they were authorizing a privileged action according the understood meaning of the dialog when you were using the dialog with a different intent).