SCM iOS API
|
Class represents a PIN that protects smart card contents. More...
Inherits NSObject.
Instance Methods | |
(NSString *) | - getLabel |
(BOOL) | - isInitialized |
(BOOL) | - isToBeChanged |
(BOOL) | - isBlocked |
(BOOL) | - isTryCountLow |
(BOOL) | - isLastTry |
(BOOL) | - isValidated |
(int) | - getRemainingTries |
(void) | - login:completionHandler: |
(void) | - loginSO:completionHandler: |
(void) | - change:newValue:completionHandler: |
(void) | - logout: |
(void) | - getConstraints: |
Class represents a PIN that protects smart card contents.
Note that the constructor is not intended to be called by user code. Such objects are constructed internally by the API.
- (void) change: | (NSString *) | oldValue | |
newValue: | (NSString *) | newValue | |
completionHandler: | (void(^)(NSError *)) | completionHandler | |
Changes the PIN. The operation can only be made against the user PIN.
oldValue | the current PIN value. May be nil if a protected authentication path exists Token#hasProtectedAuthPath. |
newValue | the PIN value. May be nil if a protected authentication path exists. |
completionHandler | the completion handler block to be called as soon as the login is complete. The completion handler is executed on the main queue. On output, an error object that indicates why the pin change failed, or nil if the pin change was successful. |
- (void) getConstraints: | (void(^)(NSArray *constraints, NSError *error)) | completionHandler |
Gets the format constraints of the PIN as an array of PinConstraint object.
completionHandler | the completionHandler is executed on tha main queue once the result is obtained, and takes the following parameters:
|
- (NSString *) getLabel |
Gets the PIN label. Can be undefined if the card has a single PIN without explicit label defined.
- (int) getRemainingTries |
Returns the number of remaining tries for the PIN verification. Can be undefined if the information is unavailable.
- (BOOL) isBlocked |
Returns YES if the PIN is blocked.
- (BOOL) isInitialized |
Returns YES if the PIN has been initialized.
- (BOOL) isLastTry |
Returns YES if the PIN try counter shows only one attempt remaining.
- (BOOL) isToBeChanged |
Returns YES if the PIN need to be changed before use.
- (BOOL) isTryCountLow |
Returns YES if the PIN try counter is lower than the maximun (an unsuccessful verification attempt has been made).
- (BOOL) isValidated |
Returns YES if the PIN has been successfully verified (access to the private objects is granted).
- (void) login: | (NSString *) | value | |
completionHandler: | (void(^)(NSError *error)) | completionHandler | |
Verifies the PIN.
value | the PIN value. May be nil if a protected authentication path exists (Token#hasProtectedAuthPath). |
completionHandler | the completion handler block to be called as soon as the login is complete. The completion handler is executed on the main queue. On output, an error object that indicates why the login failed, or nil if the login was successful. |
- (void) loginSO: | (NSString *) | value | |
completionHandler: | (void(^)(NSError *error)) | completionHandler | |
Verifies the security officer (administrator or unblocking) PIN.
value | the PIN value. May be nil if a protected authentication path exists (Token#hasProtectedAuthPath). |
completionHandler | the completion handler block to be called as soon as the login is complete. The completion handler is executed on the main queue. On output, an error object that indicates why the login failed, or nil if the login was successful. |
- (void) logout: | (void(^)(NSError *error)) | completionHandler |
Resets the verified status of the PIN (cancels a call to Pin#login:completionHandler:).
completionHandler | the completion handler block to be called as soon as the verified status of the PIN is reset. The completion handler is executed on the main queue. On output, an error object that indicates the reason of failure, or nil if the was successful. |