Interface AuthenticationView


  • public interface AuthenticationView

    An AuthenticationView is an interface that defines how a user can connect with Gluon CloudLink, by using one of the available login methods that are defined in the application. Implementations will usually show up a list of buttons that each represent one of these login methods. When a login method is clicked, it could show a web page that starts the connect flow by loading the login method's connect URL.

    The UserClient will try to create an AuthenticationView instance by loading the class that is defined in the system property com.gluonhq.cloudlink.client.user.AuthenticationView. If the system property is not defined, it will try to load the default Gluon Mobile implementation, which is based on Glisten.

    See Also:
    UserClient, Authenticator
    • Method Detail

      • authenticate

        void authenticate​(Authenticator authenticator)
        This method is called every time a request to Gluon CloudLink is made that requires an authenticated user and no authenticated user is currently active in the application. Most probably, an implementation will show up an authenticator view that offers the user a way to connect to Gluon CloudLink using one of the available login methods. The authenticator is used to process various tasks depending on the status of authentication during the authentication process.
        Parameters:
        authenticator - An Authenticator to be used during the authentication process
      • setAuthenticationProvider

        void setAuthenticationProvider​(AuthenticationProvider authenticationProvider)
        Sets an authentication provider on the view. Login methods are fetched from the provider and then added to the already present login methods.
        Parameters:
        authenticationProvider - Authentication provider to fetch login methods.