コード例 #1
0
 /**
  * Called when the authentication process completes (see attemptLogin()).
  *
  * @param result
  */
 public void onAuthenticationResult(final boolean result) {
   if (result) {
     if (!confirmCredentials) {
       finishLogin();
     } else {
       finishConfirmCredentials(true);
     }
   } else {
     Timber.d("onAuthenticationResult: failed to authenticate");
     if (requestNewAccount) {
       Toaster.showLong(
           BootstrapAuthenticatorActivity.this, string.message_auth_failed_new_account);
     } else {
       Toaster.showLong(BootstrapAuthenticatorActivity.this, string.message_auth_failed);
     }
   }
 }
コード例 #2
0
 @Subscribe
 public void onUnAuthorizedErrorEvent(UnAuthorizedErrorEvent unAuthorizedErrorEvent) {
   // Could not authorize for some reason.
   Toaster.showLong(BootstrapAuthenticatorActivity.this, R.string.message_bad_credentials);
 }