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

# GetLAContext

Constructs a local authentication context.

```
int (*)(struct __OpaqueAuthorizationEngine *, const void **) GetLAContext;
```

## Parameters

`inEngine`

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

`outValue`

A pointer the function uses to return the <doc://com.apple.documentation/documentation/LocalAuthentication/LAContext> instance.

## Discussion

If a PIN is available, you can use the context for token operations that would normally require a PIN.

You can also use this context for keychain item accesses, for example using the [`SecItemCopyMatching(_:_:)`](/documentation/Security/SecItemCopyMatching(_:_:)) function, that include the [`kSecUseAuthenticationContext`](/documentation/Security/kSecUseAuthenticationContext) key in the query dictionary.

The caller owns the returned context and is responsible for releasing it.

> Important:
> This function is only available when the callback ``doc://com.apple.security/documentation/Security/AuthorizationCallbacks/version`` is 2 or higher.

---

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)