OutOfBandPayload

public struct OutOfBandPayload : Codable, Equatable

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 OutOfBandPayload based on a JWE (JSON Web Encryption) payload received via Push Notification from the NEVIS Mobile Authentication backend.

Usage example:


func userNotificationCenter(_: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> ()) {
    let pushNotificationHash = response.notification.request.content.userInfo
    // Convert `pushNotificationHash` to JSON string

    client.operations.outOfBandPayloadDecode
        .json(jsonPayload)
        .onSuccess(oobOperation)
        .onError { error in
            ...
        }
        .execute()
}
  • The list of supported content types for the encoded data.

    See more

    Declaration

    Swift

    public enum ContentType : String, Codable
  • The version of the payload.

    Declaration

    Swift

    public let version: String
  • The optional additional information that it was provided when triggering the out-of-band operation.

    Declaration

    Swift

    public let data: String?
  • The object containing the redemption information.

    Declaration

    Swift

    public let redeemData: RedeemData
  • The type of content.

    Declaration

    Swift

    public let contentType: ContentType