You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/11/10 13:33:08 UTC

[GitHub] [james-project] ottoka commented on a change in pull request #741: Add a WebAdmin route for verifying a user password.

ottoka commented on a change in pull request #741:
URL: https://github.com/apache/james-project/pull/741#discussion_r746589841



##########
File path: server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/UserRoutes.java
##########
@@ -112,8 +117,29 @@ public void define(Service service) {
         defineAllowedFromHeaders();
 
         defineUserExist();
+
+        defineVerifyUsers();
     }
 
+    @POST
+    @Path("/{username}")
+    @ApiOperation(value = "Verifying User Password")
+    @ApiImplicitParams({
+            @ApiImplicitParam(required = true, dataType = "string", name = "username", paramType = "path"),
+            @ApiImplicitParam(required = true, dataType = "org.apache.james.webadmin.dto.VerifyUserRequest", paramType = "body")
+    })
+    @ApiResponses(value = {
+            @ApiResponse(code = HttpStatus.NO_CONTENT_204, message = "Verification successful."),
+            @ApiResponse(code = HttpStatus.UNAUTHORIZED_401, message = "Verification failed."),
+            @ApiResponse(code = HttpStatus.BAD_REQUEST_400, message = "Invalid input user."),
+            @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500,
+                    message = "Internal server error - Something went bad on the server side.")
+    })

Review comment:
       I noticed that as well, currently working on updating this PR so it works with the current master.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org