Contents

MechanismDeactivate

Deactivates an authorization mechanism.

Declaration

int (*)(void *) MechanismDeactivate;

Parameters

  • inMechanism:

    An authorization mechanism reference that you returned when your Mechanismcreate function was called to create the mechanism.

Return Value

A result code. Return errAuthorizationSuccess (no error) if the function completes successfully and errAuthorizationInternal (Security Server internal error) if any error occurs.

Discussion

The authorization engine calls the MechanismDeactivate function of each active mechanism when you call the RequestInterrupt function. To deactivate your mechanism, you must stop any processing that is currently underway; for example, you should terminate any threads or UI processes that you initiated.

After you have terminated all processing, you must call the DidDeactivate function; the authorization engine waits for you to call this function before it resumes operation.