Add APPLICATION_PASSWORD to accessControl options
This commit is contained in:
parent
f113f32e05
commit
37ea15ae5e
|
@ -142,6 +142,7 @@ Keychain
|
||||||
|**`BIOMETRY_ANY`**|Constraint to access an item with Touch ID for any enrolled fingers.|
|
|**`BIOMETRY_ANY`**|Constraint to access an item with Touch ID for any enrolled fingers.|
|
||||||
|**`BIOMETRY_CURRENT_SET`**|Constraint to access an item with Touch ID for currently enrolled fingers.|
|
|**`BIOMETRY_CURRENT_SET`**|Constraint to access an item with Touch ID for currently enrolled fingers.|
|
||||||
|**`DEVICE_PASSCODE`**|Constraint to access an item with a passcode.|
|
|**`DEVICE_PASSCODE`**|Constraint to access an item with a passcode.|
|
||||||
|
|**`APPLICATION_PASSWORD`**|Constraint to use an application-provided password for data encryption key generation.|
|
||||||
|**`BIOMETRY_ANY_OR_DEVICE_PASSCODE`**|Constraint to access an item with Touch ID for any enrolled fingers or passcode.|
|
|**`BIOMETRY_ANY_OR_DEVICE_PASSCODE`**|Constraint to access an item with Touch ID for any enrolled fingers or passcode.|
|
||||||
|**`BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE`**|Constraint to access an item with Touch ID for currently enrolled fingers or passcode.|
|
|**`BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE`**|Constraint to access an item with Touch ID for currently enrolled fingers or passcode.|
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,7 @@ NSString *accessGroupValue(NSDictionary *options)
|
||||||
#define kAccessControlBiometryAny @"BiometryAny"
|
#define kAccessControlBiometryAny @"BiometryAny"
|
||||||
#define kAccessControlBiometryCurrentSet @"BiometryCurrentSet"
|
#define kAccessControlBiometryCurrentSet @"BiometryCurrentSet"
|
||||||
#define kAccessControlDevicePasscode @"DevicePasscode"
|
#define kAccessControlDevicePasscode @"DevicePasscode"
|
||||||
|
#define kAccessControlApplicationPassword @"ApplicationPassword"
|
||||||
#define kAccessControlBiometryAnyOrDevicePasscode @"BiometryAnyOrDevicePasscode"
|
#define kAccessControlBiometryAnyOrDevicePasscode @"BiometryAnyOrDevicePasscode"
|
||||||
#define kAccessControlBiometryCurrentSetOrDevicePasscode @"BiometryCurrentSetOrDevicePasscode"
|
#define kAccessControlBiometryCurrentSetOrDevicePasscode @"BiometryCurrentSetOrDevicePasscode"
|
||||||
|
|
||||||
|
@ -168,6 +169,9 @@ SecAccessControlCreateFlags secureAccessControl(NSDictionary *options)
|
||||||
else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSetOrDevicePasscode ]) {
|
else if ([ options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSetOrDevicePasscode ]) {
|
||||||
return kSecAccessControlTouchIDCurrentSet|kSecAccessControlOr|kSecAccessControlDevicePasscode;
|
return kSecAccessControlTouchIDCurrentSet|kSecAccessControlOr|kSecAccessControlDevicePasscode;
|
||||||
}
|
}
|
||||||
|
else if ([ options[kAccessControlType] isEqualToString: kAccessControlApplicationPassword ]) {
|
||||||
|
return kSecAccessControlApplicationPassword;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return kSecAccessControlTouchIDCurrentSet|kSecAccessControlOr|kSecAccessControlDevicePasscode;
|
return kSecAccessControlTouchIDCurrentSet|kSecAccessControlOr|kSecAccessControlDevicePasscode;
|
||||||
}
|
}
|
||||||
|
|
2
index.js
2
index.js
|
@ -17,6 +17,7 @@ export const ACCESS_CONTROL = {
|
||||||
BIOMETRY_ANY: 'BiometryAny',
|
BIOMETRY_ANY: 'BiometryAny',
|
||||||
BIOMETRY_CURRENT_SET: 'BiometryCurrentSet',
|
BIOMETRY_CURRENT_SET: 'BiometryCurrentSet',
|
||||||
DEVICE_PASSCODE: 'DevicePasscode',
|
DEVICE_PASSCODE: 'DevicePasscode',
|
||||||
|
APPLICATION_PASSWORD: 'ApplicationPassword',
|
||||||
BIOMETRY_ANY_OR_DEVICE_PASSCODE: 'BiometryAnyOrDevicePasscode',
|
BIOMETRY_ANY_OR_DEVICE_PASSCODE: 'BiometryAnyOrDevicePasscode',
|
||||||
BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE: 'BiometryCurrentSetOrDevicePasscode',
|
BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE: 'BiometryCurrentSetOrDevicePasscode',
|
||||||
};
|
};
|
||||||
|
@ -51,6 +52,7 @@ type SecAccessControl =
|
||||||
| 'BiometryAny'
|
| 'BiometryAny'
|
||||||
| 'BiometryCurrentSet'
|
| 'BiometryCurrentSet'
|
||||||
| 'DevicePasscode'
|
| 'DevicePasscode'
|
||||||
|
| 'ApplicationPassword'
|
||||||
| 'BiometryAnyOrDevicePasscode'
|
| 'BiometryAnyOrDevicePasscode'
|
||||||
| 'BiometryCurrentSetOrDevicePasscode';
|
| 'BiometryCurrentSetOrDevicePasscode';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue