Contents

LARight

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

Declaration

class LARight

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

Deauthorizing a right

Monitoring authorization status

See Also

Authentication and access