EMToken
Objective-C
@protocol EMToken <NSObject, EMAuthenticatable>
Swift
protocol EMToken : EMAuthenticatable
The EMToken protocol represents user’s credentials known as tokens.
-
Gets the name of the token. The name of the token was defined when the token was created.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *name;Swift
var name: String! { get }Return Value
The name of the token.
-
Returns
YESif the token’s credentials are software based (i.e. the credentials are not stored inside a special hardware chip).Declaration
Objective-C
@property (nonatomic, readonly, getter=isSoft) BOOL soft;Swift
var isSoft: Bool { get }Return Value
YESif this is a soft token,NOotherwise -
Gets the token sequence number that distinguishes this token among others the users has.
The token sequence number is defined only for CAP tokens and is an unsigned value ranging from 0x00 to 0x63 (i.e. 0 to 99). For OATH tokens, the method always return 0xFF (i.e. 255).
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger tokenSequenceNumber;Swift
var tokenSequenceNumber: Int { get }Return Value
The token sequence number.
-
Returns the User Token Identifier (UTI).
The UTI is an unsigned value ranging from 0x00 to 0xFF (i.e. 0 to 255). It is generated by the provisioning server and is part of the credential pushed during provisioning. It is guaranteed that two tokens for the same end-user (on authentication server) and from the same EPS domain will never have the same UTI. See the Enrollment and Provisioning Server documentation for domains configuration description.
The UTI is defined only if the token has been created with Provisioning Protocol V3 or V5. When the token has been created with Provisioning Protocol V1 or V2 the method returns -1.
Since
2.2Declaration
Objective-C
@property (nonatomic, readonly) NSInteger userTokenId;Swift
var userTokenId: Int { get }Return Value
The user token id, -1 if none.
-
Performs a change PIN using a PIN authentication mode. If the EMTokenCapability of the token is
EMTokenCapabilityDUAL_SEEDthen this operation changes the PIN for both keys regardless of which key is currently selected. See EMTokenCapability.- EMPinRuleErrorDomain when the new PIN does not comply with the configured PIN rules.
Since
3.2Declaration
Objective-C
- (BOOL)changePinWithAuthInput:(id<EMPinAuthInput>)oldPin newPin:(id<EMPinAuthInput>)newPin error:(NSError **)error;Swift
func changePin(with oldPin: (any EMPinAuthInput)!, newPin: (any EMPinAuthInput)!) throwsParameters
oldPinCurrent Pin value.
newPinNew Pin value.
errorIf an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in
NULL. object containing the error information. Possible errors are:Return Value
YESif the pin was changed,NOif an error occurred. -
Performs upgrade token migration to support multi authentication mode. The migration is supposed to be performed from SDK version 2.3.0 or newer.
Warning
1. It’s mandatory to perform token migration on a previously created token but also on new token before any token operation.Pin value parsed here needs to be correct one, otherwise the token will no longer be valid.
EZIO_MOBILE_ERROR_DOMAIN_MULTI_AUTH_MODE , when upgrade lowplatformcoupling token to multi-auth mode which is not supported.
EMTokenMigrationErrorDomain , when token already migrated to support multi auth modes.
Since
3.2
Declaration
Objective-C
- (BOOL)upgradeToMultiAuthMode:(id<EMPinAuthInput>)pin error:(NSError **)error;Swift
func upgrade(toMultiAuthMode pin: (any EMPinAuthInput)!) throwsParameters
pinCurrent Pin value.
errorIf an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in ‘NULL’. object containing the error information. Possible errors are:
Return Value
‘YES’ if the token migration was succeeded. ‘NO’ if an error occurred.
EMToken Protocol Reference