UserManagement
@objc(VerIDUserManagement)
public protocol UserManagement
User management protocol
-
Callback on asynchronous operations with optional error parameter
Declaration
Swift
typealias ErrorCallback = (Error?) -> Void
-
Note
If faces were previously assigned to another user they should be reassigned to the given user.Declaration
Swift
@objc func assignFaces(_ faces: [Recognizable], toUser userId: String, completion: ErrorCallback?)
Parameters
faces
Faces or recognizable multiface structures to assign to the user
userId
User to whom the faces will be assigned
completion
Callback on completion
-
Delete faces or multiface structures
Declaration
Swift
@objc func deleteFaces(_ faces: [Recognizable], completion: ErrorCallback?)
Parameters
faces
Faces to delete
completion
Callback on completion
-
Get all managed users
Declaration
Swift
@objc func users() throws -> [String]
Return Value
Array of user IDs
-
Get faces of user
Declaration
Swift
@objc func facesOfUser(_ userId: String) throws -> [Recognizable]
Parameters
userId
ID of the user whose faces to return
Return Value
Array of recognizable faces
-
Get all managed faces
Declaration
Swift
@objc func faces() throws -> [Recognizable]
Return Value
Array of recognizable faces
-
Delete users
Declaration
Swift
@objc func deleteUsers(_ userIds: [String], completion: ErrorCallback?)
Parameters
userIds
IDs of the users to delete
completion
Callback on completion