Package net.sourceforge.pebble.security

Examples of net.sourceforge.pebble.security.SecurityRealm.changePassword()


      if (usernames != null) {
        for (String username : usernames) {
          if (submit.equalsIgnoreCase("Remove")) {
            realm.removeUser(username);
          } else if (submit.equalsIgnoreCase("Reset Password")) {
            realm.changePassword(username, "password");
          }
        }
      }

      return new RedirectView(blog.getUrl() + "viewUsers.secureaction");
View Full Code Here


            validationContext.addError(sre.getMessage());
          }
        } else {
          realm.updateUser(newUserDetails);
          if (password1 != null && password1.length() > 0) {
            realm.changePassword(username, password1);
          }
        }
        return new RedirectView(blog.getUrl() + "viewUsers.secureaction");
      }
View Full Code Here

      } else if (!password1.equals(password2)) {
        validationContext.addError("Passwords do not match");
      }

      if (!validationContext.hasErrors()) {
          realm.changePassword(currentUserDetails.getUsername(), password1);

          return new PasswordChangedView();
      }

      getModel().put("validationContext", validationContext);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.