HID APPROVE SDK  5.12
HID Approve SDK for iOS/macOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
HIDProtectionPolicy.h
Go to the documentation of this file.
1 /* ---------------------------------------------------------------------------
2  (c) 2015-2024, HID Global Corporation, part of ASSA ABLOY.
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without modification,
6  are permitted provided that the following conditions are met:
7  - Redistributions of source code must retain the above copyright notice,
8  this list of conditions and the following disclaimer.
9  - Redistributions in binary form must reproduce the above copyright notice,
10  this list of conditions and the following disclaimer in the documentation
11  and/or other materials provided with the distribution.
12 
13  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
17  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 --------------------------------------------------------------------------- */
24 
25 #import <Foundation/Foundation.h>
26 #import "HIDIdentifier.h"
27 
37 typedef enum
38 {
43 } HIDLockType;
44 
48 @protocol HIDLockPolicy
49 
55 
56 @end
57 
62 
67 - (int)counter;
68 
69 @end
70 
102 
107 - (int)counter;
108 
113 - (int)delay;
114 
115 @end
116 
120 typedef enum
121 {
125 
126 } HIDPolicyType;
127 
131 @protocol HIDProtectionPolicy <NSObject>
132 
138 
144 
150 
151 @end
152 
193 - (BOOL)changePassword:(NSString*)oldPassword new:(NSString*)newPassword error:(NSError**)error;
194 
210 - (BOOL)verifyPassword:(NSString*)password error:(NSError**)error;
211 
216 - (int)minLength;
217 
222 - (int)maxLength;
223 
228 - (int)minUpperCase;
229 
234 - (int)minLowerCase;
235 
240 - (int)minNumeric;
241 
246 - (int)minNonAlpha;
247 
252 - (int)minAlpha;
253 
258 - (int)maxUpperCase;
259 
264 - (int)maxLowerCase;
265 
270 - (int)maxNumeric;
271 
276 - (int)maxNonAlpha;
277 
282 - (int)maxAlpha;
283 
291 - (int)minAge;
292 
299 - (int)maxAge;
300 
305 - (int)currentAge;
306 
313 - (int)maxHistory;
314 
319 - (BOOL)isCacheEnabled;
320 
325 - (BOOL)isSequenceAllowed;
326 
331 - (int)getCacheTimeout;
332 @end
333 
337 typedef enum
338 {
345 
350 
357 - (BOOL)enableBioAuthentication:(NSString*)sPassword error:(NSError**)error;
358 
364 
365 @end
366 
371 
372 @end
373 
The credential never locks.
Definition: HIDProtectionPolicy.h:39
the cryptographic key has been invalidated.
Definition: HIDProtectionPolicy.h:343
The device has no biometric sensor, authentication with biometrics is not possible.
Definition: HIDProtectionPolicy.h:341
Lock Policy with specific access constraints.
Definition: HIDProtectionPolicy.h:48
int maxAge()
Get maximum age for a password. This determines how long (in days) users can keep a password before t...
int maxAlpha()
Get maximum number of alphabetical characters.
Authentication with biometrics is enabled, the SDK will accept password as nil in authentication meth...
Definition: HIDProtectionPolicy.h:339
int minLowerCase()
Get minimum number of lower case letters.
int maxNonAlpha()
Get maximum number of special characters (non alphanumeric).
The protection policy defines the security parameters associated with a key or data item...
Definition: HIDProtectionPolicy.h:131
The user did not enrolled biometric features at the device level, authentication with biometrics cann...
Definition: HIDProtectionPolicy.h:342
An exponential delay is added for each failed authentication attempt using that credential.
Definition: HIDProtectionPolicy.h:41
HIDLockType
Known types of lock policy.
Definition: HIDProtectionPolicy.h:37
int maxUpperCase()
Get maximum number of upper case letters.
id< HIDLockPolicy > lockPolicy()
Returns the lock policy.
int maxLength()
Get maximum password length.
The access to the credential will be limited by applying an exponential delay for each failed attempt...
Definition: HIDProtectionPolicy.h:101
Protection Policy with password specific constraints.
Definition: HIDProtectionPolicy.h:175
Protection Policy with device derived key protection.
Definition: HIDProtectionPolicy.h:370
int minNumeric()
Get the minimum number of numeric characters.
HIDLockType lockType()
returns the lock policy type.
HIDBioAuthenticationState
Working state of authentication with biometrics.
Definition: HIDProtectionPolicy.h:337
Protection policy with authentication with biometrics or password.
Definition: HIDProtectionPolicy.h:349
int currentAge()
Get current password age since last change.
The credential access is limited by delegating validation and blocking to server-side controls...
Definition: HIDProtectionPolicy.h:42
int maxNumeric()
Get maximum number of numeric characters.
int maxHistory()
Get max password history limit. This security setting determines the number of unique new passwords t...
int counter()
Returns the maximum counter value after which exponential delay is fixed.
HIDPolicyType
Protection policy types.
Definition: HIDProtectionPolicy.h:120
int counter()
Returns the max counter value of the credential before it gets locked.
HIDIdentifier * policyId()
Returns the protection policy identifier.
HIDPolicyType policyType()
Returns the protection policy type.
object identifier.
Definition: HIDIdentifier.h:36
HIDBioAuthenticationState getBioAuthenticationState()
Returns the current working state of authentication with biometrics.
Item is protected by a password provided by the user.
Definition: HIDProtectionPolicy.h:122
int maxLowerCase()
Get maximum number of lower case letters.
BOOL isSequenceAllowed()
Gets password sequence allowed flag.
Item is protected by device-specific information.
Definition: HIDProtectionPolicy.h:123
int getCacheTimeout()
Gets password cache timeout.
Item is protected by external biometric policy.
Definition: HIDProtectionPolicy.h:124
The credential locks after a certain number of attempts.
Definition: HIDProtectionPolicy.h:40
Authentication with biometrics is not enabled. To enable, a call to HIDBioPasswordPolicy.enableBioAuthentication is required.
Definition: HIDProtectionPolicy.h:340
int minLength()
Get minimum password length.
Object reference.
int delay()
Returns the initial delay in seconds.
int minNonAlpha()
Get minimum number of special characters (non alphanumeric).
int minUpperCase()
Get minimum number of upper case letters.
BOOL isCacheEnabled()
Gets password cache flag.
The access to the credential will be locked after a configurable number of failed attempts...
Definition: HIDProtectionPolicy.h:61
int minAlpha()
Get minimum number of alphabetical characters.
int minAge()
Get minimum age for a password change. This security setting determines the period of time (in days) ...