Class

SFAuthorization

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

Declaration

@interface SFAuthorization : NSObject

Overview

The SFAuthorization class is an 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.

Topics

Allocating and initializing an authorization object

+ authorization

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

+ authorizationWithFlags:rights:environment:

Returns an authorization object initialized with the specified flags, rights and environment.

- init

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

- initWithFlags:rights:environment:

Initializes an authorization object with the specified flags, rights, and environment.

Obtaining an authorization reference

- authorizationRef

Returns the authorization reference for this object.

Authorizing rights

- permitWithRights:flags:environment:authorizedRights:

Authorizes and preauthorizes rights to access a privileged operation and returns the granted rights.

Deprecated
- obtainWithRights:flags:environment:authorizedRights:error:

Authorizes and preauthorizes rights to access a privileged operation and returns the granted rights.

- permitWithRight:flags:

Authorizes and preauthorizes one specific right.

Deprecated
- obtainWithRight:flags:error:

Authorizes and preauthorizes one specific right.

Preventing credentials from being shared

- invalidateCredentials

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

Relationships

Inherits From

Conforms To