NMAOutOfBandPayload

@objc
public protocol NMAOutOfBandPayload

This object describes the contents that are sent by nevisFIDO in the out-of-band use case to start an operation (registration, authentication or deregistration).

This object can be obtained from its JSON representation, which is included in a push notification message, in a QR code or in a universal link, depending on the out-of-band mechanism used.

The following example shows how you would obtain the NMAOutOfBandPayload based on a JWE (JSON Web Encryption) payload received via Push Notification from the NEVIS Mobile Authentication backend.

Usage example:

- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
    NSDictionary *pushNotificationHash = [[[[response notification] request] content] userInfo];
    // Convert `pushNotificationHash` to JSON string

    id<NMAOutOfBandPayloadDecode> oobPayloadDecode = [[client operations] outOfBandPayloadDecode];
    [oobPayloadDecode json:jsonPushNotification];
    [oobPayloadDecode onSuccess:^(id<NMAOutOfBandPayload> _Nonnull oobPayload) {
        // Payload is returned by the SDK.
    }];
    [oobPayloadDecode onError:^(NMAOutOfBandPayloadError * _Nonnull error) {...}];
    [oobPayloadDecode execute];
}
  • The version of the payload.

    Declaration

    Swift

    var version: String { get }
  • The optional additional information that it was provided when triggering the out-of-band operation.

    Declaration

    Swift

    var data: String? { get }
  • The object containing the redemption information.

    Declaration

    Swift

    var redeemData: NMARedeemData { get }
  • The type of content.

    Declaration

    Swift

    var contentType: NMAOutOfBandContentType { get }