UnbluTwoFactorAuthWebViewProtocol
public protocol UnbluTwoFactorAuthWebViewProtocol
A protocol that defines the interface for an Unblu two-factor authentication (2FA) web view.
-
init(withConfiguration:
reloadButtonTitle: errorLabelColor: buttonLabelColor: buttonBorderColor: buttonBackgroundColor: _: ) Initializes the 2FA web view with the specified configuration.
Declaration
Swift
init(withConfiguration config: UnbluClientConfiguration, reloadButtonTitle: String,errorLabelColor: UIColor, buttonLabelColor: UIColor, buttonBorderColor: UIColor, buttonBackgroundColor: UIColor, _ complete: @escaping ([HTTPCookie]?, String?) -> Void)
Parameters
config
The
UnbluClientConfiguration
object used to configure the Unblu web view.reloadButtonTitle
The title to be displayed on the reload button. Defaults to
"Reload"
.errorLabelColor
The color used for displaying error messages. Defaults to
.systemRed
.buttonLabelColor
The color used for the reload button’s text. Defaults to
.systemBlue
.buttonBorderColor
The color used for the reload button’s border. Defaults to
.systemBlue
.buttonBackgroundColor
The color used for the reload button’s background. Defaults to
.systemGray
.complete
A closure that returns an optional array of
HTTPCookie
objects and an optionalString
error message upon completion. -
Displays or presents the two-factor authentication view to the user.
Declaration
Swift
func showTwoFactorAuthenticationView(presentationStyle: UIModalPresentationStyle)
Parameters
presentationStyle
The
UIModalPresentationStyle
to use when presenting the view (e.g.,.pageSheet
,.formSheet
,.overCurrentContext
, etc.). This method is intended to trigger the presentation of the 2FA interface, ensuring that the user can interact with the two-factor authentication process.