GaitAuth
-
A
GaitAuth
module session.Each instance must be created from a
See moreUnifyID
instance and should not be initialized directly.GaitAuth
may be used to create and manageGaitModel
instances as well as collectGaitFeature
objects for use with the model scoring and training capabilities. SeeGaitModel
for additional usage details.Declaration
Swift
public class GaitAuth : NSObject, UnifyIDModule
-
A
GaitModel
can be be trained and subsequently used to score gait features.Warning:
GaitModel
posesses anunowned
reference toGaitAuth
. Invoking any methods on aGaitModel
belonging to a released session may cause a crash.The model lifecycle looks like the following:
- Create a model using the
GaitAuth.createModel(completion:)
function. - Persist the created model’s
id
so that you may load it by reference in future invocations. - Continue to collect features using the
GaitAuth.startFeatureUpdates(to:with:)
function. Data should periodically be added to the model with theGaitModel.add(features:completion:)
function. - After enough training data has been added,
call the
GaitModel.train(completion:)
function to initiate the training process. - Training happens in the background and may take several hours to complete.
You may periodically call
GaitModel.refresh(completion:)
to update the model status. - After the model training process has completed, the model status should be in
the
GaitModel.Status.ready
state indicating that it is ready to score with. - You may now use
GaitAuth.startFeatureUpdates(to:with:)
to generateGaitFeature
objects to pass to theGaitModel.score(_:completion:)
function.
Declaration
Swift
public class GaitModel
- Create a model using the
-
Error returned by GaitAuth module.
See moreDeclaration
Swift
public enum GaitAuthError : LocalizedError
-
Represents an object that is capable both of being used as training data and for scoring.
See moreDeclaration
Swift
public protocol GaitFeature
-
Represents a score generated by a
GaitModel
.- A value above
0.0
means that it is more likely the user than an attacker. - A value below
0.0
means that it is more likely an attacker than the user.
The threshold that you choose to base authentication decisions on depends on your use case. Each business may have different considerations as it relates to false positives and negatives, but as a general principle:
- Scores between
0.8
and1.0
reflect a very high level of confidence that this is the user. - Scores between
0.6
and0.8
continue to show high confidence that this is the user, but have a slightly increased likelihood that a potential attacker could have produced this score.
Scores below
See more0.6
(and above0.0
) are still more likely to be the user than an attacker, but continue to increase the possibility of letting an attacker through.Declaration
Swift
public struct GaitScore : Hashable
- A value above
-
Represents an object that is able to asynchronously provide authentication status.
See moreDeclaration
Swift
public protocol Authenticator
-
Configuration for a gait-based authenticator.
See moreDeclaration
Swift
public struct GaitQuantileConfig : Equatable
-
Configuration for an authenticator based on device unlock state.
See moreDeclaration
Swift
public struct DeviceAuthenticationConfig
-
Structure representing the result of an authentication attempt, including the overall authentication
See morestatus
andcontext
about how that status was determined.Declaration
Swift
@frozen public struct AuthenticationResult : Equatable
-
Analytics for internal UnifyID usage; not intended for public use.
See moreDeclaration
Swift
public class Analytics
-