MobileAuthenticationClientInitializer
public final class MobileAuthenticationClientInitializer
A builder for MobileAuthenticationClient
.
-
Creates a
MobileAuthenticationClientInitializer
instance.Declaration
Swift
public init()
-
Sets the configuration of the
MobileAuthenticationClient
.Important
Providing the configuration is required.Declaration
Swift
@discardableResult public func configuration(_ configuration: Configuration) -> MobileAuthenticationClientInitializer
Parameters
configuration
the
MobileAuthenticationClient
configuration.Return Value
the
MobileAuthenticationClientInitializer
builder. -
Specifies the block to execute when the
MobileAuthenticationClient
could be successfully built. This object will be invoked in the same thread theexecute()
was invoked on.Important
Providing theonSuccess
block is required.Declaration
Swift
@discardableResult public func onSuccess(_ onSuccess: @escaping (MobileAuthenticationClient) -> ()) -> MobileAuthenticationClientInitializer
Parameters
onSuccess
the block to execute when the
MobileAuthenticationClient
could be successfully built, receives theMobileAuthenticationClient
.Return Value
the
MobileAuthenticationClientInitializer
builder. -
Specifies the block to execute when the
MobileAuthenticationClient
couldn’t be built. This object will be invoked in the same thread theexecute()
was invoked on.Important
Providing theonError
block is required.Declaration
Swift
@discardableResult public func onError(_ onError: @escaping (InitializationError) -> ()) -> MobileAuthenticationClientInitializer
Parameters
onError
the block to execute when the
MobileAuthenticationClient
couldn’t be built, receives anInitializationError
.Return Value
the
MobileAuthenticationClientInitializer
builder. -
Starts the creation of an instance of the
MobileAuthenticationClient
. If an error occurs, it is provided throughonError(_:)
block. If theMobileAuthenticationClient
can be successfully built and initialized, it is provided throughonSuccess(_:)
block.Declaration
Swift
public func execute()