diff --git a/src/main/java/com/privacydashboard/application/security/UserApiSecurityConfiguration.java b/src/main/java/com/privacydashboard/application/security/UserApiSecurityConfiguration.java deleted file mode 100644 index 321dee2..0000000 --- a/src/main/java/com/privacydashboard/application/security/UserApiSecurityConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -//package com.privacydashboard.application.security; -// -//import com.vaadin.flow.spring.security.VaadinWebSecurityConfigurerAdapter; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.core.annotation.Order; -//import org.springframework.security.config.annotation.web.builders.HttpSecurity; -//import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; -// -//@Configuration -//@Order(2) -//public class UserApiSecurityConfiguration extends VaadinWebSecurityConfigurerAdapter { -// @Override -// protected void configure(HttpSecurity http) throws Exception { -// http.antMatcher("/userapi/**") -// .authorizeRequests() -// .anyRequest().authenticated() -// .and() -// .addFilterBefore(new JWTAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class); -// } -//} diff --git a/src/main/java/com/privacydashboard/application/security/UserDetailsServiceImpl.java b/src/main/java/com/privacydashboard/application/security/UserDetailsServiceImpl.java index 66cc518..9e1cce4 100644 --- a/src/main/java/com/privacydashboard/application/security/UserDetailsServiceImpl.java +++ b/src/main/java/com/privacydashboard/application/security/UserDetailsServiceImpl.java @@ -58,13 +58,6 @@ public List getAuthoritiesByUser(User user) { return list; } - - /*private static List getAuthorities(User user) { - return user.getRoles().stream().map(role -> new SimpleGrantedAuthority("ROLE_" + role)) - .collect(Collectors.toList()); - - }*/ - // Per com'è fatto, c'è solo un elemento Authority (User può essere solo uno tra Subject, Controller e DPO) // springframework...User però vuole una lista private static List getAuthorities(User user) {