Suppose I have a Java server application, which implements a few web services. Suppose also, I can authenticate application users.
Now I would like to add some limits per user to the service usage: e.g. rate limit (requests per second), maximum request size, etc.
Is there any "ready-to-use" library in Java to do that?
You can do that with Apache CXF by configuring an interceptor. This page has an example of the high level configuration. This page has details on interceptors. You can get as fancy as you wish with your validation. I do not know off hand how to get the authenticated user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With