-
Notifications
You must be signed in to change notification settings - Fork 4
Add role-access based habilitations #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @Override | ||
| protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) | ||
| throws ServletException, IOException { | ||
| System.out.println("Request to: " + request.getRequestURI()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slf4j not allowed here ?
|
|
||
| import java.io.IOException; | ||
|
|
||
| public class DebugSecurityFilter extends OncePerRequestFilter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we push this class in main ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we don't :-)
| } | ||
| http | ||
| .authorizeHttpRequests(configurer -> configurer | ||
| .requestMatchers("/questionnaires/**").hasRole(String.valueOf(ApplicationRole.READER)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.requestMatchers(HttpMethod.GET, "/questionnaires/**") <= to add GET method only
| public Collection<GrantedAuthority> convert(Jwt source) { | ||
|
|
||
| String[] claimPath = inseeSecurityTokenProperties.getOidcClaimRole().split("\\."); | ||
| System.out.println("test"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oups... missing println
No description provided.