pbs-middleware-server/src/main/java/com/pbs/middleware/server/features/users/rest/UserController.java
/**
     * Changes password for user by given {@code id}. Both old and new passwords must be provided.
     *
     * @param id                user id
     * @param passwordUpdateDto contains old and new passwords
     * @throws org.springframework.security.authentication.BadCredentialsException if old password does not match current password, or user not found
     */
Changes password for user by given  id. Both old and new passwords must be provided.
@param id                user id
@param passwordUpdateDto contains old and new passwords
@throws org.springframework.security.authentication.BadCredentialsException if old password does not match current password, or user not found
Changes password for user by given id . Both old and new passwords must be provided . @param id user id @param passwordUpdateDto contains old and new passwords @throws org . springframework . security . authentication . BadCredentialsException if old password does not match current password or user not found
@PreAuthorize(ALLOW_AUTHENTICATED)
    @PutMapping(value = ApiConfig.USERS_CHANGE_PW, consumes = MediaType.APPLICATION_JSON_VALUE)
    public void changePassword(@PathVariable UUID id, @Valid @RequestBody UserPasswordUpdate passwordUpdateDto) {
        service.changePassword(id, passwordUpdateDto.getOldPassword(), passwordUpdateDto.getNewPassword());
    }
@ PreAuthorize ( ALLOW_AUTHENTICATED ) @ PutMapping ( value = ApiConfig . USERS_CHANGE_PW , consumes = MediaType . APPLICATION_JSON_VALUE ) public void changePassword ( @ PathVariable UUID id , @ Valid @ RequestBody UserPasswordUpdate passwordUpdateDto ) { service . changePassword ( id , passwordUpdateDto . getOldPassword ( ) , passwordUpdateDto . getNewPassword ( ) ) ; }
Changes password for user by given {@code id}.
Changes password for user by given { @code id } .