Class PasswordResetAjaxController


  • @RestController
    @RequestMapping("/ajax/password_reset")
    public class PasswordResetAjaxController
    extends java.lang.Object
    Handles asynchronous requests for password resets. Note: This controller is for unauthenticated requests only.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity<AjaxResponse> activateAccount​(java.lang.String identifier, java.util.Locale locale)
      Activate the user account
      org.springframework.http.ResponseEntity<AjaxResponse> createAndSendNewPasswordResetEmail​(java.lang.String usernameOrEmail, java.util.Locale locale)
      Create a password reset for the given email address or username
      org.springframework.http.ResponseEntity<AjaxResponse> updatePassword​(java.lang.String resetId, java.lang.String password, org.springframework.ui.Model model, java.util.Locale locale)
      Update the password for the User
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PasswordResetAjaxController

        @Autowired
        public PasswordResetAjaxController​(UIPasswordResetService UIPasswordResetService)
    • Method Detail

      • createAndSendNewPasswordResetEmail

        @RequestMapping(method=POST)
        public org.springframework.http.ResponseEntity<AjaxResponse> createAndSendNewPasswordResetEmail​(@RequestParam
                                                                                                        java.lang.String usernameOrEmail,
                                                                                                        java.util.Locale locale)
        Create a password reset for the given email address or username
        Parameters:
        usernameOrEmail - The email address or username to create a password reset for
        locale - The logged in user's locale
        Returns:
        message indicating if the password reset was successfully created or not
      • activateAccount

        @RequestMapping(value="/activate_account",
                        method=POST)
        public org.springframework.http.ResponseEntity<AjaxResponse> activateAccount​(@RequestParam
                                                                                     java.lang.String identifier,
                                                                                     java.util.Locale locale)
        Activate the user account
        Parameters:
        identifier - The ID of the PasswordReset
        locale - The logged in user's locale
        Returns:
        message indicating if account was successfully activated or not
      • updatePassword

        @RequestMapping(value="/update_password",
                        method=POST)
        public org.springframework.http.ResponseEntity<AjaxResponse> updatePassword​(@RequestParam
                                                                                    java.lang.String resetId,
                                                                                    @RequestParam
                                                                                    java.lang.String password,
                                                                                    org.springframework.ui.Model model,
                                                                                    java.util.Locale locale)
        Update the password for the User
        Parameters:
        resetId - The PasswordReset identifier
        password - The new password to set for the user
        model - A model for the page
        locale - The logged in user's locale
        Returns:
        message indicating if the password reset was successfully created or not