Class LoginPresenter<V extends LoginView>

    • Method Detail

      • getInfoReceivedListener

        protected ListenerModel<BaseModel<java.util.Map<java.lang.String,​java.lang.Object>>,​java.util.Map<java.lang.String,​java.lang.Object>> getInfoReceivedListener()
        Create a listener for InfoAPI
        Returns:
        listener to handle InfoAPI requests
      • getInfoAPI

        protected InfoAPI getInfoAPI()
        Get current instance of InfoAPI
        Returns:
        InfoAPI used on this presenter
      • onInfoReceivedFailed

        protected void onInfoReceivedFailed​(java.lang.String error)
        Called after a failed request for getting info
        Parameters:
        error - contains the detail of the error
      • onInfoReceivedSuccess

        protected void onInfoReceivedSuccess​(java.util.Map<java.lang.String,​java.lang.Object> data)
        Called after a successful request for getting info
        Parameters:
        data - contains a mapped response of the custom info
      • onLoginFailed

        protected void onLoginFailed​(java.lang.String error,
                                     int errorCode)
        Called after a failed login request
        Parameters:
        error - contains the detail of the error
        errorCode - code that represents the error
      • onLoginSuccess

        protected void onLoginSuccess​(Authentication data)
        Called after a successful login request
        Parameters:
        data - instance of Authentication used for login details
      • logout

        public void logout()
        Logouts the current user by clearing all saved information
      • getInfo

        protected void getInfo​(InfoQueryParams infoQueryParams,
                               java.lang.String clientId,
                               java.lang.String clientSecret)
        Get the current info needed for configuration
        Parameters:
        infoQueryParams - InfoQueryParams to use
        clientId - String client id
        clientSecret - String client secret