Contents

LARight.State

The possible states for a right during authorization.

Declaration

enum State

Overview

You can use key-value observation and the Combine framework to observe the authorization state of an LARight instance:

let right = LARight()
let cancellable = right
    .publisher(for: \.state)
    .sink { _ in
        print("Right updated to \(right.state)")
    }

try await right.authorize(localizedReason: "Access sandcastle competition designs")

Topics

Authorization states

Initializers

See Also

Authentication and access