Secure with @PreAuthorize #84
Answered
by
maxixcom
adriendengreville
asked this question in
Q&A
-
I wanted to secure my endpoints using Any idea on where to look in the codebase to secure the app using the |
Beta Was this translation helpful? Give feedback.
Answered by
maxixcom
Feb 24, 2021
Replies: 1 comment 1 reply
-
Yes But I found that the annotation
Check if you have
Hope it will help. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
adriendengreville
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes
@Secure
use onlyROLE_
authorities as it is mentioned in annotation comments.But I found that the annotation
@PreAuthorize
works fine. I use it likeCheck if you have
@EnableGlobalMethodSecurity(prePostEnabled = true)
in your configuration.I have it as follows: