Skip to content

Post Execution Condition #263

Answered by MarcGiffing
cjacky475 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry I forgot to add the post-execute-condition in my proposal. Yes your solution seems to fit your problem if the first filter is executed before Spring security (which should be the default). I tried to visualize the post-execute-condition in the Readme
Image

If you sometimes may get a 401 status code my suggestion for improvement is to call a service which checks is the user is authenticated. Then your independent from the status code.

post-execute-condition: "yourService.isNotAuthenticated()"

To prevent attacks you should consider to add multiple rate limit configurations:

https://bucket4j.com/8.9.0/toc.html#short-timed-bursts

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MarcGiffing
Comment options

Answer selected by cjacky475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants