From 0ea75c8b71176cd70d313ff2c80dc996051518a0 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Thu, 5 Oct 2023 10:21:55 +0200 Subject: [PATCH] Remove dead code --- .../UserApiSecurityConfiguration.java | 20 ------------------- .../security/UserDetailsServiceImpl.java | 7 ------- 2 files changed, 27 deletions(-) delete mode 100644 src/main/java/com/privacydashboard/application/security/UserApiSecurityConfiguration.java 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) {