IPNotificationHandler

public class IPNotificationHandler

IPNotification handler parses the content of a push notification and extracts IAMPASS information. If the push notification is an IAMPASSauthentication request the delegat’s presentAuthenticationUI is called with the decoded authentication request and the device that the request is for. The client should call the processNotification method when it receives a push notification.

  • Initializer

    Declaration

    Swift

    public init()
  • Examines the content of a push notification and calls appropriate handlerto perform notification specific actions.

    • userInfo: The userInfo received in the app delegate’s didReceiveRemoteNotification method.
    • registeredUsers: An array containing the accounts registered on the current device.
    • onAuthenticationRequest: Code block called if the notification is an authentication request. The caller should present the authentication UI.
    • onStatusChanged: Code block called if the notification is a session status changed notification.
    • onError: Code block called if the notification is an IAMPASS notification but processing failed.
    • onIgnore: Code block called if the notification is an IAMPASS notification but should be ignored.
    • defaultHandler: The notification is not an IAMPASS notification. The called should continue normal notification processing.

    Declaration

    Swift

    public func processNotification( userInfo: [AnyHashable: Any], registeredUsers:[IPUser],
                                     onAuthenticationRequest: @escaping(_ request: IPAuthenticationRequest, _ user: IPUser)->Void,
                                     onStatusChanged: @escaping(_ status: IPSessionStatus)->Void,
                                     onError: @escaping(_ error: Error?)->Void,
                                     onIgnore: @escaping()->Void,
                                     defaultHandler: @escaping(_ userInfo: [AnyHashable: Any])->Void )->Void