User Management API
API that provides functions to enroll and delete users.
BS2_GetUserList
Gets enrolled user ID as array. The size of the user ID is BS2USERIDSIZE.
BS2_RemoveUser
Deletes user by given user ID.
BS2_RemoveAllUser
Deletes all users.
BS2_GetUserInfos
Gets the user information of the given user ID.
BS2_GetUserInfosEx
+ 2.4.0 Gets the user information of the given user ID. This API is only for devices that has been upgraded to the v2.4 FW group. You can check the FW list from the v2.4 release notes.
BS2_EnrolUser
Enrolls new user.
BS2_EnrolUserEx
+ 2.6.3 Enrolls new user. (including Job code and User phrase)
BS2_EnrollUser
+ v2.6.3 Enrolls new user
BS2_EnrollUserEx
+ v2.6.3 Enrolls new user
BS2_GetUserDatas
+ v2.5.0 Gets selected data of user.
BS2_GetUserDatasEx
+ v2.5.0 Gets selected data of user. (including Job code, User phrase)
BS2_GetSupportedUserMask
+ v2.5.0 Gets user settings supported by the device.
BS2_EnrollUserSmall
+ v2.6.3 Enrolls new user with efficient use of memory.
BS2_EnrollUserSmallEx
+ v2.6.3 Enrolls new user with efficient use of memory.
BS2_GetUserSmallInfos
+ v2.6.3 Gets the user information of the given user ID with efficient use of memory.
BS2_GetUserSmallInfosEx
+ v2.6.3 Gets the user information of the given user ID with efficient use of memory.
BS2_GetUserSmallDatas
+ v2.6.3 Gets selected data of user with efficient use of memory.
BS2_GetUserSmallDatasEx
+ v2.6.3 Gets selected data of user with efficient use of memory.
BS2_EnrollUserFaceEx
+ v2.7.1 Enrolls new user.
BS2_GetUserInfosFaceEx
+ v2.7.1 Gets the user information of the given user ID.
BS2_GetUserDatasFaceEx
+ v2.7.1 Gets selected data of user.
BS2_PartialUpdateUser
+ v2.8.3 Updates partial information of an already registered user. The user you want to renew must be a registered user.
BS2_PartialUpdateUserEx
+ v2.8.3 Updates partial information of an already registered user. The user you want to renew must be a registered user.
BS2_PartialUpdateUserSmall
+ v2.8.3 Updates partial information of an already registered user. The user you want to renew must be a registered user.
BS2_PartialUpdateUserSmallEx
+ v2.8.3 Updates partial information of an already registered user. The user you want to renew must be a registered user.
BS2_PartialUpdateUserFaceEx
+ v2.8.3 Updates partial information of an already registered user. The user you want to renew must be a registered user.
BS2_GetUserStatistic
+ v2.8.3 Gets the user-related statistics that the device has.
BS2_GetUserOverride
+ v2.9.12 Gets user information using extended door open time by specifying user IDs.
BS2_GetAllUserOverride
+ v2.9.12 Gets all user information using extended door open time.
BS2_SetUserOverride
+ v2.9.12 Sets user information using extended door open time.
BS2_RemoveUserOverride
+ v2.9.12 Removes users using extended door open time by specifying user IDs.
BS2_RemoveAllUserOverride
+ v2.9.12 Removes all users using extended door open time.
Structure
BS2User
typedef struct {
char userID[BS2_USER_ID_SIZE];
uint8_t formatVersion;
uint8_t flag;
uint16_t version;
uint8_t numCards;
uint8_t numFingers;
uint8_t numFaces;
uint8_t infoMask;
uint32_t authGroupID;
uint32_t faceChecksum;
} BS2User;
-
userIDUser ID provided as string, and has a range of 1 ~ 4294967295.
-
formatVersionNot Used.
-
flagFlag that shows the user's status. OR operation is available and the mask value is listed below.
Value Description 0x00 None 0x01 User enrolled 0x02 User updated 0x04 User deleted 0x80 User disabled -
versionNot Used.
-
numCardsNumber of cards mapped to user.
-
numFingersNumber of fingerprint templates mapped to user.
-
numFacesNumber of face templates mapped to user.
-
infoMask+ v2.8.3 This indicates what information the user has. By changing the information at infoMask and sending the information to change to the device, it is possible to partially change the selected user's information.
At this moment, Partial Update families of functions(BS2_PartialUpdateUser, BS2_PartialUpdateUserEx, BS2_PartialUpdateUserSmall, BS2_PartialUpdateUserSmallEx, BS2_PartialUpdateUserFaceEx) and user mask argument must match (refer to the table below).
Value Description 0x01 BS2_USER_INFO_MASK_PHRASE 0x02 BS2_USER_INFO_MASK_JOB_CODE 0x04 BS2_USER_INFO_MASK_NAME 0x08 BS2_USER_INFO_MASK_PHOTO 0x10 BS2_USER_INFO_MASK_PIN 0x20 BS2_USER_INFO_MASK_CARD 0x40 BS2_USER_INFO_MASK_FINGER 0x80 BS2_USER_INFO_MASK_FACE Get user information
The infoMask indicates what information is allocated to the current user when getting the user information.
User information BS2_USER_MASK infoMask Partial removal unmasking unmasking Partial edit masking masking Default setting unmasking masking Partial removal of user information
Choose unmasking for the information to be removed at all sections (infoMask, Partial Update families of functions, and user mask agreements).
Partial edit of user information
Choose masking for the information to be edited at all sections (infoMask, Partial Update families of functions, and user mask agreements).
Default setting of user information
Choose masking for infoMask and unmasking for Partial Update familes of functions and user mask agreements.
Changing credential information (Card/Fingerprint/Face)
It checks if the credential information is allocated or not such as
numCards,numFingers, ornumFacesis 0,fingerObjs,cardObjs,faceObjs, orfaceExObjsisNULL. Plus, it checksinfoMask.If the input information at card/fingerprint/face is greater than 0 and the mask at
infoMaskis set, the device credential information can be changed.For example, when the device has two fingerprints for a user, select masking at
infoMask'sBS2_USER_INFO_MASK_FINGER,numFingers = 1, and assign a fingerprint atfingerObjs. Then the device will have only one newly assigned fingerprint.To add a new fingerprint, three fingerprints must be assigned which includes the two previously stored fingerprints and the new fingerprint.
Keeping the credential information (Card/Fingerprint/Face)
The device keeps the original credential information if the credential information at card/fingerprint/face is set to 0 and the
infoMaskis set to masking.Removing the credential information (Card/Fingerprint/Face)
If the credential information at card/fingerprint/face is set to 0 and the
infoMaskis set to unmasking, the device erases the corresponding information assigned to each credential. -
authGroupIDThe group ID the user is assigned to when face group matching is enabled.
-
faceChecksumNot Used.
BS2UserSetting
Please use BS2UserSettingEx to set the personal authentication mode for Visual Face-based devices.
typedef struct {
uint32_t startTime;
uint32_t endTime;
uint8_t fingerAuthMode;
uint8_t cardAuthMode;
uint8_t idAuthMode;
uint8_t securityLevel;
} BS2UserSetting;
-
startTimeStart time that a user can identify.
A value greater than 978307200 (01 January 2001, 00:00:00) must be entered, If set 0, it means that there is no limit.
-
endTimeEnd time that that a user can identify.
A value smaller than 1924991999 (31 December 2030, 23:59:59) must be entered, If set 0, it means that there is no limit.
For firmware versions that include the date extension feature or later, settings can be stored up to 2145916799(31 December 2037, 23:59:59).
Please refer to the revision notes for each firmware version to confirm whether this is supported.
(For example, in the case of BioStation 3, firmware version 1.3.0 or later allows settings up to 2145916799(31 December 2037, 23:59:59). )
-
fingerAuthModeFinger authentication mode for user authentication.
Value Description 0 Uses only fingerprint authentication 1 Uses fingerprint and PIN authentication 254 Cannot use 255 Undefined(Operates as defined in system) -
cardAuthModeCard authentication mode for user authentication.
Value Description 2 Uses only card authentication 3 Uses card and fingerprint authentication 4 Uses card and PIN authentication 5 Uses fingerprint or PIN after card authentication 6 Uses card, fingerprint, and PIN authentication 254 Cannot use 255 Undefined(Operates as defined in system) -
idAuthModeID authentication mode for user authentication.
Value Description 7 Uses fingerprint authentication after entering user ID 8 Uses PIN authentication after entering user ID 9 Uses fingerprint or PIN authentication after entering user ID 10 Uses fingerprint and PIN authentication after entering user ID 254 Cannot use 255 Undefined(Operates as defined in system) -
securityLevelSecurity level for fingerprint identification or face recognition.
Value Description 0 Default value defined in system 1 Lowest security level 2 Low security level 3 Normal security level 4 High security level 5 Highest security level
BS2UserPhoto
typedef struct {
uint32_t size;
uint8_t data[BS2_USER_PHOTO_SIZE];
} BS2UserPhoto;
-
sizeSize of the user profile image data.
-
dataData of the profile image, which can be stored up to 16kb.
BS2UserBlob
typedef struct {
BS2User user;
BS2UserSetting setting;
uint8_t name[BS2_USER_NAME_SIZE];
BS2UserPhoto photo;
uint8_t pin[BS2_PIN_HASH_SIZE];
BS2CSNCard* cardObjs;
BS2Fingerprint* fingerObjs;
BS2Face* faceObjs;
uint32_t accessGroupId[BS2_MAX_NUM_OF_ACCESS_GROUP_PER_USER];
} BS2UserBlob;
-
userStructure that defines the basic user information.
-
settingStructure that defines the configuration value for user identification.
-
nameUser name having UTF-8 for string encoding.
-
photoUser profile image, which supports only Jpeg images.
-
pinPersonal Identification Number(PIN). It should be entered through
BS_MakePinCodefunction. -
cardObjsCard list for user authentication that needs to exist as much as
user.numCards. Refer to Smartcard API for data format.In case of Secure Crendential card,
cardObjsarray ofBS2UserBlobstructure should be filled and the user should be updated after Secure Crendential card issuing. -
fingerObjsFingerprint template for user authentication that needs to exist as much as
user.numFingers. Refer to Fingerprint API for data format. -
faceObjsFace template for user authentication that needs to exist as much as
user.numFaces. Refer to Face API for data format. -
accessGroupIdList of access groups where users belong to which can be configured up to 16 groups.
BS2Job
typedef struct {
uint8_t numJobs;
uint8_t reserved[3];
struct {
BS2_JOB_CODE code;
BS2_JOB_LABEL label;
} jobs[BS2_MAX_JOB_SIZE];
} BS2Job;
-
numJobsNumber of job codes allocated to the user.
-
reservedReserved Space.
-
jobsList of jobs.
BS2UserBlobEx
typedef struct {
BS2User user;
BS2UserSetting setting;
uint8_t name[BS2_USER_NAME_SIZE];
BS2UserPhoto photo;
uint8_t pin[BS2_PIN_HASH_SIZE];
BS2CSNCard* cardObjs;
BS2Fingerprint* fingerObjs;
BS2Face* faceObjs;
BS2Job job;
BS2_USER_PHRASE phrase;
uint32_t accessGroupId[BS2_MAX_NUM_OF_ACCESS_GROUP_PER_USER];
} BS2UserBlobEx;
-
userStructure that defines the basic user information.
-
settingStructure that defines the configuration value for user identification.
-
nameUser name having UTF-8 for string encoding.
-
photoUser profile image, which supports only Jpeg images.
-
pinPersonal Identification Number(PIN). It should be entered through
BS_MakePinCodefunction. -
cardObjsCard list for user authentication that needs to exist as much as
user.numCards. Refer to Smartcard API for data format. -
fingerObjsFingerprint template for user authentication that needs to exist as much as
user.numFingers. Refer to Fingerprint API for data format. -
faceObjsFace template for user authentication that needs to exist as much as
user.numFaces. Refer to Face API for data format. -
jobJob code that will be allocated to user.
-
phrasePrivate message that will be displayed when the user authenticates.
Model Supported Ver. FaceStation 2 V1.0.0 or higher FaceStation F2 V1.0.0 or higher X-Station 2 V1.0.0 or higher BioStation 3 V1.0.0 or higher -
accessGroupIdList of access groups where users belong to which can be configured up to 16 groups.
BS2UserSmallBlob
typedef struct {
BS2User user;
BS2UserSetting setting;
uint8_t name[BS2_USER_NAME_SIZE];
BS2UserPhoto* photo;
uint8_t pin[BS2_PIN_HASH_SIZE];
BS2CSNCard* cardObjs;
BS2Fingerprint* fingerObjs;
BS2Face* faceObjs;
uint32_t accessGroupId[BS2_MAX_NUM_OF_ACCESS_GROUP_PER_USER];
} BS2UserSmallBlob;
-
userStructure that defines the basic user information.
-
settingStructure that defines the configuration value for user identification.
-
nameUser name having UTF-8 for string encoding.
-
photoUser profile image, which supports only Jpeg images.
-
pinPersonal Identification Number(PIN). It should be entered through
BS_MakePinCodefunction. -
cardObjsCard list for user authentication that needs to exist as much as
user.numCards. Refer to Smartcard API for data format. -
fingerObjsFingerprint template for user authentication that needs to exist as much as
user.numFingers. Refer to Fingerprint API for data format. -
faceObjsFace template for user authentication that needs to exist as much as
user.numFaces. Refer to Face API for data format. -
accessGroupIdList of access groups where users belong to which can be configured up to 16 groups.
BS2UserSmallBlobEx
typedef struct {
BS2User user;
BS2UserSetting setting;
uint8_t name[BS2_USER_NAME_SIZE];
BS2UserPhoto* photo;
uint8_t pin[BS2_PIN_HASH_SIZE];
BS2CSNCard* cardObjs;
BS2Fingerprint* fingerObjs;
BS2Face* faceObjs;
BS2Job job;
BS2_USER_PHRASE phrase;
uint32_t accessGroupId[BS2_MAX_NUM_OF_ACCESS_GROUP_PER_USER];
} BS2UserSmallBlobEx;
-
userStructure that defines the basic user information.
-
settingStructure that defines the configuration value for user identification.
-
nameUser name having UTF-8 for string encoding.
-
photoUser profile image, which supports only Jpeg images.
-
pinPersonal Identification Number(PIN). It should be entered through
BS_MakePinCodefunction. -
cardObjsCard list for user authentication that needs to exist as much as
user.numCards. Refer to Smartcard API for data format. -
fingerObjsFingerprint template for user authentication that needs to exist as much as
user.numFingers. Refer to Fingerprint API for data format. -
faceObjsFace template for user authentication that needs to exist as much as
user.numFaces. Refer to Face API for data format. -
jobJob code that will be allocated to user.
-
phrasePrivate message that will be displayed when the user authenticates.
Model Supported Ver. FaceStation 2 V1.0.0 or higher FaceStation F2 V1.0.0 or higher X-Station 2 V1.0.0 or higher -
accessGroupIdList of access groups where users belong to which can be configured up to 16 groups.
BS2UserSettingEx
Please use BS2UserSetting to set the personal authentication mode for devices other than Visual Face-based devices.
typedef struct {
uint8_t faceAuthMode;
uint8_t fingerprintAuthMode;
uint8_t cardAuthMode;
uint8_t idAuthMode;
uint8_t reserved[28];
} BS2UserSettingEx;
-
faceAuthModeUser facial authentication mode
Value Level 1 Level 2 Level 3 Level 4 11 Face 12 Face Fingerprint 13 Face PIN 14 Face Fingerprint or PIN 15 Face Fingerprint PIN 254 Cannot use 255 Not defined(System defined mode) -
fingerprintAuthModeUser fingerprint authentication mode
Value Level 1 Level 2 Level 3 Level 4 16 Fingerprint 17 Fingerprint Face 18 Fingerprint PIN 19 Fingerprint Face or PIN 20 Fingerprint Face PIN 254 Cannot use 255 Not defined(System defined mode) -
cardAuthModeUser card authentication mode
Value Level 1 Level 2 Level 3 Level 4 21 Card 22 Card Face 23 Card Fingerprint 24 Card PIN 25 Card Face or Fingerprint 26 Card Face or PIN 27 Card Fingerprint or PIN 28 Card Face or Fingerprint or PIN 29 Card Face Fingerprint 30 Card Face PIN 31 Card Fingerprint Face 32 Card Fingerprint PIN 33 Card Face or Fingerprint PIN 34 Card Face Fingerprint or PIN 35 Card Fingerprint Face or PIN 254 Cannot use 255 Not defined(System defined mode) -
idAuthModeUser ID authentication mode
Value Level 1 Level 2 Level 3 Level 4 36 ID Face 37 ID Fingerprint 38 ID PIN 39 ID Face or Fingerprint 40 ID Face or PIN 41 ID Fingerprint or PIN 42 ID Face or Fingerprint or PIN 43 ID Face Fingerprint 44 ID Face PIN 45 ID Fingerprint Face 46 ID Fingerprint PIN 47 ID Face or Fingerprint PIN 48 ID Face Fingerprint or PIN 49 ID Fingerprint Face or PIN 254 Cannot use 255 Not defined(System defined mode) -
reservedReserved
BS2UserFaceExBlob
typedef struct
{
BS2User user;
BS2UserSetting setting;
BS2_USER_NAME user_name;
BS2UserPhoto* user_photo_obj;
BS2_USER_PIN pin;
BS2CSNCard* cardObjs;
BS2Fingerprint* fingerObjs;
BS2Face* faceObjs; // FS2, FL
BS2Job job;
BS2_USER_PHRASE phrase;
BS2_ACCESS_GROUP_ID accessGroupId[BS2_MAX_NUM_OF_ACCESS_GROUP_PER_USER];
BS2UserSettingEx settingEx; // F2
BS2FaceEx* faceExObjs; // F2
} BS2UserFaceExBlob;
-
userBasic user information defined structure
-
settingBasic user setting defined structure
-
nameUser name (Encoding : UTF-8)
-
photoUser profile image (Only support jpeg)
-
pinPIN, must be filled with a return of API
BS2_MakePinCode -
cardObjs
Card list for user authentication, there must be as many as
user.numCards. Refer to Smartcard API for data format. -
fingerObjsFingerprint template list for user authentication, there must be as many as
user.numFingers. Refer to Fingerprint API for data format. -
faceObjsIR Face supportedFace template list for user authentication, there must be as many asuser.numFaces. Refer to Face API for data format. -
jobJob code in T&A mode
-
phrasePrivate message that will be displayed when the user authenticates.
Model Supported Ver. FaceStation 2 V1.0.0 or higher FaceStation F2 V1.0.0 or higher X-Station 2 V1.0.0 or higher -
accessGroupIdList of access group of the user assigned, maximum is 16.
-
settingExVisual Face supportedSets private authentication. It is now possible to combine more various authentication modes by combining fingerprints and faces. -
faceExObjsVisual Face supportedFace template list for user authentication, there must be as many asuser.numFaces. Refer to Face API for data format.
BS2UserStatistic
typedef struct {
uint32_t numUsers;
uint32_t numCards;
uint32_t numFingerprints;
uint32_t numFaces;
uint32_t numNames;
uint32_t numImages;
uint32_t numPhrases;
} BS2UserStatistic;
-
numUsersNumber of registered users.
-
numCardsNumber of registered cards.
-
numFingerprintsNumber of fingerprints registered.
-
numFacesNumber of registered faces.
-
numNamesNumber of registered user names.
-
numImagesNumber of images registered.
-
numPhrasesNumber of registered personal messages.
BS2UserOverride
typedef struct{
BS2_USER_ID userID; ///< 32 bytes
BS2_BOOL useExtendedAutoLockTimeout; ///< 1 byte
uint8_t reserved[11]; ///<div 11 bytes
} BS2UserOverride;
-
userIDUser ID.
-
useExtendedAutoLockTimeoutIndicates whether the user uses the extended door open time (user override).
-
reservedReserved space.