---
title: LARight
framework: localauthentication
role: symbol
role_heading: Class
path: localauthentication/laright
---

# LARight

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

## Declaration

```swift
class LARight
```

## Overview

Overview Use LARight instances to protect access to portions of your app that may contain sensitive information. By default, LARight instances require people to authenticate with Face ID, Touch ID, Apple Watch, or the device passcode. The following creates an LARight with the default authentication requirements: 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()](localauthentication/laright/init().md)
- [init(requirement:)](localauthentication/laright/init(requirement:).md)
- [tag](localauthentication/laright/tag.md)
- [authorize(localizedReason:completion:)](localauthentication/laright/authorize(localizedreason:completion:).md)
- [authorize(localizedReason:in:completion:)](localauthentication/laright/authorize(localizedreason:in:completion:).md)

### Deauthorizing a right

- [deauthorize(completion:)](localauthentication/laright/deauthorize(completion:).md)

### Monitoring authorization status

- [checkCanAuthorize(completion:)](localauthentication/laright/checkcanauthorize(completion:).md)
- [state](localauthentication/laright/state-swift.property.md)
- [LARight.State](localauthentication/laright/state-swift.enum.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [LAPersistedRight](localauthentication/lapersistedright.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Authentication and access

- [LARight.State](localauthentication/laright/state-swift.enum.md)
- [LAContext](localauthentication/lacontext.md)
