use of com.owncloud.android.ui.dialog.CredentialsDialogFragment in project android by owncloud.
the class AuthenticatorActivity method createAuthenticationDialog.
/**
* Create and show dialog for request authentication to the user
* @param webView Web view to embed into the authentication dialog.
* @param handler Object responsible for catching and recovering HTTP authentication fails.
*/
public void createAuthenticationDialog(WebView webView, HttpAuthHandler handler) {
// Show a dialog with the certificate info
CredentialsDialogFragment dialog = CredentialsDialogFragment.newInstanceForCredentials(webView, handler);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
ft.addToBackStack(null);
dialog.setCancelable(false);
dialog.show(ft, CREDENTIALS_DIALOG_TAG);
if (!mIsFirstAuthAttempt) {
showSnackMessage(R.string.saml_authentication_wrong_pass);
} else {
mIsFirstAuthAttempt = false;
}
}
Aggregations