The Security Objective-C API includes theSFAuthorization class, which provides an Objective-C interface for Authorization Services. The other classes in this API provide security-related UI elements, as follows:
TheSFAuthorizationView class implements an authorization view in a window. An authorization view is a lock icon and accompanying text that indicates whether an operation can be performed (Figure 3-1). If the lock is closed, when the user clicks it, an authorization dialog displays. Once the user is authorized, the lock icon appears open. When the user clicks the open lock, Authorization Services restricts access again and changes the icon to the closed state.
The SFCertificateView and SFCertificatePanel classes display the contents of a certificate. The SFCertificateView class is used by the Keychain Access application, for example (Figure 3-2).
The SFCertificateTrustPanel class displays and optionally lets the user edit the trust settings in a certificate. Figure 3-3 shows this feature as used by the Keychain Access application.
The SFChooseIdentityPanel class displays a list of identities in the system and lets the user select one. In this context, identity refers to the combination of a private key and its associated certificate. If a user had two or more certificates, for example, each with its own private key, the user’s email application could use this interface to let the user select which identity to use to sign a specific letter.
The SFKeychainSavePanel class adds an interface to an application that lets the user save a new keychain. The user interface is nearly identical to that used for saving a file. The difference is that this class returns a keychain in addition to a filename and lets the user specify a password for the keychain.
The SFKeychainSettingsPanel class displays an interface that lets the user change keychain settings. Figure 3-4 shows this interface in the Keychain Access application.
Documentation for the Security Objective-C API is in Security Interface Framework Reference.
Last updated: 2008-02-08