<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/AuthorizationCallbacks/RequestInterrupt",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@S@AuthorizationCallbacks@FI@RequestInterrupt"
  },
  "title" : "RequestInterrupt"
}
-->

# RequestInterrupt

Requests the authorization engine to interrupt the currently active authorization mechanism.

```
int (*)(struct __OpaqueAuthorizationEngine *) RequestInterrupt;
```

## Parameters

`inEngine`

An opaque handle that is passed to your plug-in when the authorization engine calls your [`MechanismCreate`](/documentation/Security/AuthorizationPluginInterface/MechanismCreate) function.

## Return Value

A result code. Possible results are [`errAuthorizationSuccess`](/documentation/Security/errAuthorizationSuccess) (no error) and [`errAuthorizationInternal`](/documentation/Security/errAuthorizationInternal) (Security Server internal error).

## Discussion

When you call this function, the security engine calls the [`MechanismDeactivate`](/documentation/Security/AuthorizationPluginInterface/MechanismDeactivate) function for your plug-in’s currently-active mechanism; that is, the mechanism that was last invoked and that has not yet called the [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult) function to report its result. Your mechanism should then stop any active processing and call the [`DidDeactivate`](/documentation/Security/AuthorizationCallbacks/DidDeactivate) function. When all mechanisms are inactive (that is, they have called either [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult) or [`DidDeactivate`](/documentation/Security/AuthorizationCallbacks/DidDeactivate)), the authorization engine calls the [`MechanismInvoke`](/documentation/Security/AuthorizationPluginInterface/MechanismInvoke) function for the mechanism that called [`RequestInterrupt`](/documentation/Security/AuthorizationCallbacks/RequestInterrupt) so that it can resume the authorization process from that point. After all mechanisms have called [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult), the authorization engine calls each mechanism’s [`MechanismDestroy`](/documentation/Security/AuthorizationPluginInterface/MechanismDestroy) function.

If your mechanism spins off a separate process or UI thread, that thread can call the [`RequestInterrupt`](/documentation/Security/AuthorizationCallbacks/RequestInterrupt) function to re-invoke the mechanism, even if that mechanism has already called the [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult) function. For example, if your plug-in implements a smart card authentication method, reading and evaluating the card might take several minutes to perform. Therefore, in order to avoid blocking other processing while the card is being evaluated, you might spin off a UI thread to interact with the user and then return from [`MechanismInvoke`](/documentation/Security/AuthorizationPluginInterface/MechanismInvoke). When the card has been read, the UI thread calls the [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult) function with a value of [`kAuthorizationResultAllow`](/documentation/Security/AuthorizationResult/kAuthorizationResultAllow) and changes the UI to request the user’s PIN. The authorization engine calls the next mechanism, which verifies the PIN. If the user pulls out the card before the verification is complete, the UI thread can call [`RequestInterrupt`](/documentation/Security/AuthorizationCallbacks/RequestInterrupt). The authorization engine then calls the active mechanism’s [`MechanismDeactivate`](/documentation/Security/AuthorizationPluginInterface/MechanismDeactivate) function, causing it to terminate the PIN verification and call [`DidDeactivate`](/documentation/Security/AuthorizationCallbacks/DidDeactivate). Then the authorization engine calls your UI mechanism’s [`MechanismInvoke`](/documentation/Security/AuthorizationPluginInterface/MechanismInvoke) function again. Your UI can then prompt the user to reinsert the card.

To understand this sequence better, suppose your plug-in contains three mechanisms: A, B, and C. Mechanism A has called [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult) and has no active processes. Mechanism B has called [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult), but still has a UI thread running. Mechanism C is running and has not yet called [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult). The user clicks Cancel or otherwise interrupts the UI thread, causing the UI thread to call the [`RequestInterrupt`](/documentation/Security/AuthorizationCallbacks/RequestInterrupt) function. The following sequence of events occurs:

1. The authorization engine calls mechanism C’s [`MechanismDeactivate`](/documentation/Security/AuthorizationPluginInterface/MechanismDeactivate) function.
2. Mechanism C stops active processing and calls the [`DidDeactivate`](/documentation/Security/AuthorizationCallbacks/DidDeactivate) function.
3. The authorization engine calls mechanism B’s [`MechanismInvoke`](/documentation/Security/AuthorizationPluginInterface/MechanismInvoke) function (because mechanism B is the one that called [`RequestInterrupt`](/documentation/Security/AuthorizationCallbacks/RequestInterrupt)).
4. Mechanism B updates the UI and calls the [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult) function with the value [`kAuthorizationResultAllow`](/documentation/Security/AuthorizationResult/kAuthorizationResultAllow).
5. The authorization engine calls mechanism C’s [`MechanismInvoke`](/documentation/Security/AuthorizationPluginInterface/MechanismInvoke) function.
6. Mechanism C completes processing and calls [`SetResult`](/documentation/Security/AuthorizationCallbacks/SetResult) with [`kAuthorizationResultAllow`](/documentation/Security/AuthorizationResult/kAuthorizationResultAllow).
7. The authorization engine calls the [`MechanismDestroy`](/documentation/Security/AuthorizationPluginInterface/MechanismDestroy) function of each mechanism in turn (A, B, then C).

The authorization engine sends you the entry point to the [`RequestInterrupt`](/documentation/Security/AuthorizationCallbacks/RequestInterrupt) function in an [`AuthorizationCallbacks`](/documentation/Security/AuthorizationCallbacks) structure when you call the [`AuthorizationPluginCreate`](/documentation/Security/AuthorizationPluginCreate) function.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)