FUIBasicAuthenticationDelegate

public protocol FUIBasicAuthenticationDelegate : AnyObject

The delegate protocol for the basic authentication screen.

  • The delegate method that is invoked when user tapped the Sign In button on the FUIBasicAuthenticationScreen.

    Declaration

    Swift

    func didSignIn(_ controller: FUIBasicAuthenticationScreen, username: String, password: String, completion: @escaping ((_ errorMessage: String?) -> Void))

    Parameters

    controller
    username

    The username of the basic authentication user entered.

    password

    The password of the basic authentication user entered.

    completion

    When authentication is done, the completion block will be executed. If the errorMessage is nil, it indicates the authentication succeeded. Otherwise, when the errorMessage is not nil, it indicates that the authentication failed. There will be a banner with the errorMessage displayed under the navigation bar for four seconds.

  • The delegate method that is invoked when user tapped cancel button. Basically, the implementation should dismiss the controller.

    Declaration

    Swift

    func didCancel(_ controller: FUIBasicAuthenticationScreen)

    Parameters

    controller