Package vaultWeb.controllers
Class UserController
java.lang.Object
vaultWeb.controllers.UserController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> changePassword(@Valid ChangePasswordRequest request) checkUsernameExists(String username) org.springframework.http.ResponseEntity<Void> Delete the current user's profile picture.org.springframework.http.ResponseEntity<List<UserResponseDto>> Get the current user's profile picture path.org.springframework.http.ResponseEntity<List<SecurityEventDto>> org.springframework.http.ResponseEntity<?> login(@Valid LoginRequest loginRequest, jakarta.servlet.http.HttpServletResponse response) org.springframework.http.ResponseEntity<Void> org.springframework.http.ResponseEntity<Void> logSecurityEvent(Map<String, String> payload, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<?> org.springframework.http.ResponseEntity<String> uploadProfilePicture(org.springframework.web.multipart.MultipartFile file) Upload (or replace) the current user's profile picture.
-
Constructor Details
-
UserController
public UserController()
-
-
Method Details
-
register
-
login
@PostMapping("/login") public org.springframework.http.ResponseEntity<?> login(@Valid @RequestBody @Valid LoginRequest loginRequest, jakarta.servlet.http.HttpServletResponse response) -
refresh
@PostMapping("/refresh") public org.springframework.http.ResponseEntity<?> refresh(@CookieValue(name="refresh_token",required=false) String refreshToken, jakarta.servlet.http.HttpServletResponse response) -
logout
-
checkUsernameExists
-
getAllUsers
@GetMapping("/users") public org.springframework.http.ResponseEntity<List<UserResponseDto>> getAllUsers() -
changePassword
@PostMapping("/change-password") public org.springframework.http.ResponseEntity<Void> changePassword(@Valid @RequestBody @Valid ChangePasswordRequest request) -
getSecurityActivity
@GetMapping("/security-activity") public org.springframework.http.ResponseEntity<List<SecurityEventDto>> getSecurityActivity() -
logSecurityEvent
-
uploadProfilePicture
@PostMapping(value="/profile-picture", consumes="multipart/form-data") public org.springframework.http.ResponseEntity<Map<String,String>> uploadProfilePicture(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) throws IOException Upload (or replace) the current user's profile picture.- Throws:
IOException
-
getProfilePicture
@GetMapping("/profile-picture") public org.springframework.http.ResponseEntity<Map<String,String>> getProfilePicture()Get the current user's profile picture path. -
deleteProfilePicture
@DeleteMapping("/profile-picture") public org.springframework.http.ResponseEntity<Void> deleteProfilePicture()Delete the current user's profile picture.
-