The SFAuthorization class allows you to restrict a user’s access to particular features in your Mac app or daemon.


The SFAuthorization class is an Objective-C interface for some of the functions in the Authorization Services API. You can use the authorizationRef() method to obtain an authorization reference, used in other calls to Authorization Services functions. The Authorization Services API is documented in Authorization Services C.


Allocating and initializing an authorization object

class func authorization()

Returns an authorization object initialized with a default environment, flags, and rights.


Initializes an authorization object with default environment, flags, and rights.

Obtaining an authorization reference

func authorizationRef()

Returns the authorization reference for this object.

Preventing credentials from being shared

func invalidateCredentials()

Prevents any rights that were obtained by this object from being preserved.


Inherits From