public ActionForward commit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
PromptForPrivateKeyPassphraseForm f = (PromptForPrivateKeyPassphraseForm) form;
SessionInfo session = getSessionInfo(request);
UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(session.getUser().getRealm());
if(!udb.checkPassword(session.getUser().getPrincipalName(),
f.getPassphrase())) {
// User has entered incorrect passphrase - go back
ActionErrors errs = new ActionErrors();
errs.add(Globals.ERROR_KEY, new ActionMessage("promptForPrivateKeyPassphrase.error.incorrectPassphrase"));
saveErrors(request.getSession(), errs);