Class PasswordResetAjaxController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.login.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.
-
-
Constructor Summary
Constructors Constructor Description PasswordResetAjaxController(UIPasswordResetService UIPasswordResetService)
-
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 accountorg.springframework.http.ResponseEntity<AjaxResponse>
createAndSendNewPasswordResetEmail(java.lang.String usernameOrEmail, java.util.Locale locale)
Create a password reset for the given email address or usernameorg.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 theUser
-
-
-
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 forlocale
- 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 thePasswordReset
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 theUser
- Parameters:
resetId
- ThePasswordReset
identifierpassword
- The new password to set for the usermodel
- A model for the pagelocale
- The logged in user's locale- Returns:
- message indicating if the password reset was successfully created or not
-
-