EMGemaltoOathDevice Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | EMGemaltoOathDevice.h |
– hotpWithAuthInput:error:
required method
Gets an event based OTP (HOTP) as defined by the Gemalto OATH eBanking options.
- (id<EMSecureString>)hotpWithAuthInput:(id<EMAuthInput>)authInput error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
error |
If 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 |
Return Value
The OTP.
Availability
3.2
Discussion
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please @see EMAuthInput for more details
Exceptions
NSInternalInconsistencyException |
When the associated token has the |
|---|
Declared In
EMGemaltoOathDevice.h
– totpWithAuthInput:error:
required method
Gets a time based OTP (TOTP) as defined by the Gemalto OATH eBanking options.
- (id<EMSecureString>)totpWithAuthInput:(id<EMAuthInput>)authInput error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
error |
If 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 |
Return Value
The OTP.
Availability
3.2
Discussion
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please @see EMAuthInput for more details
Declared In
EMGemaltoOathDevice.h
– ocraEventChallengeResponseWithAuthInput:challengeQuestion:error:
required method
Creates an event based OCRA C/R as defined by the Gemalto OATH eBanking options.
- (id<EMSecureString>)ocraEventChallengeResponseWithAuthInput:(id<EMAuthInput>)authInput challengeQuestion:(id<EMSecureString>)challengeQuestion error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
challengeQuestion |
The challenge question. |
error |
If 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 |
Return Value
The OTP.
Availability
3.2
Discussion
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please @see EMAuthInput for more details
Exceptions
NSInternalInconsistencyException |
when the associated token has the |
|---|
Declared In
EMGemaltoOathDevice.h
– ocraTimeChallengeResponseWithAuthInput:challengeQuestion:error:
required method
Creates a time based OCRA C/R as defined by the Gemalto OATH eBanking options.
- (id<EMSecureString>)ocraTimeChallengeResponseWithAuthInput:(id<EMAuthInput>)authInput challengeQuestion:(id<EMSecureString>)challengeQuestion error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
challengeQuestion |
The challenge question. |
error |
If 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 |
Return Value
The OTP.
Availability
3.2
Discussion
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please @see EMAuthInput for more details
Declared In
EMGemaltoOathDevice.h
– ocraEventSignatureWithAuthInput:dataToSign:error:
required method
Creates an event based OCRA signature as defined by the Gemalto OATH eBanking options.
- (id<EMSecureString>)ocraEventSignatureWithAuthInput:(id<EMAuthInput>)authInput dataToSign:(NSArray *)dataToSign error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
dataToSign |
The data to sign (as an array of EMSecureString instances). |
error |
If 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 |
Return Value
The OTP.
Availability
3.2
Discussion
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please @see EMAuthInput for more details
Exceptions
NSInternalInconsistencyException |
when the associated token has the |
|---|
Declared In
EMGemaltoOathDevice.h
– ocraTimeSignatureWithAuthInput:dataToSign:error:
required method
Creates a time based OCRA signature as defined by the Gemalto OATH eBanking options.
- (id<EMSecureString>)ocraTimeSignatureWithAuthInput:(id<EMAuthInput>)authInput dataToSign:(NSArray *)dataToSign error:(NSError **)errorParameters
authInput |
The authInput. |
|---|---|
dataToSign |
The data to sign (as an array of EMSecureString instances). |
error |
If 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 |
Return Value
The OTP.
Availability
3.2
Discussion
Warning: Depending of the EMAuthInput type you are using, you may have to use this function asynchronously, please @see EMAuthInput for more details
Declared In
EMGemaltoOathDevice.h
– lastOtpLifespan
required method
Return lifespan of the last OTP computed by this device.
- (NSInteger)lastOtpLifespanReturn Value
lifespan
- In case last OTP computed with this device is time-based
- If positive, the last OTP is still valid according current time and device's timestep settings. The returned value indicates the remaining seconds before the OTP becomes obsolete.
- If negative, the last OTP computed is obsolete. The absolute value indicates the time elapsed since the OTP has become obsolete.
- In case last OTP computed with this device is event-based, or no OTP has been computed yet, the function returns NSIntegerMax.
Availability
2.3
The following example illustrates the usage.
// Create OATH settings (see EMOathFactory)
id
// Create a OATH device (see EMOathFactory)
id
// Compute a time-based OTP with device (with pin and challengeQuestion EMSecureString) [device ocraTimeChallengeResponseWithPin:pin challengeQuestion:challengeQuestion];
// Each time selector [… lastOtpLifespan] is called, it returns the // remaining lifespan in seconds of the last time-based OTP. Lifespan is // computed with respect of device’s settings (in this example it returns // the lifespan according to Gemalto device fixed settings, i.e. 30-seconds timestep). NSInteger lifespan = [device lastOtpLifespan];
Declared In
EMGemaltoOathDevice.h