Rename TOUCH_ID_* enums to BIOMETRY_*
This commit is contained in:
parent
abed674800
commit
618acc7789
|
@ -126,11 +126,11 @@ NSString *accessGroupValue(NSDictionary *options)
|
|||
|
||||
#define kAccessControlType @"accessControl"
|
||||
#define kAccessControlUserPresence @"UserPresence"
|
||||
#define kAccessControlTouchIDAny @"TouchIDAny"
|
||||
#define kAccessControlTouchIDCurrentSet @"TouchIDCurrentSet"
|
||||
#define kAccessControlBiometryAny @"BiometryAny"
|
||||
#define kAccessControlBiometryCurrentSet @"BiometryCurrentSet"
|
||||
#define kAccessControlDevicePasscode @"DevicePasscode"
|
||||
#define kAccessControlTouchIDAnyOrDevicePasscode @"TouchIDAnyOrDevicePasscode"
|
||||
#define kAccessControlTouchIDCurrentSetOrDevicePasscode @"TouchIDCurrentSetOrDevicePasscode"
|
||||
#define kAccessControlBiometryAnyOrDevicePasscode @"BiometryAnyOrDevicePasscode"
|
||||
#define kAccessControlBiometryCurrentSetOrDevicePasscode @"BiometryCurrentSetOrDevicePasscode"
|
||||
|
||||
#define kBiometryTypeTouchID @"TouchID"
|
||||
#define kBiometryTypeFaceID @"FaceID"
|
||||
|
@ -153,19 +153,19 @@ SecAccessControlCreateFlags secureAccessControl(NSDictionary *options)
|
|||
if ([ options[kAccessControlType] isEqualToString: kAccessControlUserPresence ]) {
|
||||
return kSecAccessControlUserPresence;
|
||||
}
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDAny ]) {
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryAny ]) {
|
||||
return kSecAccessControlTouchIDAny;
|
||||
}
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDCurrentSet ]) {
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSet ]) {
|
||||
return kSecAccessControlTouchIDCurrentSet;
|
||||
}
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlDevicePasscode ]) {
|
||||
return kSecAccessControlDevicePasscode;
|
||||
}
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDAnyOrDevicePasscode ]) {
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryAnyOrDevicePasscode ]) {
|
||||
return kSecAccessControlTouchIDAny|kSecAccessControlOr|kSecAccessControlDevicePasscode;
|
||||
}
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlTouchIDCurrentSetOrDevicePasscode ]) {
|
||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSetOrDevicePasscode ]) {
|
||||
return kSecAccessControlTouchIDCurrentSet|kSecAccessControlOr|kSecAccessControlDevicePasscode;
|
||||
}
|
||||
}
|
||||
|
|
16
index.js
16
index.js
|
@ -14,11 +14,11 @@ export const ACCESSIBLE = {
|
|||
|
||||
export const ACCESS_CONTROL = {
|
||||
USER_PRESENCE: 'UserPresence',
|
||||
TOUCH_ID_ANY: 'TouchIDAny',
|
||||
TOUCH_ID_CURRENT_SET: 'TouchIDCurrentSet',
|
||||
BIOMETRY_ANY: 'BiometryAny',
|
||||
BIOMETRY_CURRENT_SET: 'BiometryCurrentSet',
|
||||
DEVICE_PASSCODE: 'DevicePasscode',
|
||||
TOUCH_ID_ANY_OR_DEVICE_PASSCODE: 'TouchIDAnyOrDevicePasscode',
|
||||
TOUCH_ID_CURRENT_SET_OR_DEVICE_PASSCODE: 'TouchIDCurrentSetOrDevicePasscode',
|
||||
BIOMETRY_ANY_OR_DEVICE_PASSCODE: 'BiometryAnyOrDevicePasscode',
|
||||
BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE: 'BiometryCurrentSetOrDevicePasscode',
|
||||
};
|
||||
|
||||
export const AUTHENTICATION_TYPE = {
|
||||
|
@ -48,11 +48,11 @@ type Options = {
|
|||
|
||||
type SecAccessControl =
|
||||
| 'UserPresence'
|
||||
| 'TouchIDAny'
|
||||
| 'TouchIDCurrentSet'
|
||||
| 'BiometryAny'
|
||||
| 'BiometryCurrentSet'
|
||||
| 'DevicePasscode'
|
||||
| 'TouchIDAnyOrDevicePasscode'
|
||||
| 'TouchIDCurrentSetOrDevicePasscode';
|
||||
| 'BiometryAnyOrDevicePasscode'
|
||||
| 'BiometryCurrentSetOrDevicePasscode';
|
||||
|
||||
type LAPolicy = 'Authentication' | 'AuthenticationWithBiometrics';
|
||||
|
||||
|
|
Loading…
Reference in New Issue