---
title: GetLAContext
framework: security
role: symbol
role_heading: Instance Property
path: security/authorizationcallbacks/getlacontext
---

# GetLAContext

Constructs a local authentication context.

## Declaration

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

## Parameters

- `inEngine`: An opaque handle that’s passed to your plug-in when the authorization engine calls your doc://com.apple.security/documentation/Security/AuthorizationPluginInterface/MechanismCreate function.
- `outValue`: A pointer the function uses to return the doc://com.apple.documentation/documentation/LocalAuthentication/LAContext instance.

## Discussion

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(_:_:) function, that include the 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 version is 2 or higher.
