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
controllerThe
FUIBasicAuthenticationScreeninstance.usernameThe username of the basic authentication user entered.
passwordThe password of the basic authentication user entered.
completionWhen authentication is done, the completion block will be executed. If the
errorMessageis nil, it indicates the authentication succeeded. Otherwise, when theerrorMessageis not nil, it indicates that the authentication failed. There will be a banner with theerrorMessagedisplayed 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
controllerThe
FUIBasicAuthenticationScreeninstance.