<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LocalAuthentication",
  "identifier" : "/documentation/LocalAuthentication/LARight",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Local Authentication"
    ],
    "preciseIdentifier" : "c:objc(cs)LARight"
  },
  "title" : "LARight"
}
-->

# LARight

A grouped set of requirements that gate access to a resource or operation.

```
class LARight
```

## Overview

Use [`LARight`](/documentation/LocalAuthentication/LARight) instances to protect access to portions of your app that may contain sensitive information. By default, [`LARight`](/documentation/LocalAuthentication/LARight) instances require people to authenticate with Face ID, Touch ID, Apple Watch, or the device passcode. The following creates an [`LARight`](/documentation/LocalAuthentication/LARight) with the default authentication requirements:

```swift
let loginRight = LARight()
    
func login() async throws {
    try await loginRight.authorize(localizedReason: "Access sandcastle competition designs")
}

func logout() async {
    await loginRight.deauthorize()
}
```

## Topics

### Authorizing a right

[`init()`](/documentation/LocalAuthentication/LARight/init())

Creates a right using the default authorization requirements.

[`init(requirement:)`](/documentation/LocalAuthentication/LARight/init(requirement:))

Creates a right with the authentication requirements you supply.

[`tag`](/documentation/LocalAuthentication/LARight/tag)

An integer you use to identify a right.

[`authorize(localizedReason:completion:)`](/documentation/LocalAuthentication/LARight/authorize(localizedReason:completion:))

Performs an authorization on the right.

[`authorize(localizedReason:in:completion:)`](/documentation/LocalAuthentication/LARight/authorize(localizedReason:in:completion:))

Performs an authorization on the right with a window context you supply.

### Deauthorizing a right

[`deauthorize(completion:)`](/documentation/LocalAuthentication/LARight/deauthorize(completion:))

Invalidates a previously authorized right.

### Monitoring authorization status

[`checkCanAuthorize(completion:)`](/documentation/LocalAuthentication/LARight/checkCanAuthorize(completion:))

Checks whether the right has permission to perform authorization.

[`state`](/documentation/LocalAuthentication/LARight/state-swift.property)

The current authorization state for a right.

[`LARight.State`](/documentation/LocalAuthentication/LARight/State-swift.enum)

The possible states for a right during authorization.



---

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)