LoginUIProtocol
public protocol LoginUIProtocol
The LoginUIProtocol is adopted by a class to present a user interface that prompts
the user to enter login credentials. Login credentials are required by the UsherSDK to
validate the user’s credentials and restore a badge.
-
Returns an instance of the class conforming to
LoginUIProtocolprotocol.Declaration
Swift
static func instance() -> LoginUIProtocol? -
Prompts the user to login to the AD badge specified.
Declaration
Swift
func promptForLoginToBadge(_ badge: Badge, completion: @escaping CredentialEntryCompletion)Parameters
badgeThe badge requiring login
completionCompletion block to call once the user enters the credential. The completion block also takes a failureHandler block as a parameter that will be called in case login fails. Use this block to present error to user and/or retry login.
-
Prompts the user to login to the AD badge in an organization.
Declaration
Swift
func promptForLoginToOrganization(_ orgName: String, completion: @escaping CredentialEntryCompletion)Parameters
orgNameThe organization name.
completionCompletion block to call once the user enters the credential. The completion block also takes a failureHandler block as a parameter that will be called in case login fails. Use this block to present error to user and/or retry login.
-
Dismiss any UI presented by the
promptForLoginToBadge(_:completion:)orpromptForLoginToOrganization(_:completion:)calls.Declaration
Swift
func dismiss()
LoginUIProtocol Protocol Reference