Class

LAContext

An LAContext object represents an authentication context. The LAContext class provides a programmatic interface for evaluating authentication policies and access controls, managing credentials, and invalidating authentication contexts.

Overview

Authentication contexts are used to evaluate authentication policies, allowing apps to request the user to authenticate themselves using personal information such as a fingerprint registered with Touch ID.

Symbols

Evaluating Authentication Policies

func canEvaluatePolicy(LAPolicy, error: NSErrorPointer)

Preflights an authentication policy to see if it is possible for authentication to succeed.

var evaluatedPolicyDomainState: Data?

The current state of the evaluated policy domain.

Managing Credentials

func setCredential(Data?, type: LACredentialType)

Sets an application-provided credential to be used when evaluating authentication.

func isCredentialSet(LACredentialType)

Returns whether the specified credential type is set.

var touchIDAuthenticationAllowableReuseDuration: TimeInterval

The duration for which Touch ID authentication reuse is allowable.

var localizedFallbackTitle: String?

The localized title for the fallback button in the dialog presented to the user during authentication.

var localizedCancelTitle: String?

The localized title for the fallback button in the dialog presented to the user during authentication.

Invalidating the Authentication Context

func invalidate()

Invalidates the authentication context.

Constants

Local Authentication Error Domain

The error domain for the Local Authentication framework.

LAError.Code

Error codes that can be returned when evaluating a policy.

LAPolicy

Policies specifying which forms of authentication are acceptable.

LACredentialType

Types of credentials to be used for authentication.

LAAccessControlOperation

Operations to be evaluated for access control by the evaluateAccessControl(_:operation:localizedReason:reply:) method.

Touch ID Authentication Reuse

Durations for Touch ID authentication reuse, used by the touchIDAuthenticationAllowableReuseDuration property.

Instance Properties

Relationships

Inherits From

Conforms To