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 LoginUIProtocol protocol.

    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
    badge

    The badge requiring login

    completion

    Completion 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
    orgName

    The organization name.

    completion

    Completion 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.

  • Declaration

    Swift

    func dismiss()