'Access request context in the shell vertx command
I am using the vertx shell sever to allow user to use our custom commands in the website. However, we found that we cannot access any request context information like user in the command. For example, we want to perform authorization check for different commands, however, we are not able to get the user object from RoutingContext in the command.
Our use cases: register 2 commands in shell server: command 1 and command 2. User A can only use command 1 and user B can only use command 2.
I also tried to use putLocal in the vertx Context to store the User, but getLocal in the command returns null.
Do you know any other approach to get the request context in command or solve our use case?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
